| @@ 23-32 (lines=10) @@ | ||
| 20 | * @param string $warmerName | |
| 21 | * @return Definition | |
| 22 | */ | |
| 23 | private function createBundleCacheWarmer($warmerName) | |
| 24 |     { | |
| 25 | $definition = new Definition( | |
| 26 |             Utility::getBundleClass('CacheWarmer\MetadataWarmer'), | |
| 27 | [new Reference($warmerName)] | |
| 28 | ); | |
| 29 | $definition->setPublic(false); | |
| 30 |         $definition->addTag('kernel.cache_warmer'); | |
| 31 | return $definition; | |
| 32 | } | |
| 33 | ||
| 34 | /** | |
| 35 | * Creates the cache clear command definition. | |
| @@ 40-48 (lines=9) @@ | ||
| 37 | * @param string $warmerName | |
| 38 | * @return Definition | |
| 39 | */ | |
| 40 | private function createCacheClearCommand($warmerName) | |
| 41 |     { | |
| 42 | $definition = new Definition( | |
| 43 |             Utility::getBundleClass('Command\Metadata\ClearCacheCommand'), | |
| 44 | [new Reference($warmerName)] | |
| 45 | ); | |
| 46 |         $definition->addTag('console.command'); | |
| 47 | return $definition; | |
| 48 | } | |
| 49 | ||
| 50 | /** | |
| 51 | * Creates the cache warmer service definition. | |