title = $title; } public function __toString() { $str = ""; $str .= "hasChilds()) { $class .= " dropdown";} if(strlen($class) > 0 ) $str .= " class='$class'"; $str .= ">"; $hNumber = 1; if($this->isChild) $hNumber = 3; $str .= "" . $this->title . ""; if($this->hasChilds()) { $str .= ""; } $str .= ""; return $str; } }