Pinq\Expressions\Expression::compileDebug PHP Method

compileDebug() final public method

Compiles the expression tree into debug code.
final public compileDebug ( ) : string
return string
    public final function compileDebug()
    {
        return (new DynamicExpressionWalker([ValueExpression::getType() => function (ValueExpression $expression) {
            $value = $expression->getValue();
            return !is_scalar($value) && $value !== null ? Expression::constant('{' . Utilities::getTypeOrClass($expression->getValue()) . '}') : $expression;
        }]))->walk($this)->compile();
    }

Usage Example

コード例 #1
0
ファイル: MixedType.php プロジェクト: timetoogo/pinq
 protected function unsupported(O\Expression $expression, $message, array $formatValues = [])
 {
     return new TypeException('Type %s does not support expression \'%s\': %s', $this->identifier, $expression->compileDebug(), vsprintf($message, $formatValues));
 }