public function traveler(
        $function,
        $methodAttributes = null,
        $data = null,
        $recursive = false
    ) {
        if (!$data) {
            $data =& $this->_DATA;
        }

        foreach ($data as $key => $value) {
            $isRecursive = is_array($value) && $recursive;

            if ($isRecursive) {
                $data[$key] = $this->_recursiveTraveler($function, $methodAttributes, $value);
            } else {
                $data[$key] = $this->_callUserFunction($function, $key, $value, $methodAttributes);
            }
        }

        return $data;
    }
public function traveler(
        $function,
        $methodAttributes = null,
        $data = null,
        $recursive = false
    ) {
        if (!$data) {
            $data =& $this->_DATA;
        }

        foreach ($data as $key => $value) {
            $isRecursive = is_array($value) && $recursive;

            if ($isRecursive) {
                $data[$key] = $this->_recursiveTraveler($function, $methodAttributes, $value);
            } else {
                $data[$key] = $this->_callUserFunction($function, $key, $value, $methodAttributes);
            }
        }

        return $data;
    }
public function traveler ( $ function , $ methodAttributes = null , $ data = null , $ recursive = false ) { if ( ! $ data ) { $ data = & $ this -> _DATA ; } foreach ( $ data as $ key => $ value ) { $ isRecursive = is_array ( $ value ) && $ recursive ; if ( $ isRecursive ) { $ data [ $ key ] = $ this -> _recursiveTraveler ( $ function , $ methodAttributes , $ value ) ; } else { $ data [ $ key ] = $ this -> _callUserFunction ( $ function , $ key , $ value , $ methodAttributes ) ; } } return $ data ; }
allow to use given method or function for all data inside of object

@param array|string|\Closure $function
@param mixed $methodAttributes
@param mixed $data
@param bool $recursive
@return array|null
allow to use given method or function for all data inside of object