private function factoryCallableCriteria($criteria)
    {
        if (!$this->isCallable($criteria)) {
            $criteria = function ($element, $key) use ($criteria) {
                return $element->fetch($criteria);
            };
        }

        return $criteria;
    }
private function factoryCallableCriteria($criteria)
    {
        if (!$this->isCallable($criteria)) {
            $criteria = function ($element, $key) use ($criteria) {
                return $element->fetch($criteria);
            };
        }

        return $criteria;
    }
private function factoryCallableCriteria ( $ criteria ) { if ( ! $ this -> isCallable ( $ criteria ) ) { $ criteria = function ( $ element , $ key ) use ( $ criteria ) { return $ element -> fetch ( $ criteria ) ; } ; } return $ criteria ; }
Get a function that returns something based on an element item

@mixed $criteria either a callable function that returns a value or a
string that is an element key

@return callable
Get a function that returns something based on an element item