Exemplo n.º 1
0
 /**
  * @todo Memory?
  * @param ViewsConfig        $config
  * @param FilesInterface     $files
  * @param ContainerInterface $container
  */
 public function __construct(ViewsConfig $config, FilesInterface $files, ContainerInterface $container)
 {
     $this->config = $config;
     $this->files = $files;
     $this->container = $container;
     $this->loader = new ViewLoader($config->getNamespaces(), $files);
     $this->environment = new ViewEnvironment($config->environmentDependencies(), $config->cacheEnabled(), $config->cacheDirectory(), $container);
 }
Exemplo n.º 2
0
 /**
  * Available namespaces.
  *
  * @return array
  */
 public function getNamespaces()
 {
     return array_keys($this->config->getNamespaces());
 }