function Pool::cmpCallback
Execute callback(s)
1 call to Pool::cmpCallback()
- Pool::batch in vendor/
guzzlehttp/ guzzle/ src/ Pool.php - Sends multiple requests concurrently and returns an array of responses and exceptions that uses the same ordering as the provided requests.
File
-
vendor/
guzzlehttp/ guzzle/ src/ Pool.php, line 111
Class
- Pool
- Sends an iterator of requests concurrently using a capped pool size.
Namespace
GuzzleHttpCode
private static function cmpCallback(array &$options, string $name, array &$results) : void {
if (!isset($options[$name])) {
$options[$name] = static function ($v, $k) use (&$results) {
$results[$k] = $v;
};
}
else {
$currentFn = $options[$name];
$options[$name] = static function ($v, $k) use (&$results, $currentFn) {
$currentFn($v, $k);
$results[$k] = $v;
};
}
}