public function addChild(ECommerceCategory $child) { $this->children[] = $child; $child->setParent($this); }