예제 #1
0
 /**
  * Gets a DecodaPhpEngine.
  *
  * @return DecodaPhpEngine
  */
 private function getPhpEngine()
 {
     if (null === $this->phpEngine) {
         $this->phpEngine = new PhpEngine();
         foreach ($this->options['templates'] as $template) {
             // Use bundle hierachy
             $paths = $this->locator->locate($template['path'], null, false);
             foreach ($paths as $path) {
                 $this->phpEngine->addPath($path);
             }
         }
         $decoda = new Decoda();
         $defaultPaths = $decoda->getEngine()->getPaths();
         foreach ($defaultPaths as $path) {
             $this->phpEngine->addPath($path);
         }
     }
     return $this->phpEngine;
 }