home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / HTML / Menu / Renderer.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  2.5 KB  |  107 lines

  1. <?php
  2. /**
  3.  * Abstract base class for HTML_Menu renderers
  4.  * 
  5.  * PHP versions 4 and 5
  6.  *
  7.  * LICENSE: This source file is subject to version 3.01 of the PHP license
  8.  * that is available through the world-wide-web at the following URI:
  9.  * http://www.php.net/license/3_01.txt If you did not receive a copy of
  10.  * the PHP License and are unable to obtain it through the web, please
  11.  * send a note to license@php.net so we can mail you a copy immediately.
  12.  *
  13.  * @category    HTML
  14.  * @package     HTML_Menu
  15.  * @author      Alexey Borzov <avb@php.net>
  16.  * @copyright   2001-2007 The PHP Group
  17.  * @license     http://www.php.net/license/3_01.txt PHP License 3.01
  18.  * @version     CVS: $Id: Renderer.php,v 1.5 2007/05/18 20:54:33 avb Exp $
  19.  * @link        http://pear.php.net/package/HTML_Menu
  20.  */
  21.  
  22. /**
  23.  * Abstract base class for HTML_Menu renderers
  24.  *
  25.  * @category    HTML
  26.  * @package     HTML_Menu
  27.  * @author      Alexey Borzov <avb@php.net>
  28.  * @version     Release: 2.1.4
  29.  * @abstract
  30.  */
  31. class HTML_Menu_Renderer
  32. {
  33.    /**
  34.     * Type of the menu being rendered
  35.     * @var string
  36.     * @access private
  37.     */
  38.     var $_menuType;
  39.  
  40.    /**
  41.     * Sets the type of the menu being rendered.
  42.     *
  43.     * This method will throw an error if the renderer is not designed
  44.     * to render a specific menu type.
  45.     *
  46.     * @access public
  47.     * @param  string menu type
  48.     * @throws PEAR_Error
  49.     */
  50.     function setMenuType($menuType)
  51.     {
  52.         $this->_menuType = $menuType;
  53.     }
  54.  
  55.  
  56.    /**
  57.     * Finish the menu
  58.     *
  59.     * @access public
  60.     * @param  int    current depth in the tree structure
  61.     * @abstract
  62.     */
  63.     function finishMenu($level)
  64.     {
  65.     }
  66.  
  67.  
  68.    /**
  69.     * Finish the tree level (for types 'tree' and 'sitemap')
  70.     *  
  71.     * @access public
  72.     * @param  int    current depth in the tree structure
  73.     * @abstract
  74.     */
  75.     function finishLevel($level)
  76.     {
  77.     }
  78.  
  79.  
  80.    /**
  81.     * Finish the row in the menu
  82.     *
  83.     * @access public
  84.     * @param  int    current depth in the tree structure
  85.     * @abstract
  86.     */
  87.     function finishRow($level)
  88.     {
  89.     }
  90.  
  91.  
  92.    /**
  93.     * Renders the element of the menu
  94.     *
  95.     * @access public
  96.     * @param array   Element being rendered
  97.     * @param int     Current depth in the tree structure
  98.     * @param int     Type of the element (one of HTML_MENU_ENTRY_* constants)
  99.     * @abstract
  100.     */
  101.     function renderEntry($node, $level, $type)
  102.     {
  103.     }
  104. }
  105.  
  106. ?>
  107.