private function get_call($call, $types) { if ($call->get_class() && $call->get_class() == PC_Obj_Class::UNKNOWN) { $classname = '<i>UNKNOWN</i>'; } else { $classname = $call->get_class(); } $url = PC_URL::get_mod_url('class'); $url->set('name', $classname); $str = ''; if ($classname) { $str .= '<a href="' . $url->to_url() . '">' . $classname . '</a>'; $str .= $call->is_static() ? '::' : '->'; } $func = $types->get_method_or_func($call->get_class(), $call->get_function()); if ($func && $func->get_line()) { $str .= '<a href="' . PC_Utils::get_code_url($func) . '">' . $call->get_function() . '</a>('; } else { $str .= $call->get_function() . '('; } $str .= implode(', ', $call->get_arguments()); $str .= ')'; return $str; }
/** * Builds an URL to the given location * * @param string $classfile the file of the class * @param PC_Obj_Location $loc the location of the item * @return string the URL */ private function get_url($classfile, $loc) { if ($loc->get_line() == 0) { return $loc->get_file(); } if ($loc->get_file() == $classfile) { return '#l' . $loc->get_line(); } return PC_Utils::get_code_url($loc); }