/** * 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); }
.dir_method_name{ float:left; width:166px; height:28px; line-height:28px; overflow:hidden; margin-left:15px; display:inline; } </style> <ul class="dir_ul"> <?php if ($arr_docs) { foreach ($arr_docs as $item) { if (false) { $item = new Docs_Class(); } $methods = $item->methods(); $class_url = Docs::url($item->class->name); echo '<li class="dir_class_name"><h2><a href="' . $class_url . '">' . $item->class->name . '</a></h2><ul>'; if ($methods) { foreach ($methods as $m) { if (false) { $m = new Docs_Method(); } echo '<li class="dir_method_name"><a href="' . $class_url . '#' . $m->method->name . '" title="' . $m->method->name . '()">' . $m->method->name . '()</a></li>'; } } echo '</ul><div style="clear:both;"></div></li>'; } } else {
(function (){ var obj = document.getElementById('file_tree_show_div'); obj.onmouseover=function(){show_filetree(true);}; obj.onmouseout=function(){show_filetree(false);}; var obj = document.getElementById('file_tree_show_menu'); obj.onmouseover=function(){show_filetree(true);}; obj.style.display = 'block'; })(); </script> <div class="box_1" id="content"> <h1> <?php if (false) { $doc = new Docs_Class(); } echo $doc->modifiers, $doc->class->name; ?> </h1> <?php $parent = $doc->class; $endtag = ''; $i = 0; while ($parent = $parent->getParentClass()) { if ($i == 0) { echo '<h2 style="margin-top:0;">'; } $filename = str_replace(array('\\', '/'), '_', strtolower($parent->getFileName())); if (preg_match('#_([a-z0-9]+)_' . preg_quote(strtolower($parent->name) . EXT) . '$#', $filename, $m)) { $pdir = $m[1];