public function setChildren($children) { $this->o_childs = $children; if (is_array($children) and count($children) > 0) { $this->o_hasChilds = true; } else { $this->o_hasChilds = false; } return $this; }