/** * Set the parent and return self. * * @param FilterBuilderWithChildren $parent The new parent. * * @return FilterBuilderWithChildren */ public function setParent(FilterBuilderWithChildren $parent) { if ($this->parent && $this->parent !== $parent) { $this->parent->remove($this); } $this->parent = $parent; $this->parent->add($this); return $this; }
/** * Create a new instance. * * @param array $children The initial children to absorb. * * @throws DcGeneralInvalidArgumentException When invalid children have been passed. */ public function __construct($children = array()) { parent::__construct($children); $this->operation = 'AND'; }