/** Add a method to this class. * * @param MethodDoc method */ function addMethod(MethodDoc $method) { if (isset($this->_methods[$method->name()])) { $phpdoctor = $this->_root->phpdoctor(); echo "\n"; $phpdoctor->warning('Found method ' . $method->name() . ' again, overwriting previous version'); } $this->_methods[$method->name()] = $method; }
/** * Writes method signaturw * * @param text.doclet.MethodDoc method * @param string base * @param io.streams.OutputStream */ protected function writeSignature(MethodDoc $method, $base, OutputStream $stream) { $return = $method->tags('return'); $params = $method->tags('param'); $stream->write(($return ? $this->typeLink($return[0]->type, $base) : 'void') . ' '); $stream->write('<a href="#' . $method->name() . '">' . $method->name() . '</a>('); for ($i = 0, $s = sizeof($params); $i < $s; $i++) { $stream->write($this->typeLink($params[$i]->type, $base) . ' ' . $params[$i]->parameter); $i < $s - 1 && $stream->write(', '); } $stream->write(')'); }