public function __construct($baseDir, array $options = array()) { $this->page_name = isset($options['page']) ? $options['page'] : 'index'; $this->layout_name = isset($options['layout']) ? $options['layout'] : 'default'; $this->baseDir = $baseDir; parent::__construct($baseDir, $options); }
/** * Constructor. * * @param FileLocatorInterface $locator A FileLocatorInterface instance * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance */ public function __construct(FileLocatorInterface $locator, TemplateNameParserInterface $parser) { parent::__construct(array()); $this->locator = $locator; $this->parser = $parser; $this->cache = array(); }
public function __construct($options = array()) { if (isset($options['extension'])) { $this->_extension = ltrim($options['extension'], '.'); } $this->_page_name = isset($options['page']) ? $options['page'] : 'index'; $this->_layout_name = isset($options['layout']) ? $options['layout'] : 'default'; $this->_views_dir = isset($options['aceui_dir']) ? $options['aceui_dir'] . '/views' : APPPATH . '/aceui/views/'; parent::__construct($this->_views_dir, $options); }
/** * Mustache production filesystem Loader constructor. * * Passing an $options array allows overriding certain Loader options during instantiation: * * $options = array( * // The filename extension used for Mustache templates. Defaults to '.mustache' * 'extension' => '.ms', * 'stat_props' => array('size', 'mtime'), * ); * * Specifying 'stat_props' overrides the stat properties used to invalidate the template cache. By default, this * uses 'mtime' and 'size', but this can be set to any of the properties supported by stat(): * * http://php.net/manual/en/function.stat.php * * You can also disable filesystem stat entirely: * * $options = array('stat_props' => null); * * But with great power comes great responsibility. Namely, if you disable stat-based cache invalidation, * YOU MUST CLEAR THE TEMPLATE CACHE YOURSELF when your templates change. Make it part of your build or deploy * process so you don't forget! * * @throws Mustache_Exception_RuntimeException if $baseDir does not exist. * * @param string $baseDir Base directory containing Mustache template files. * @param array $options Array of Loader options (default: array()) */ public function __construct($baseDir, array $options = array()) { parent::__construct($baseDir, $options); if (array_key_exists('stat_props', $options)) { if (empty($options['stat_props'])) { $this->statProps = array(); } else { $this->statProps = $options['stat_props']; } } else { $this->statProps = array('size', 'mtime'); } }
public function __construct($baseDir, $alias = array(), $options = array()) { $this->setAliases($alias); parent::__construct($baseDir, $options); }
public function __construct($baseDir, array $aliases = array()) { parent::__construct($baseDir); $this->setTemplates($aliases); }