本文整理匯總了PHP中Docs::show_class方法的典型用法代碼示例。如果您正苦於以下問題:PHP Docs::show_class方法的具體用法?PHP Docs::show_class怎麽用?PHP Docs::show_class使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Docs
的用法示例。
在下文中一共展示了Docs::show_class方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: menu
/**
* Creates an html list of all classes sorted by category (or package if no category)<br>
* [aaa](http://www.baid.com)
* asdf
*
* @return string the html for the menu
*/
public static function menu()
{
$classes = Docs::classes();
foreach ($classes as $class) {
if (isset($classes['kohana_' . $class])) {
// Remove extended classes
unset($classes['kohana_' . $class]);
}
}
ksort($classes);
$menu = array();
$route = Core_Route::get('docs/api');
foreach ($classes as $class) {
$class = Docs_Class::factory($class);
// Test if we should show this class
if (!Docs::show_class($class)) {
continue;
}
$link = HTML::anchor($route->uri(array('class' => $class->class->name)), $class->class->name);
if (isset($class->tags['package'])) {
foreach ($class->tags['package'] as $package) {
if (isset($class->tags['category'])) {
foreach ($class->tags['category'] as $category) {
$menu[$package][$category][] = $link;
}
} else {
$menu[$package]['Base'][] = $link;
}
}
} else {
$menu['[Unknown]']['Base'][] = $link;
}
}
// Sort the packages
ksort($menu);
return View::factory('userguide/api/menu')->bind('menu', $menu);
}