Constant() final public static method

final public static Constant ( $Value ) : ConstantExpression
return ConstantExpression
示例#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 ParseResolvedValue($Value)
 {
     if (is_object($Value)) {
         return Expression::Object($Value);
     } else {
         if (is_array($Value)) {
             return Expression::NewArray(array_map(function ($Value) {
                 return $this->ParseResolvedValue($Value);
             }, $Value));
         } else {
             return Expression::Constant($Value);
         }
     }
 }