Пример #1
0
 /**
  * Builds the fields to insert / update in the db
  *
  * @param PC_Obj_Method $function the function/method
  * @param int $class the id of the class the function belongs to
  * @param int $pid the project-id (default = current)
  * @return array all fields
  */
 private function get_fields($function, $class, $pid = PC_Project::CURRENT_ID)
 {
     $params = serialize($function->get_params());
     return array('project_id' => PC_UTils::get_project_id($pid), 'file' => $function->get_file(), 'line' => $function->get_line(), 'class' => $class, 'name' => $function->get_name(), 'abstract' => $function->is_abstract() ? 1 : 0, 'final' => $function->is_final() ? 1 : 0, 'static' => $function->is_static() ? 1 : 0, 'anonymous' => $function->is_anonymous() ? 1 : 0, 'visibility' => $function->get_visibility(), 'return_type' => serialize(array($function->has_return_doc(), $function->get_return_type())), 'throws' => serialize($function->get_throws()), 'params' => $params, 'min_version' => serialize($function->get_version()->get_min()), 'max_version' => serialize($function->get_version()->get_max()));
 }