1 | <?php |
||
26 | class RouteMatchSpecificationManager |
||
27 | { |
||
28 | /** |
||
29 | * @var CollectionInterface[]|RouteMatchSpecificationInterface[] $specifications |
||
30 | */ |
||
31 | private $specifications; |
||
32 | |||
33 | /** |
||
34 | * @var RouteMatchSpecificationFactory $specifications_factory |
||
35 | */ |
||
36 | private $specifications_factory; |
||
37 | |||
38 | |||
39 | /** |
||
40 | * RouteMatchSpecificationManager constructor. |
||
41 | * |
||
42 | * @param RouteMatchSpecificationCollection $specifications |
||
43 | * @param RouteMatchSpecificationFactory $specifications_factory |
||
44 | */ |
||
45 | public function __construct( |
||
53 | |||
54 | |||
55 | /** |
||
56 | * Perform any early setup required for block editors to functions |
||
57 | * |
||
58 | * @return void |
||
59 | * @throws CollectionLoaderException |
||
60 | * @throws CollectionDetailsException |
||
61 | */ |
||
62 | public function initialize() |
||
66 | |||
67 | |||
68 | /** |
||
69 | * @return CollectionInterface|RouteMatchSpecificationInterface[] |
||
70 | * @throws CollectionLoaderException |
||
71 | * @throws CollectionDetailsException |
||
72 | * @since $VID:$ |
||
73 | */ |
||
74 | private function populateSpecificationCollection() |
||
104 | |||
105 | |||
106 | /** |
||
107 | * Given the FQCN for a RouteMatchSpecification, will return true if the current request matches |
||
108 | * |
||
109 | * @param string $routeMatchSpecificationFqcn fully qualified class name |
||
110 | * @return bool |
||
111 | * @throws InvalidClassException |
||
112 | * @since $VID:$ |
||
113 | */ |
||
114 | public function routeMatchesCurrentRequest($routeMatchSpecificationFqcn) |
||
123 | |||
124 | |||
125 | /** |
||
126 | * Handy method for development that returns |
||
127 | * a list of existing RouteMatchSpecification classes |
||
128 | * matching the current request that can be used to identify it. |
||
129 | * If no matches are returned (or nothing acceptable) |
||
130 | * then create a new one that better matches your requirements. |
||
131 | * |
||
132 | * @return array |
||
133 | * @since $VID:$ |
||
134 | */ |
||
135 | public function findRouteMatchSpecificationsMatchingCurrentRequest() |
||
146 | } |
||
147 |