Source of file RouterCacheWarmer.php
Size: 1,317 Bytes - Last Modified: 2013-07-17T08:22:21+02:00
/home/theseer/Downloads/Symfony/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/CacheWarmer/RouterCacheWarmer.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 | <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\FrameworkBundle\CacheWarmer; use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; use Symfony\Component\Routing\RouterInterface; /** * Generates the router matcher and generator classes. * * @author Fabien Potencier <fabien@symfony.com> */ class RouterCacheWarmer implements CacheWarmerInterface { protected $router; /** * Constructor. * * @param RouterInterface $router A Router instance */ public function __construct(RouterInterface $router) { $this->router = $router; } /** * Warms up the cache. * * @param string $cacheDir The cache directory */ public function warmUp($cacheDir) { if ($this->router instanceof WarmableInterface) { $this->router->warmUp($cacheDir); } } /** * Checks whether this warmer is optional or not. * * @return Boolean always true */ public function isOptional() { return true; } } |