HTML_QuickForm
[ class tree: HTML_QuickForm ] [ index: HTML_QuickForm ] [ all elements ]

Source for file Renderer.php

Documentation is available at Renderer.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP version 4.0                                                      |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.0 of the PHP license,       |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Author: Alexey Borzov <borz_off@cs.msu.su>                           |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: Renderer.php,v 1.1 2003/03/08 17:02:07 mansion Exp $
  20.  
  21. /**
  22.  * An abstract base class for QuickForm renderers
  23.  * 
  24.  * The class implements a Visitor design pattern
  25.  *
  26.  * @abstract
  27.  * @author Alexey Borzov <borz_off@cs.msu.su>
  28.  */
  29. {
  30.    /**
  31.     * Constructor
  32.     *
  33.     * @access public
  34.     */
  35.     function HTML_QuickForm_Renderer()
  36.     {
  37.     // end constructor
  38.  
  39.    /**
  40.     * Called when visiting a form, before processing any form elements
  41.     *
  42.     * @param    object    An HTML_QuickForm object being visited
  43.     * @access   public
  44.     * @return   void 
  45.     * @abstract
  46.     */
  47.     function startForm(&$form)
  48.     {
  49.         return;
  50.     // end func startForm
  51.  
  52.    /**
  53.     * Called when visiting a form, after processing all form elements
  54.     * 
  55.     * @param    object     An HTML_QuickForm object being visited
  56.     * @access   public
  57.     * @return   void 
  58.     * @abstract
  59.     */
  60.     function finishForm(&$form)
  61.     {
  62.         return;
  63.     // end func finishForm
  64.  
  65.    /**
  66.     * Called when visiting a header element
  67.     *
  68.     * @param    object     An HTML_QuickForm_header element being visited
  69.     * @access   public
  70.     * @return   void 
  71.     * @abstract
  72.     */
  73.     function renderHeader(&$header)
  74.     {
  75.         return;
  76.     // end func renderHeader
  77.  
  78.    /**
  79.     * Called when visiting an element
  80.     *
  81.     * @param    object     An HTML_QuickForm_element object being visited
  82.     * @param    bool       Whether an element is required
  83.     * @param    string     An error message associated with an element
  84.     * @access   public
  85.     * @return   void 
  86.     * @abstract
  87.     */
  88.     function renderElement(&$element$required$error)
  89.     {
  90.         return;
  91.     // end func renderElement
  92.  
  93.    /**
  94.     * Called when visiting a hidden element
  95.     * 
  96.     * @param    object     An HTML_QuickForm_hidden object being visited
  97.     * @access   public
  98.     * @return   void 
  99.     * @abstract
  100.     */
  101.     function renderHidden(&$element)
  102.     {
  103.         return;
  104.     // end func renderHidden
  105.  
  106.    /**
  107.     * Called when visiting a raw HTML/text pseudo-element
  108.     * 
  109.     * Seems that this should not be used when using a template-based renderer
  110.     *
  111.     * @param    object     An HTML_QuickForm_html element being visited
  112.     * @access   public
  113.     * @return   void 
  114.     * @abstract
  115.     */
  116.     function renderHtml(&$data)
  117.     {
  118.         return;
  119.     // end func renderHtml
  120.  
  121.    /**
  122.     * Called when visiting a group, before processing any group elements
  123.     *
  124.     * @param    object     An HTML_QuickForm_group object being visited
  125.     * @param    bool       Whether a group is required
  126.     * @param    string     An error message associated with a group
  127.     * @access   public
  128.     * @return   void 
  129.     * @abstract
  130.     */
  131.     function startGroup(&$group$required$error)
  132.     {
  133.         return;
  134.     // end func startGroup
  135.  
  136.    /**
  137.     * Called when visiting a group, after processing all group elements
  138.     *
  139.     * @param    object     An HTML_QuickForm_group object being visited
  140.     * @access   public
  141.     * @return   void 
  142.     * @abstract
  143.     */
  144.     function finishGroup(&$group)
  145.     {
  146.         return;
  147.     // end func finishGroup
  148. // end class HTML_QuickForm_Renderer
  149. ?>

Documentation generated on Mon, 11 Mar 2019 14:16:36 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.