Kohana_Kostache::factory PHP Method

factory() public static method

public static factory ( )
    public static function factory()
    {
        $m = new Mustache_Engine(array('loader' => new Mustache_Loader_Kohana(), 'partials_loader' => new Mustache_Loader_Kohana('templates/partials'), 'escape' => function ($value) {
            return HTML::chars($value);
        }, 'cache' => Kohana::$cache_dir . DIRECTORY_SEPARATOR . 'mustache'));
        $class = get_called_class();
        return new $class($m);
    }

Usage Example

Beispiel #1
0
 public static function factory($layout = 'layout')
 {
     $k = parent::factory();
     $k->set_layout($layout);
     return $k;
 }