if (!
isset($to_process[$key])) { $to_process[$key] =
$done;
} } // Parse the finished requests before we start getting the new ones
foreach ($to_process as $key =>
$done) { $options =
$requests[$key]['options'
];
if ($done['result'
] !== CURLE_OK
) { //get error string for handle.
$reason =
curl_error($done['handle'
]);
$exception =
new CurlException( $reason,
CurlException::EASY,
$done['handle'
],
$done['result'
] );
$responses[$key] =
$exception;
$options['hooks'
]->
dispatch('transport.internal.parse_error',
[&
$responses[$key],
$requests[$key]]);
} else { $responses[$key] =
$subrequests[$key]->
process_response($subrequests[$key]->response_data,
$options);
$options['hooks'
]->
dispatch('transport.internal.parse_response',
[&
$responses[$key],
$requests[$key]]);
}