Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function compile(string $url): array |
||
35 | { |
||
36 | $parameters = $this->parseUrlFragments($url); |
||
37 | |||
38 | $dynamicParameters = array_filter($parameters, function ($parameter) { |
||
39 | |||
40 | // Determine wheter the parameter is dynamic on parser |
||
41 | // and should be kept. |
||
42 | return $this->parser->isParameterDynamic($parameter); |
||
43 | }); |
||
44 | |||
45 | return array_flatten(array_map(function ($parameter) { |
||
46 | |||
47 | // Return the matches for the dynamic parameter. |
||
48 | return $this->parser->getMatches($parameter); |
||
49 | }, $dynamicParameters)); |
||
50 | } |
||
63 |