Pinq\Providers\DSL\Compilation\Parameters\ExpressionParameter::__construct PHP Метод

__construct() публичный Метод

public __construct ( Expression $expression, Pinq\Providers\DSL\Compilation\Parameters\IParameterHasher $hasher, Pinq\Queries\Functions\IFunction $function = null, $data = null )
$expression Pinq\Expressions\Expression
$hasher Pinq\Providers\DSL\Compilation\Parameters\IParameterHasher
$function Pinq\Queries\Functions\IFunction
    public function __construct(O\Expression $expression, IParameterHasher $hasher, IFunction $function = null, $data = null)
    {
        parent::__construct($hasher, $data);
        if ($function !== null) {
            $this->contextFactory = $function->getEvaluationContextFactory();
            $this->evaluator = $expression->asEvaluator($this->contextFactory->getEvaluationContext());
        } else {
            $this->evaluator = $expression->asEvaluator();
        }
        $this->data = $data;
    }

Usage Example

 public function __construct(O\Expression $expression, IParameterHasher $hasher, IFunction $function = null, $data = null)
 {
     parent::__construct($expression, $hasher, $function, $data);
     $this->expression = $expression;
 }