private function buildExpressionCallback($type, $object, $callback)
    {
        $expression = $this->getExpressionLanguage();
        if (!$expression) {
            throw new \RuntimeException('Unable to process an expression without the ExpressionLanguage component.');
        }

        try {
            $callback = new Expression($callback);
            $expression->compile($callback, [
                'object', $this->getExpressionVar($object),
            ]);

            return $callback;
        } catch (SyntaxError $e) {
            throw new \InvalidArgumentException(sprintf(
                'Callback for type "%s" is an invalid expression',
                $type
            ), $e->getCode(), $e);
        }
    }
private function buildExpressionCallback($type, $object, $callback)
    {
        $expression = $this->getExpressionLanguage();
        if (!$expression) {
            throw new \RuntimeException('Unable to process an expression without the ExpressionLanguage component.');
        }

        try {
            $callback = new Expression($callback);
            $expression->compile($callback, [
                'object', $this->getExpressionVar($object),
            ]);

            return $callback;
        } catch (SyntaxError $e) {
            throw new \InvalidArgumentException(sprintf(
                'Callback for type "%s" is an invalid expression',
                $type
            ), $e->getCode(), $e);
        }
    }
private function buildExpressionCallback ( $ type , $ object , $ callback ) { $ expression = $ this -> getExpressionLanguage ( ) ; if ( ! $ expression ) { throw new \ RuntimeException ( 'Unable to process an expression without the ExpressionLanguage component.' ) ; } try { $ callback = new Expression ( $ callback ) ; $ expression -> compile ( $ callback , [ 'object' , $ this -> getExpressionVar ( $ object ) , ] ) ; return $ callback ; } catch ( SyntaxError $ e ) { throw new \ InvalidArgumentException ( sprintf ( 'Callback for type "%s" is an invalid expression' , $ type ) , $ e -> getCode ( ) , $ e ) ; } }
Processes a string expression into an Expression.

@param string $type
@param mixed  $object
@param string $callback

@return Expression
Processes a string expression into an Expression .