protected function _propertyExtractor($callback)
    {
        if (!is_string($callback)) {
            return $callback;
        }

        $path = explode('.', $callback);

        if (strpos($callback, '{*}') !== false) {
            return function ($element) use ($path) {
                return $this->_extract($element, $path);
            };
        }

        return function ($element) use ($path) {
            return $this->_simpleExtract($element, $path);
        };
    }
protected function _propertyExtractor($callback)
    {
        if (!is_string($callback)) {
            return $callback;
        }

        $path = explode('.', $callback);

        if (strpos($callback, '{*}') !== false) {
            return function ($element) use ($path) {
                return $this->_extract($element, $path);
            };
        }

        return function ($element) use ($path) {
            return $this->_simpleExtract($element, $path);
        };
    }
protected function _propertyExtractor ( $ callback ) { if ( ! is_string ( $ callback ) ) { return $ callback ; } $ path = explode ( '.' , $ callback ) ; if ( strpos ( $ callback , '{*}' ) !== false ) { return function ( $ element ) use ( $ path ) { return $ this -> _extract ( $ element , $ path ) ; } ; } return function ( $ element ) use ( $ path ) { return $ this -> _simpleExtract ( $ element , $ path ) ; } ; }
Returns a callable that can be used to extract a property or column from
an array or object based on a dot separated path.

@param string|callable $callback A dot separated path of column to follow
so that the final one can be returned or a callable that will take care
of doing that.
@return callable
Returns a callable that can be used to extract a property or column from an array or object based on a dot separated path .