Conditions | 2 |
Paths | 2 |
Total Lines | 26 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | protected function configure() |
||
20 | { |
||
21 | // @Cacheable |
||
22 | $this->bindPriorityInterceptor( |
||
23 | $this->matcher->annotatedWith(Cacheable::class), |
||
24 | $this->matcher->startsWith('onGet'), |
||
25 | [CacheInterceptor::class] |
||
26 | ); |
||
27 | foreach (['onPost', 'onPut', 'onPatch', 'onDelete'] as $starts) { |
||
28 | $this->bindInterceptor( |
||
29 | $this->matcher->annotatedWith(Cacheable::class), |
||
30 | $this->matcher->startsWith($starts), |
||
31 | [CommandInterceptor::class] |
||
32 | ); |
||
33 | $this->bindInterceptor( |
||
34 | $this->matcher->logicalNot( |
||
35 | $this->matcher->annotatedWith(Cacheable::class) |
||
36 | ), |
||
37 | $this->matcher->logicalOr( |
||
38 | $this->matcher->annotatedWith(Purge::class), |
||
39 | $this->matcher->annotatedWith(Refresh::class) |
||
40 | ), |
||
41 | [RefreshInterceptor::class] |
||
42 | ); |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 |