/** * Remove property from parent and datacontainer if set too true * * You should not use the object anymore after removing it! * * @param bool $blnRemoveFromDataContainer * * @return $this */ public function remove($blnRemoveFromDataContainer = false) { $this->objParent->removeProperty($this, $blnRemoveFromDataContainer); if ($this->objParent == $this->objDataContainer) { unset($this->objDataContainer); } unset($this->objParent); return $this; }
/** * Export as array * * @param bool $blnIncludeModifiers * * @return string */ public function asArray($blnIncludeModifiers = false) { /** @var Legend $objIterator */ $arrProperties = parent::asArray(); if (!$blnIncludeModifiers) { return $arrProperties; } $arrModifiers = array_map(function ($item) { return ':' . $item; }, $this->getModifiers()); return array_merge($arrModifiers, $arrProperties); }
/** * @return Property[] */ public function getProperties() { foreach ($this->definition['fields'] as $strName => $arrDefinition) { if (!isset($this->arrProperties[$strName])) { $this->getProperty($strName); } } return parent::getProperties(); }