Example #1
0
 public function __construct($attribute_path, Comparison $first, Comparison $second = null)
 {
     $this->attribute_path = $attribute_path;
     $items = [$first];
     if (!is_null($second)) {
         $items[] = $second;
     }
     parent::__construct($items);
 }
Example #2
0
 public function __construct(array $items = [], $operator = self::OP_AND)
 {
     parent::__construct($items);
     $this->operator = $operator;
 }
Example #3
0
 /**
  * Propagates a given collection-changed event to all attached collection-changed listeners.
  *
  * @param CollectionChangedEvent $event
  */
 protected function propagateCollectionChangedEvent(CollectionChangedEvent $event)
 {
     if ($event->getType() === CollectionChangedEvent::ITEM_REMOVED) {
         $event->getItem()->removeEntityChangedListener($this);
     } else {
         $event->getItem()->addEntityChangedListener($this);
     }
     parent::propagateCollectionChangedEvent($event);
 }