/** * Builds a PC_Obj_Method from the given row * * @param array $row the row from db * @return PC_Obj_Method the method */ private function build_func($row) { $c = new PC_Obj_Method($row['file'], $row['line'], $row['class'] == 0, $row['id'], $row['class']); $c->set_name($row['name']); $c->set_visibility($row['visibility']); $c->set_abstract($row['abstract']); $c->set_static($row['static']); $c->set_anonymous($row['anonymous']); $c->set_final($row['final']); $c->get_version()->set(unserialize($row['min_version']), unserialize($row['max_version'])); foreach (unserialize($row['params']) as $param) { $c->put_param($param); } list($hasretdoc, $rettype) = unserialize($row['return_type']); $throws = unserialize($row['throws']); if (is_array($throws)) { foreach ($throws as $class => $type) { $c->add_throw($class, $type); } } $c->set_has_return_doc($hasretdoc); $c->set_return_type($rettype); return $c; }