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); }
public function __construct(array $items = [], $operator = self::OP_AND) { parent::__construct($items); $this->operator = $operator; }
/** * 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); }