1 | <?php |
||
12 | class RestlerEnhancer implements DecoratingEnhancerInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var RestlerBuilder |
||
16 | */ |
||
17 | private $restlerBuilder; |
||
18 | |||
19 | public function __construct($configuration) |
||
24 | |||
25 | |||
26 | /** |
||
27 | * Gets pattern that can be used to redecorate (undecorate) |
||
28 | * a potential previously decorated route path. |
||
29 | * |
||
30 | * Example: |
||
31 | * + route path: 'first/second.html' |
||
32 | * + redecoration pattern: '(?:\.html|\.json)$' |
||
33 | * -> 'first/second' might be the redecorated route path after |
||
34 | * applying the redecoration pattern to preg_match/preg_replace |
||
35 | * |
||
36 | * @return string regular expression pattern |
||
37 | */ |
||
38 | public function getRoutePathRedecorationPattern(): string |
||
42 | |||
43 | /** |
||
44 | * Decorates route collection to be processed during URL resolving. |
||
45 | * Executed before invoking routing enhancers. |
||
46 | * |
||
47 | * @param RouteCollection $collection |
||
48 | * @param string $routePath URL path |
||
49 | */ |
||
50 | public function decorateForMatching(RouteCollection $collection, string $routePath): void |
||
63 | |||
64 | /** |
||
65 | * Decorates route collection during URL URL generation. |
||
66 | * Executed before invoking routing enhancers. |
||
67 | * |
||
68 | * @param RouteCollection $collection |
||
69 | * @param array $parameters query parameters |
||
70 | */ |
||
71 | public function decorateForGeneration(RouteCollection $collection, array $parameters): void |
||
74 | |||
75 | /** |
||
76 | * @param AspectInterface[] $aspects |
||
77 | */ |
||
78 | public function setAspects(array $aspects): void |
||
81 | |||
82 | /** |
||
83 | * @return AspectInterface[] |
||
84 | */ |
||
85 | public function getAspects(): array |
||
89 | |||
90 | private function isRestlerUrl($uri): bool |
||
94 | |||
95 | } |
||
96 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.