Pinq\Expressions\BinaryOperationExpression::getOperator PHP Метод

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

public getOperator ( ) : string
Результат string The binary operator
    public function getOperator()
    {
        return $this->operator;
    }

Usage Example

 protected function visitBinaryOperation(O\BinaryOperationExpression $expression)
 {
     $operator = $expression->getOperator();
     switch ($operator) {
         case Operators\Binary::INEQUALITY:
             $this->walk(O\Expression::unaryOperation(Operators\Unary::NOT, $expression->update($expression->getLeftOperand(), Operators\Binary::EQUALITY, $expression->getRightOperand())));
             return;
         case Operators\Binary::CONCATENATION:
             $this->sql .= 'CONCAT(';
             $this->walk($expression->getLeftOperand());
             $this->sql .= ', ';
             $this->walk($expression->getRightOperand());
             $this->sql .= ')';
             return;
     }
     if (!isset($this->binaryOperators[$operator])) {
         throw new PinqDemoSqlException("Binary operator not supported: {$operator}");
     }
     $this->sql .= '(';
     $this->walk($expression->getLeftOperand());
     $this->sql .= ' ';
     $this->sql .= $this->binaryOperators[$operator];
     $this->sql .= ' ';
     $this->walk($expression->getRightOperand());
     $this->sql .= ')';
 }
All Usage Examples Of Pinq\Expressions\BinaryOperationExpression::getOperator