You are here

function httprl_run_multiple in HTTP Parallel Request & Threading Library 7

Same name and namespace in other branches
  1. 6 httprl.module \httprl_run_multiple()

Run array of data through callback.

Parameters

$data: The data to process.

$callback: The function to run

Return value

Array of results.

1 call to httprl_run_multiple()
httprl.examples.php in examples/httprl.examples.php
HTTP Parallel Request Library code examples.
1 string reference to 'httprl_run_multiple'
httprl_batch_callback in ./httprl.module
Given an array of data, use multiple processes to crunch it.

File

./httprl.module, line 3602
HTTP Parallel Request Library module.

Code

function httprl_run_multiple($callback, $data) {
  $results = array();
  foreach ($data as $key => $values) {
    $results[$key] = call_user_func_array($callback, array(
      $values,
    ));
  }
  return $results;
}