本文整理汇总了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);
}