public function addFunction(ClassFunction $function) { if ($function->getFunctionName()) { $this->functions[$function->getFunctionName()] = $function; } return $this; }