/** * link the class or method to the API or return the method name * @param $class * @param $method * * @return string */ protected function linkClass($class, $method = null) { $title = $method ? $method : $class; if (strpos($class, 'Phile\\') === 0) { return $title; } $filename = 'docs/classes/' . str_replace('\\', '.', $class) . '.html'; if (file_exists(Utility::resolveFilePath($filename))) { return $title; } $href = $this->settings['base_url'] . '/' . $filename; if ($method) { $href .= '#method_' . $method; } return $this->tag('a', $title, ['href' => $href, 'target' => '_blank']); }
/** * link the method name to the API or return the method name * @param $class * @param $method * * @return string */ protected function linkClassMethod($class, $method) { if (strpos($class, 'Phile\\') === 0) { $filename = 'docs/classes/' . str_replace('\\', '.', $class) . '.html'; if (file_exists(Utility::resolveFilePath($filename))) { $method = '<a href="' . Utility::getBaseUrl() . '/' . $filename . '#method_' . $method . '" target="_blank">' . $method . '</a>'; } } return $method; }