2009-01-20 20:07:07 +03:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* To change this template, choose Tools | Templates
|
|
|
|
* and open the template in the editor.
|
|
|
|
*/
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\ORM\Query\AST;
|
|
|
|
|
2009-01-20 20:07:07 +03:00
|
|
|
/**
|
|
|
|
* ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
|
|
|
|
*
|
|
|
|
* @author robo
|
|
|
|
*/
|
2009-01-22 22:38:10 +03:00
|
|
|
class ArithmeticFactor extends Node
|
2009-01-20 20:07:07 +03:00
|
|
|
{
|
|
|
|
private $_arithmeticPrimary;
|
|
|
|
private $_pSigned;
|
|
|
|
private $_nSigned;
|
|
|
|
|
|
|
|
public function __construct($arithmeticPrimary, $pSigned = false, $nSigned = false)
|
|
|
|
{
|
|
|
|
$this->_arithmeticPrimary = $arithmeticPrimary;
|
|
|
|
$this->_pSigned = $pSigned;
|
|
|
|
$this->_nSigned = $nSigned;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getArithmeticPrimary()
|
|
|
|
{
|
|
|
|
return $this->_arithmeticPrimary;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isPositiveSigned()
|
|
|
|
{
|
|
|
|
return $this->_pSigned;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function isNegativeSigned()
|
|
|
|
{
|
|
|
|
return $this->_nSigned;
|
|
|
|
}
|
2009-03-23 20:39:33 +03:00
|
|
|
|
|
|
|
public function dispatch($sqlWalker)
|
|
|
|
{
|
|
|
|
return $sqlWalker->walkArithmeticFactor($this);
|
|
|
|
}
|
2009-02-20 08:46:20 +03:00
|
|
|
}
|