Class Summary HTML_MenuBrowser
Simple filesystem browser that can be used to generated menu (3) hashes based on the directory structure.
Together with menu (3) and the (userland) cache you can use this browser to generate simple fusebox like applications / content systems.
Let the menubrowser scan your document root and generate a menu (3) structure hash which maps the directory structure, pass it to menu's setMethod() and optionally wrap the cache around all this to save script runs. If you do so, it looks like this:
// document root directory define('DOC_ROOT', '/home/server/www.example.com/');
// instantiate the menubrowser $browser = new menubrowser(DOC_ROOT);
// instantiate menu (3) $menu = new menu($browser->getMenu());
// output the sitemap $menu->show('sitemap');
Now, use e.g. simple XML files to store your content and additional menu informations (title!). Subclass exploreFile() depending on your file format.
Class Trees for HTML_MenuBrowser
-
HTML_MenuBrowser
Пред. | HTML_Menu | След. |
constructor HTML_Menu_SigmaTreeRenderer() | PEAR Руководство | constructor HTML_MenuBrowser::HTML_MenuBrowser() |