/** * Add a method definition to the class * * @param object class method object */ function addMethod(CodeGen_PECL_Element_Method $method) { $name = $method->getName(); if (isset($this->functions[$name])) { return PEAR::raiseError("method '{$name}' already exists"); } $this->methods[$name] = $method; return true; }
/** * Add a method to the interface * * @param object */ function addMethod(CodeGen_PECL_Element_Method $method) { $name = $method->getName(); if (isset($this->functions[$name])) { return PEAR::raiseError("method '{$name}' already exists"); } /* TODO if (!$method->isAbstract || !$method->isInterface) { return PEAR::raiseError("an interface method has to be declated both abstract and interface"); } */ $this->methods[$name] = $method; return true; }