/** * @see ArrayAccess * * {@inheritdoc} */ public function offsetSet($offset, $value) { if ($offset === null) { $offset = count($this->children); } $this->valid = null; parent::offsetSet($offset, $value); }