Exemplo n.º 1
0
 /**
  * Get the name of bridge library which will be used as the driver.
  *
  * @param string $engineName Name of the template engine for which you wish to get the
  *
  * @return string
  */
 private static function getLibrary($engineName)
 {
     $bridges = \Webiny\Component\TemplateEngine\TemplateEngine::getConfig()->get('Bridges', false);
     if (!$bridges) {
         if (!isset(self::$library[$engineName])) {
             return false;
         }
         return self::$library[$engineName];
     }
     return $bridges->get($engineName, false);
 }
Exemplo n.º 2
0
 public function testGetConfig()
 {
     $config = TemplateEngine::getConfig();
     $this->assertSame(__DIR__ . '/temp/cache', $config->get('Engines.Smarty.CacheDir'));
 }