public static getDefault ( ) : Pinq\Parsing\IFunctionInterpreter | ||
리턴 | Pinq\Parsing\IFunctionInterpreter |
/** * @dataProvider expressions */ public function testExpressionCompilation($phpCallable, $expectedSql) { // Parse the first statement from callable into an expression tree. $expression = FunctionInterpreter::getDefault()->getStructure(FunctionReflection::fromCallable($phpCallable))->getBodyExpressions()[0]; $compiler = new ExpressionCompiler(new Select($this->pdo, new TableSourceInfo('table'), new ParameterCollection())); $this->assertSame($expectedSql, $compiler->compile($expression), 'PHP Code: ' . $expression->compile()); }
protected function buildFunctionInterpreter() { return Parsing\FunctionInterpreter::getDefault(); }
protected function setUp() { $this->functionInterpreter = Parsing\FunctionInterpreter::getDefault(); }
public function __construct(IFunctionInterpreter $functionInterpreter = null) { $this->functionInterpreter = $functionInterpreter ?: FunctionInterpreter::getDefault(); }
/** * @return IFunctionInterpreter */ protected function functionInterpreter() { return FunctionInterpreter::getDefault(); }
protected function setUp() { $this->interpreter = FunctionInterpreter::getDefault(); }
protected function implementations() { return [Parsing\FunctionInterpreter::getDefault()]; }