src/CacheWarmer/TwigTemplateCacheWarmer.php
/**
     * Warms up the cache.
     *
     * @param string $cacheDir The cache directory
     *
     * @throws \RuntimeException If setEnvironment() wasn't called
     */
Warms up the cache.
@param string $cacheDir The cache directory

@throws \RuntimeException If setEnvironment() wasn't called
Warms up the cache . @param string $cacheDir The cache directory @throws \ RuntimeException If setEnvironment () wasn ' t called
public function warmUp($cacheDir)
    {
        $iterator = new ResourceFilterIterator(
            new RecursiveResourceIterator(
                new ResourceCollectionIterator(
                    $this->repo->get('/')->listEntries(),
                    ResourceCollectionIterator::CURRENT_AS_PATH
                ),
                RecursiveResourceIterator::SELF_FIRST
            ),
            $this->suffix,
            ResourceFilterIterator::FILTER_BY_NAME | ResourceFilterIterator::MATCH_SUFFIX
        );
        foreach ($iterator as $path) {
            try {
                $this->twig->loadTemplate($path);
            } catch (\Twig_Error $e) {
            }
        }
    }
public function warmUp ( $ cacheDir ) { $ iterator = new ResourceFilterIterator ( new RecursiveResourceIterator ( new ResourceCollectionIterator ( $ this -> repo -> get ( '/' ) -> listEntries ( ) , ResourceCollectionIterator :: CURRENT_AS_PATH ) , RecursiveResourceIterator :: SELF_FIRST ) , $ this -> suffix , ResourceFilterIterator :: FILTER_BY_NAME | ResourceFilterIterator :: MATCH_SUFFIX ) ; foreach ( $ iterator as $ path ) { try { $ this -> twig -> loadTemplate ( $ path ) ; } catch ( \ Twig_Error $ e ) { } } }
Warms up the cache.
Warms up the cache .
// Problem during compilation, stop