src/HAB/Pica/Record/Helper.php
public static function mapMethod (array $sequence, $method, array $arguments = array())
    {
        if (empty($arguments)) {
            $f = function ($element) use ($method) {
                return $element->$method();
            };
        } else {
            $f = function ($element) use ($method, $arguments) {
                return call_user_func_array(array($element, $method), $arguments);
            };
        }
        return array_map($f, $sequence);
    }
public static function mapMethod (array $sequence, $method, array $arguments = array())
    {
        if (empty($arguments)) {
            $f = function ($element) use ($method) {
                return $element->$method();
            };
        } else {
            $f = function ($element) use ($method, $arguments) {
                return call_user_func_array(array($element, $method), $arguments);
            };
        }
        return array_map($f, $sequence);
    }
public static function mapMethod ( array $ sequence , $ method , array $ arguments = array ( ) ) { if ( empty ( $ arguments ) ) { $ f = function ( $ element ) use ( $ method ) { return $ element -> $ method ( ) ; } ; } else { $ f = function ( $ element ) use ( $ method , $ arguments ) { return call_user_func_array ( array ( $ element , $ method ) , $ arguments ) ; } ; } return array_map ( $ f , $ sequence ) ; }
Return an array of the results of calling a method for each element of a
sequence.

@param  array $sequence Sequence of objects
@param  string $method Name of the method
@param  array $arguments Optional array of method arguments
@return array Result of calling method on each element of sequence
Return an array of the results of calling a method for each element of a sequence .