[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/macro/src/ -> lmbMacroTemplateLocator.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 lmbMacroTemplateLocator.

  12   *

  13   * @package macro

  14   * @version $Id$

  15   */
  16  class lmbMacroTemplateLocator
  17  {
  18    protected $config;
  19    protected $templates_dir;
  20  
  21    public function __construct($config)
  22    {
  23      $this->config = $config;
  24      $this->templates_dir = 'templates/';//fix it
  25    }
  26  
  27    public function locateCompiledTemplate($file_name)
  28    {
  29      return $this->config->getCacheDir() . '/' . md5($file_name) . '.php';
  30    }
  31  
  32    public function locateSourceTemplate($file_name)
  33    {    
  34      return $this->templates_dir . '/' . $file_name;
  35    }
  36  
  37    public function readTemplateFile($file_name)
  38    {    
  39      return file_get_contents($file_name, 1);
  40    }
  41  }
  42  ?>


Generated: Fri Aug 29 04:49:26 2008 Cross-referenced by PHPXref 0.7