Property() final public static method

final public static Property ( Storm\Core\Object\IProperty $Property ) : PropertyExpression
$Property Storm\Core\Object\IProperty
return PropertyExpression
示例#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 ParseNodeAsProperty(\PHPParser_Node_Expr $Node, Property $Property, $MatchedAccessorType)
 {
     if ($MatchedAccessorType === self::PropertiesAreSetters && $Node instanceof \PHPParser_Node_Expr_MethodCall) {
         if (count($Node->args) === 0) {
             throw new ASTException('Cannot method setter property node: expecting 1 argument, 0 given', get_class($Node));
         }
         return Expression::Assign(Expression::Property($Property), Operators\Assignment::Equal, $this->ParseNodeInternal($Node->args[0]));
     } else {
         return Expression::Property($Property);
     }
 }