home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 June / ENTER.ISO / files / xampp-win32-1.4.5-installer.exe / xampp / generator_custom.php < prev    next >
Encoding:
PHP Script  |  2004-03-24  |  2.8 KB  |  80 lines

  1. <?php
  2. /**
  3.  * How to customize HTML_Progress_Generator usage.
  4.  *
  5.  * @version    $Id: generator_custom.php,v 1.1 2004/02/13 15:46:27 farell Exp $
  6.  * @author     Laurent Laville <pear@laurent-laville.org>
  7.  * @package    HTML_Progress
  8.  */
  9.  
  10. require_once 'HTML/Progress/generator.php';
  11.  
  12. /* 1. Choose between standard renderers (default, HTMLPage, ITDynamic).
  13.       If none is selected, then 'default' will be used.
  14.       It can be automatically loaded and added by the controller
  15.  */
  16. //require_once 'HTML/Progress/generator/default.php';
  17. //require_once 'HTML/Progress/generator/HTMLPage.php';
  18. //require_once 'HTML/Progress/generator/ITDynamic.php';
  19. /*    Or creates your own renderer ...
  20.  */
  21.  
  22. session_start();
  23.  
  24. $tabbed = new HTML_Progress_Generator();
  25.  
  26. /* 2. 'ActionDisplay' is default classname that should exists 
  27.       to manage wizard/tabbed display. But you can also create
  28.       your own class under a new name. Then you've to give 
  29.       the new name to HTML_Progress_Generator.
  30.       For example:
  31.       
  32.       class MyDisplayHandler extends HTML_QuickForm_Action_Display
  33.       {
  34.            ...
  35.       }
  36.       If your 'MyDisplayHandler' class is not defined, then default
  37.       'ActionDisplay' ('HTML/Progress/generator/default.php')
  38.       will be used.
  39.  */
  40. //$tabbed = new HTML_Progress_Generator('PBwizard2',array('display'=>'MyDisplayHandler'));
  41.  
  42. /* 3. 'ActionPreview' is default classname that should exists 
  43.       to run live progress bar demo. But you can also create
  44.       your own class under a new name. Then you've to give 
  45.       the new name to HTML_Progress_Generator.
  46.       For example:
  47.       
  48.       class MyPreviewHandler extends HTML_QuickForm_Action
  49.       {
  50.            ...
  51.       }
  52.       If your 'MyPreviewHandler' class is not defined, then default
  53.       'ActionPreview' ('HTML/Progress/generator/preview.php') 
  54.       will be used.
  55.       
  56.       YES, but why allow to cutomize preview function ?
  57.       PERHARPS, because you want to do something else than just
  58.       run your progress bar new look and feel !
  59.  */
  60. //$tabbed = new HTML_Progress_Generator('PBwizard3',array('preview'=>'MyPreviewHandler'));
  61.  
  62. /* 4. 'ActionProcess' is default classname that should exists 
  63.       to save your progress bar php/css source-code. But you can also create
  64.       your own class under a new name. Then you've to give 
  65.       the new name to HTML_Progress_Generator.
  66.       For example:
  67.       
  68.       class MyProcessHandler extends HTML_QuickForm_Action
  69.       {
  70.            ...
  71.       }
  72.       If your 'MyProcessHandler' class is not defined, then default
  73.       'ActionProcess' ('HTML/Progress/generator/process.php') 
  74.       will be used.
  75.  */
  76. //$tabbed = new HTML_Progress_Generator('PBwizard4',array('process'=>'MyProcessHandler'));
  77.  
  78.  
  79. $tabbed->run();
  80. ?>