1 | <?php |
||
25 | abstract class BaseInvalidateCommand extends Command |
||
26 | { |
||
27 | use ContainerAwareTrait; |
||
28 | |||
29 | /** |
||
30 | * @var CacheManager |
||
31 | */ |
||
32 | private $cacheManager; |
||
33 | |||
34 | /** |
||
35 | * If no cache manager is specified explicitly, fos_http_cache.cache_manager |
||
36 | * is automatically loaded. |
||
37 | * |
||
38 | * @param CacheManager|null $cacheManager The cache manager to talk to |
||
39 | */ |
||
40 | 14 | public function __construct(CacheManager $cacheManager = null) |
|
48 | |||
49 | /** |
||
50 | * Get the configured cache manager, loading fos_http_cache.cache_manager |
||
51 | * from the container if none was specified. |
||
52 | * |
||
53 | * @return CacheManager |
||
54 | */ |
||
55 | 9 | protected function getCacheManager() |
|
63 | |||
64 | /** |
||
65 | * @return ContainerInterface |
||
66 | * |
||
67 | * @throws \LogicException |
||
68 | */ |
||
69 | 1 | protected function getContainer() |
|
82 | } |
||
83 |
If you suppress an error, we recommend checking for the error condition explicitly: