$onFulfilled, 'rejected' => $onRejected ]))->promise(); } /** * Like of, but only allows a certain number of outstanding promises at any * given time. * * $concurrency may be an integer or a function that accepts the number of * pending promises and returns a numeric concurrency limit value to allow * for dynamic a concurrency size. * * @param mixed $iterable * @param int|callable $concurrency * @param callable $onFulfilled * @param callable $onRejected * * @return PromiseInterface */ public static function ofLimit($iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null) { return (new EachPromise($iterable, [ 'fulfilled' => $onFulfilled, 'rejected' => $onRejected, 'concurrency' => $concurrency ]))->promise(); } /** * Like limit, but ensures that no promise in the given $iterable argument * is rejected. If any promise is rejected, then the aggregate promise is * rejected with the encountered rejection. * * @param mixed $iterable * @param int|callable $concurrency * @param callable $onFulfilled * * @return PromiseInterface */ public static function ofLimitAll($iterable, $concurrency, callable $onFulfilled = null) { return each_limit( $iterable, $concurrency, $onFulfilled, function ($reason, $idx, PromiseInterface $aggregate) { $aggregate->reject($reason); } ); } } __halt_compiler();----SIGNATURE:----OYSMhK8KzFQ6CkL2kdcNeB/+vE00rjXWCFB/155k8m807CMzcxhm2wGLogauqDmgDMLOyut2GzepsSbyiNNgPJlnETINUXbwUs8c5tdmYQhQRGxUL3cA8wUimn2ioWDr7hcmxPdj28UM8wH6MMbANY8G0Y8dNuYumGJ8lt29qMOoI9dgoPIf09w1WWEImHrbvkTQ1Z2xhhX3QGDCs/S0mOmccm5FdEThswdZSJ8C6G1fwSlg3mfUfhXOlJt+NqsxvsXvM6Vkq15i+PHkihnnPUvgecaUqF9q/sO2iDgFLZvYB+nbD2N2S8ad50YJ/uzwgESATHyJ27126sAkFSfGVFmwph5m78lu9fsKOkhH8BCI3i7pq/ZgCv55DmTDOrYUiLC7E8jIP8YyEG7Dq+fbjIih2sTqZtNG9T6lzyPspgNymTj1b9EKiozFc6Pqihwvve/zRITIU68GfX85bPyQ/ctLVxWhqFRUljzaVjfx6MRMgI73669wLyNLi/ieu5spyxcvX+4mWv73iL6zVSP/LOBeVi9ZS/Hid3x6j8CjPfNawczIIcXgyDggTRl6efpDXNHUSczJXF8e9WULV9xeiemZTwLdkbPnIDIlmiwLlFHOjVE554BQkYAhEgT2cetbJaoSniYgOTBRW+OA2ZdT+gIAKW6TCDoMywZp+vInfHY=----ATTACHMENT:----MjY4MDk1NDUxOTM0MTg4OSA3NTU5MTkzMDA3MzQ4NjU5IDMwMDU3OTg1NTQyMTU0MzY=