| 1 | <?php |
||
| 9 | final class RouterCacheWarmer implements CacheWarmerInterface |
||
| 10 | { |
||
| 11 | const CACHE_DIR = 'rpc'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var MethodMatcher |
||
| 15 | */ |
||
| 16 | private $router; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Constructor. |
||
| 20 | * |
||
| 21 | * @param MethodMatcher $router A Router instance |
||
| 22 | */ |
||
| 23 | 1 | public function __construct(MethodMatcher $router) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Warms up the cache. |
||
| 30 | * |
||
| 31 | * @param string $cacheDir The cache directory |
||
| 32 | */ |
||
| 33 | public function warmUp($cacheDir) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Checks whether this warmer is optional or not. |
||
| 42 | * |
||
| 43 | * @return bool always true |
||
| 44 | */ |
||
| 45 | 1 | public function isOptional() |
|
| 49 | } |
||
| 50 |