Example #1
0
 /**
  * Process compiled source using Stempler post-processors.
  *
  * @param string $source
  * @param string $path
  * @param string $compiledFilename
  * @return string
  */
 protected function processSource($source, $path, $compiledFilename = null)
 {
     foreach ($this->getProcessors() as $processor) {
         $benchmark = $this->benchmark('process', get_class($processor) . '-{' . $path);
         try {
             $source = $processor->process($source, $this->loader->viewNamespace($path), $this->loader->viewName($path), $compiledFilename);
         } finally {
             $this->benchmark($benchmark);
         }
     }
     return $source;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function get($path)
 {
     return new NativeView($this->loader->localFilename($path), $this->loader->viewNamespace($path), $this->loader->viewName($path), $this->container);
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function viewName($path)
 {
     return $this->loader->viewName($path);
 }