BinaryOperation() final public static method

final public static BinaryOperation ( Expression $LeftOperandExpression, $Operator, Expression $RightOperandExpression ) : BinaryOperationExpression
$LeftOperandExpression Expression
$RightOperandExpression Expression
return BinaryOperationExpression
示例#1
0
 public function __construct(Object\PropertyData $PropertyData)
 {
     parent::__construct($PropertyData->GetEntityType());
     foreach ($PropertyData as $PropertyIdentifier => $Value) {
         $Property = $PropertyData->GetProperty($PropertyIdentifier);
         $this->AddPredicate(Expression::BinaryOperation(Expression::Property($Property), Operators\Binary::Identity, Expression::Constant($Value)));
     }
 }
示例#2
0
 private function ParseOperatorNode(\PHPParser_Node_Expr $Node, $NodeType)
 {
     switch (true) {
         case isset(self::$AssignOperatorsMap[$NodeType]):
             return Expression::Assign($this->ParseNodeInternal($Node->var), self::$AssignOperatorsMap[$NodeType], $this->ParseNodeInternal($Node->expr));
         case isset(self::$BinaryOperatorsMap[$NodeType]):
             return Expression::BinaryOperation($this->ParseNodeInternal($Node->left), self::$BinaryOperatorsMap[$NodeType], $this->ParseNodeInternal($Node->right));
         case isset(self::$UnaryOperatorsMap[$NodeType]):
             return Expression::UnaryOperation(self::$UnaryOperatorsMap[$NodeType], $this->ParseNodeInternal($Node->expr));
         case isset(self::$CastOperatorMap[$NodeType]):
             return Expression::Cast(self::$CastOperatorMap[$NodeType], $this->ParseNodeInternal($Node->expr));
         default:
             return null;
     }
 }