1 | <?php |
||
23 | class CachedAspectLoader extends AspectLoader |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * Path to the cache directory |
||
28 | * |
||
29 | * @var null|string |
||
30 | */ |
||
31 | protected $cacheDir; |
||
32 | |||
33 | /** |
||
34 | * File mode for the cache files |
||
35 | * |
||
36 | * @var integer |
||
37 | */ |
||
38 | protected $cacheFileMode; |
||
39 | |||
40 | /** |
||
41 | * Identifier of original loader |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $loaderId; |
||
46 | |||
47 | /** |
||
48 | * Cached loader constructor |
||
49 | * |
||
50 | * @param AspectContainer $container Instance of container |
||
51 | * @param string $loaderId Original loader identifier |
||
52 | * @param array $options List of kernel options |
||
53 | */ |
||
54 | public function __construct(AspectContainer $container, $loaderId, array $options = []) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function load(Aspect $aspect) |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function registerLoaderExtension(AspectLoaderExtension $loader) |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | public function __get($name) |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Loads pointcuts and advisors from the file |
||
105 | * |
||
106 | * @param string $fileName Name of the file with cache |
||
107 | * |
||
108 | * @return array|Pointcut[]|Advisor[] |
||
109 | */ |
||
110 | protected function loadFromCache($fileName) |
||
117 | |||
118 | /** |
||
119 | * Save pointcuts and advisors to the file |
||
120 | * |
||
121 | * @param array|Pointcut[]|Advisor[] $items List of items to store |
||
122 | * @param string $fileName Name of the file with cache |
||
123 | */ |
||
124 | protected function saveToCache($items, $fileName) |
||
135 | } |
||
136 |