public function addAttrCondition($attr) {
        if(!isset($this->_subscription->subject)){
            $this->_subscription->subject = (object) [];
        }

        if(!isset($this->_subscription->subject->condition)){
            $this->_subscription->subject->condition = (object) [];
        }

        if (!isset($this->_subscription->subject->condition->attrs)) {
            $this->_subscription->subject->condition->attrs = [];
        }
        array_push($this->_subscription->subject->condition->attrs, $attr);
        return $this;
    }
public function addAttrCondition($attr) {
        if(!isset($this->_subscription->subject)){
            $this->_subscription->subject = (object) [];
        }

        if(!isset($this->_subscription->subject->condition)){
            $this->_subscription->subject->condition = (object) [];
        }

        if (!isset($this->_subscription->subject->condition->attrs)) {
            $this->_subscription->subject->condition->attrs = [];
        }
        array_push($this->_subscription->subject->condition->attrs, $attr);
        return $this;
    }
public function addAttrCondition ( $ attr ) { if ( ! isset ( $ this -> _subscription -> subject ) ) { $ this -> _subscription -> subject = ( object ) [ ] ; } if ( ! isset ( $ this -> _subscription -> subject -> condition ) ) { $ this -> _subscription -> subject -> condition = ( object ) [ ] ; } if ( ! isset ( $ this -> _subscription -> subject -> condition -> attrs ) ) { $ this -> _subscription -> subject -> condition -> attrs = [ ] ; } array_push ( $ this -> _subscription -> subject -> condition -> attrs , $ attr ) ; return $ this ; }
Add a Attr to subject.condition.attr

"The conditions element defines the "trigger" for the subscription.
The  attrs field contains a list of attribute names.
These names define the "triggering attributes",
i.e. attributes that upon creation/change due to entity creation or
update trigger the notification."

"The rule is that if at least one of the attributes in the conditions.attrs
list changes (e.g. some kind of "OR" condition), then a notification is sent. "

"You can leave conditions.attrs empty to make a notification trigger on
any entity attribute change (regardless of the name of the attribute)."

"You can include filtering expressions in conditions.
For example, to get notified not only if pressure changes,
but if it changes within the range 700-800.
This is an advanced topic, see the "Subscriptions" section in the NGSIv2 specification.
[http://telefonicaid.github.io/fiware-orion/api/v2/stable/]"

@param string $id
@param string $type
@return \Orion\Context\Subscription
Add a Attr to subject . condition . attr