getDefault() публичный статический Метод

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());
 }
Пример #2
0
 protected function buildFunctionInterpreter()
 {
     return Parsing\FunctionInterpreter::getDefault();
 }
Пример #3
0
 protected function setUp()
 {
     $this->functionInterpreter = Parsing\FunctionInterpreter::getDefault();
 }
Пример #4
0
 public function __construct(IFunctionInterpreter $functionInterpreter = null)
 {
     $this->functionInterpreter = $functionInterpreter ?: FunctionInterpreter::getDefault();
 }
Пример #5
0
 /**
  * @return IFunctionInterpreter
  */
 protected function functionInterpreter()
 {
     return FunctionInterpreter::getDefault();
 }
Пример #6
0
 protected function setUp()
 {
     $this->interpreter = FunctionInterpreter::getDefault();
 }
Пример #7
0
 protected function implementations()
 {
     return [Parsing\FunctionInterpreter::getDefault()];
 }