You are here

function HTTP_Request::_arrayMapRecursive in Flickr API 5

Recursively applies the callback function to the value

@access private

Parameters

mixed Callback function:

mixed Value to process:

Return value

mixed Processed value

1 call to HTTP_Request::_arrayMapRecursive()
HTTP_Request::addPostData in phpFlickr/PEAR/HTTP/Request.php
Adds postdata items

File

phpFlickr/PEAR/HTTP/Request.php, line 560

Class

HTTP_Request
Class for performing HTTP requests

Code

function _arrayMapRecursive($callback, $value) {
  if (!is_array($value)) {
    return call_user_func($callback, $value);
  }
  else {
    $map = array();
    foreach ($value as $k => $v) {
      $map[$k] = $this
        ->_arrayMapRecursive($callback, $v);
    }
    return $map;
  }
}