Source for file Footer.class.php

Documentation is available at Footer.class.php

  1. <?php
  2. /**
  3.  * Gumbo Library Framework
  4.  *
  5.  * LICENSE
  6.  * This library is being released under the terms of the New BSD License.  A
  7.  * copy of the license is packaged with the software (LICENSE.txt).  If no
  8.  * copy is found, a copy of the license template can be found at:
  9.  * http://www.opensource.org/licenses/bsd-license.php
  10.  * 
  11.  * @category Gumbo
  12.  * @package Template
  13.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  14.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  15.  * @author Michael Luster <mluster79@yahoo.com>
  16.  * @link http://sourceforge.net/projects/phpgumbo
  17.  * @version 0.0.1
  18.  */
  19.  
  20. /**
  21.  * Template Footer Class
  22.  *
  23.  * @category Gumbo
  24.  * @package Template
  25.  * @copyright Copyright (c) 2007, iBayou, Michael Luster
  26.  * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
  27.  * @author Michael Luster <mluster79@yahoo.com>
  28.  * @link http://sourceforge.net/projects/phpgumbo
  29.  * @desc Template Footer Class
  30.  * @version 0.0.1
  31.  */
  32.  
  33. gumbo_load ("Template_Special");
  34.  
  35.     
  36.     /** @var Gumbo_Template_Footer $_instance */
  37.     private static $_instance null;
  38.     
  39.     
  40.     
  41.     /**
  42.      * Constructor
  43.      * @uses Gumbo_Template
  44.      */
  45.     private function __construct ({
  46.         $fact new Gumbo_Template ();
  47.         $this->setEngine ($fact->factory ());
  48.         $this->getEngine ()->loadGlobals ();
  49.     }
  50.     
  51.     /**
  52.      * Singleton Method
  53.      * @return Gumbo_Interface_Special_Footer 
  54.      */
  55.     public static function instance ({
  56.         if (self::$_instance == null{
  57.             self::$_instance new Gumbo_Template_Footer ();
  58.         }
  59.         return self::$_instance;
  60.     }
  61.     
  62.     
  63.     
  64.     /** ACTION METHODS **/
  65.     /**
  66.      * Returns the formatted text to the browser
  67.      * @param bool $reload reloads the output
  68.      * @return string 
  69.      */
  70.     public function fetch ($reload=false{
  71.         $this->getEngine ()->setFile ($this->getFile ());
  72.         if (!$this->isActive (&& $this->getFileBasic ()) {
  73.             $this->getEngine ()->setFile ($this->getFileBasic ());
  74.         else {
  75.             return;
  76.         }
  77.         
  78.         // assign the Elements
  79.         foreach ($this->getElements (as $key=>$val{
  80.             $val->loadGlobals (true);
  81.             $this->assign ($key$val);
  82.         }
  83.         
  84.         return $this->getEngine ()->fetch ($reload);
  85.     }
  86.     
  87. }
  88.  
  89. ?>