1 | <?php |
||
20 | class ConfigCache extends BaseConfigCache implements ConfigCacheInterface |
||
21 | { |
||
22 | const TAG_LOCALE = 'config.locale'; |
||
23 | |||
24 | // for createing cache |
||
25 | protected $referableLocales = array(); |
||
26 | // for getting cache |
||
27 | protected $defaultLocale; |
||
28 | protected $currentLocale; |
||
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 14 | public function setReferableLocales(array $locales) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 14 | public function setDefaultLocale($locale) |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 4 | public function setCurrentLocale($currentLocale) |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 6 | public function create() |
|
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | 2 | public function save() |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 1 | public function restore() |
|
96 | |||
97 | /** |
||
98 | * Creates PHP cache file internal processing. |
||
99 | * |
||
100 | * this method has a $locale argument for executing findAll() but no cache. |
||
101 | * |
||
102 | * @param string $locale |
||
103 | * |
||
104 | * @return array |
||
105 | */ |
||
106 | 7 | protected function createInternal($locale = null) |
|
113 | |||
114 | /** |
||
115 | * Finds a doctrine cache ID with locale. |
||
116 | * |
||
117 | * $locale argument has the potential to become null when findAll(). |
||
118 | * |
||
119 | * @param string $locale |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | 10 | protected function findId($locale = null) |
|
137 | |||
138 | /** |
||
139 | * Gets a locale. |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | 5 | protected function getLocale() |
|
147 | } |
||
148 |