Esempio n. 1
0
 public function get()
 {
     /*
         Returns the path to the compiled (and/or cached) template.
     With no caching, usage is simple:
       require $outline->get();
     With caching enabled, two passes are required when the template
         output is first cached - this is because insert-commands can not
         be executed in the first pass, since they can not be cached.
     So usage is slightly more complicated:
       if ($outline->cached()) {
             // already cached - only one pass required
             require $outline->get();
           } else {
             // first pass captures to cache and generates code for insert commands:
         		$outline->capture();
         		require $outline->get();
         		$outline->stop();
             // second pass generates the actual template output:
         		require $outline->get();
           }
     */
     self::$engine_stack[] =& $this;
     if (count(self::$engine_stack) == 1 && $this->config['quiet']) {
         self::$error_level = error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING | E_STRICT ^ E_STRICT);
     }
     if ($this->caching && !empty($this->cache) && $this->cache->valid()) {
         return $this->cache->get();
     } else {
         return $this->compiled;
     }
 }