[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/view/src/ -> lmbPHPView.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  
  10  /**

  11   * class lmbPHPView.

  12   *

  13   * @package view

  14   * @version $Id$

  15   */
  16  class lmbPHPView
  17  {
  18    protected $file;
  19    protected $vars = array();
  20  
  21    function __construct($file)
  22    {
  23      $this->file = $file;
  24    }
  25  
  26    function set($name, $value)
  27    {
  28      $this->vars[$name] = $value;
  29    }
  30  
  31    function out()
  32    {
  33      extract($this->vars);
  34      ob_start();
  35      include($this->file);
  36      $res = ob_get_contents();
  37      ob_end_clean();
  38      return $res;
  39    }
  40  }
  41  ?>


Generated: Tue Oct 7 05:02:03 2008 Cross-referenced by PHPXref 0.7