src/CommandPool.php
public static function batch(
        AwsClientInterface $client,
        $commands,
        array $config = []
    ) {
        $results = [];
        self::cmpCallback($config, 'fulfilled', $results);
        self::cmpCallback($config, 'rejected', $results);

        return (new self($client, $commands, $config))
            ->promise()
            ->then(static function () use (&$results) {
                ksort($results);
                return $results;
            })
            ->wait();
    }
public static function batch(
        AwsClientInterface $client,
        $commands,
        array $config = []
    ) {
        $results = [];
        self::cmpCallback($config, 'fulfilled', $results);
        self::cmpCallback($config, 'rejected', $results);

        return (new self($client, $commands, $config))
            ->promise()
            ->then(static function () use (&$results) {
                ksort($results);
                return $results;
            })
            ->wait();
    }
public static function batch ( AwsClientInterface $ client , $ commands , array $ config = [ ] ) { $ results = [ ] ; self :: cmpCallback ( $ config , 'fulfilled' , $ results ) ; self :: cmpCallback ( $ config , 'rejected' , $ results ) ; return ( new self ( $ client , $ commands , $ config ) ) -> promise ( ) -> then ( static function ( ) use ( & $ results ) { ksort ( $ results ) ; return $ results ; } ) -> wait ( ) ; }
Executes a pool synchronously and aggregates the results of the pool
into an indexed array in the same order as the passed in array.

@param AwsClientInterface $client   Client used to execute commands.
@param mixed              $commands Iterable that yields commands.
@param array              $config   Configuration options.

@return array
@see \Aws\CommandPool::__construct for available configuration options.
Executes a pool synchronously and aggregates the results of the pool into an indexed array in the same order as the passed in array .