1 | <?php |
||
24 | class CachedAspectLoader extends AspectLoader |
||
25 | { |
||
26 | |||
27 | /** |
||
28 | * Path to the cache directory |
||
29 | * |
||
30 | * @var null|string |
||
31 | */ |
||
32 | protected $cacheDir; |
||
33 | |||
34 | /** |
||
35 | * File mode for the cache files |
||
36 | * |
||
37 | * @var integer |
||
38 | */ |
||
39 | protected $cacheFileMode; |
||
40 | |||
41 | /** |
||
42 | * Identifier of original loader |
||
43 | */ |
||
44 | protected $loaderId; |
||
45 | |||
46 | /** |
||
47 | * Cached loader constructor |
||
48 | * |
||
49 | * @param array $options List of kernel options |
||
50 | */ |
||
51 | 1 | public function __construct(AspectContainer $container, string $loaderId, array $options = []) |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function load(Aspect $aspect): array |
|
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function registerLoaderExtension(AspectLoaderExtension $loader): void |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | 1 | public function __get($name) |
|
98 | |||
99 | |||
100 | /** |
||
101 | * Loads pointcuts and advisors from the file |
||
102 | * |
||
103 | * @return Pointcut[]|Advisor[] |
||
104 | */ |
||
105 | protected function loadFromCache(string $fileName): array |
||
112 | |||
113 | /** |
||
114 | * Save pointcuts and advisors to the file |
||
115 | * |
||
116 | * @param Pointcut[]|Advisor[] $items List of items to store |
||
117 | */ |
||
118 | 1 | protected function saveToCache(array $items, string $fileName): void |
|
129 | } |
||
130 |