public function __clone() { parent::__clone(); foreach ($this->arrLegends as $strName => $objLegend) { $this->arrLegends[$strName] = clone $objLegend; $this->arrLegends[$strName]->setPalette($this); } }
/** * Clone all properties as well */ public function __clone() { parent::__clone(); foreach ($this->arrProperties as $strName => $objProperty) { $this->arrProperties[$strName] = clone $objProperty; $this->arrProperties[$strName]->setParent($this); } }