aliroBasicHTML.php

Go to the documentation of this file.
00001 <?php
00002 
00003 // Useful HTML class for user side components
00004 
00005 class aliroBasicHTML extends aliroFriendlyBase  {
00006     protected $controller = null;
00007     protected $translations = array();
00008     protected $pageNav = null;
00009     protected $option = '';
00010     protected $optionline = '';
00011     protected $optionurl = '';
00012     protected $formstamp;
00013 
00014     public function __construct ($controller) {
00015         $this->controller = $controller;
00016         $this->pageNav = $controller->pageNav;
00017         $this->option = $this->getOption();
00018         $this->optionline = "<input type='hidden' name='option' value='$this->option' />";
00019         $this->optionurl = 'index.php?option='.$this->option;
00020         $this->formstamp = $this->makeFormStamp();
00021     }
00022 
00023     protected function T_ ($string) {
00024         if (isset($this->translations[$string])) return $this->translations[$string];
00025         trigger_error(sprintf(T_('No translation %s for %s'),get_class($this),$string));
00026         return $string;
00027     }
00028 
00029     protected function show ($string) {
00030         return $string;
00031     }
00032     
00033     protected function checkedIfTrue ($bool) {
00034         return $bool ? 'checked="checked"' : '';
00035     }
00036 
00037     protected function html () {
00038         $args = func_get_args();
00039         $method = array_shift($args);
00040         $html = call_user_func(array('aliroHTML', 'getInstance'));
00041         return call_user_func_array(array($html, $method), $args);
00042     }
00043 
00044 }

Generated on Wed May 14 13:01:55 2008 for ALIRO by  doxygen 1.5.5