PageRenderTime 58ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/src/Query/Mysql/Pi.php

https://github.com/beberlei/DoctrineExtensions
PHP | 23 lines | 18 code | 5 blank | 0 comment | 0 complexity | 2c4224796658f90d21868755ebaf742d MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. namespace DoctrineExtensions\Query\Mysql;
  3. use Doctrine\ORM\Query\AST\Functions\FunctionNode;
  4. use Doctrine\ORM\Query\Lexer;
  5. class Pi extends FunctionNode
  6. {
  7. public $arithmeticExpression;
  8. public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
  9. {
  10. return 'PI()';
  11. }
  12. public function parse(\Doctrine\ORM\Query\Parser $parser)
  13. {
  14. $parser->match(Lexer::T_IDENTIFIER);
  15. $parser->match(Lexer::T_OPEN_PARENTHESIS);
  16. $parser->match(Lexer::T_CLOSE_PARENTHESIS);
  17. }
  18. }