示例#1
0
 /**
  * The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
  *
  * @param bool $addToReference Should the instance be added into the reference.
  */
 public function __construct($addToReference = true)
 {
     parent::__construct();
     if ($addToReference) {
         Model::getContainer()->set('template', $this);
     }
     $this->setCacheDirectory(FRONTEND_CACHE_PATH . '/CachedTemplates');
     $this->setCompileDirectory(FRONTEND_CACHE_PATH . '/CompiledTemplates');
     $this->setForceCompile(Model::getContainer()->getParameter('kernel.debug'));
     $this->mapCustomModifiers();
 }
示例#2
0
 /**
  * The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
  *
  * @param bool[optional] $addToReference Should the instance be added into the reference.
  */
 public function __construct($addToReference = true)
 {
     parent::__construct();
     if ($addToReference) {
         Spoon::set('template', $this);
     }
     $this->setCacheDirectory(FRONTEND_CACHE_PATH . '/cached_templates');
     $this->setCompileDirectory(FRONTEND_CACHE_PATH . '/compiled_templates');
     $this->setForceCompile(SPOON_DEBUG);
     $this->mapCustomModifiers();
 }
示例#3
0
 /**
  * Class constructor
  * The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
  *
  * @return	void
  * @param	bool[optional] $addToReference	Should the instance be added into the reference.
  */
 public function __construct($addToReference = true)
 {
     // parent constructor
     parent::__construct();
     // store in reference so we can access it from everywhere
     if ($addToReference) {
         Spoon::set('template', $this);
     }
     // set cache directory
     $this->setCacheDirectory(FRONTEND_CACHE_PATH . '/cached_templates');
     // set compile directory
     $this->setCompileDirectory(FRONTEND_CACHE_PATH . '/compiled_templates');
     // when debugging the template should be recompiled every time
     $this->setForceCompile(SPOON_DEBUG);
     // map custom modifiers
     $this->mapCustomModifiers();
 }
示例#4
0
 /**
  * The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
  *
  * @param bool[optional] $addToReference Should the instance be added into the reference.
  */
 public function __construct($addToReference = true)
 {
     parent::__construct();
     // get URL instance
     if (Spoon::exists('url')) {
         $this->URL = Spoon::get('url');
     }
     // store in reference so we can access it from everywhere
     if ($addToReference) {
         Spoon::set('template', $this);
     }
     // set cache directory
     $this->setCacheDirectory(BACKEND_CACHE_PATH . '/cached_templates');
     // set compile directory
     $this->setCompileDirectory(BACKEND_CACHE_PATH . '/compiled_templates');
     // when debugging, the template should be recompiled every time
     $this->setForceCompile(SPOON_DEBUG);
     // map custom modifiers
     $this->mapCustomModifiers();
     // parse authentication levels
     $this->parseAuthentication();
 }
示例#5
0
 /**
  * The constructor will store the instance in the reference, preset some settings and map the custom modifiers.
  *
  * @param bool $addToReference Should the instance be added into the reference.
  */
 public function __construct($addToReference = true)
 {
     parent::__construct();
     // get URL instance
     if (Model::getContainer()->has('url')) {
         $this->URL = Model::get('url');
     }
     // store in reference so we can access it from everywhere
     if ($addToReference) {
         Model::getContainer()->set('template', $this);
     }
     // set cache directory
     $this->setCacheDirectory(BACKEND_CACHE_PATH . '/CachedTemplates');
     // set compile directory
     $this->setCompileDirectory(BACKEND_CACHE_PATH . '/CompiledTemplates');
     // when debugging, the template should be recompiled every time
     $this->setForceCompile(Model::getContainer()->getParameter('kernel.debug'));
     // map custom modifiers
     $this->mapCustomModifiers();
     // parse authentication levels
     $this->parseAuthentication();
 }