1 | <?php |
||
11 | class LegacyRouteLoader extends Loader |
||
12 | { |
||
13 | /** @var bool */ |
||
14 | private $loaded = false; |
||
15 | |||
16 | /** |
||
17 | * @var \Symfony\Component\Finder\Finder |
||
18 | */ |
||
19 | private $finder; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $legacyPath; |
||
25 | |||
26 | /** |
||
27 | * LegacyRouteLoader constructor. |
||
28 | * |
||
29 | * @param string $legacyPath |
||
30 | * @param \Symfony\Component\Finder\Finder|null $finder |
||
31 | */ |
||
32 | 5 | public function __construct($legacyPath, Finder $finder = null) |
|
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | * @throws \InvalidArgumentException |
||
41 | * @throws \RuntimeException |
||
42 | */ |
||
43 | 2 | public function load($resource, $type = null) |
|
69 | |||
70 | |||
71 | /** {@inheritdoc} */ |
||
72 | 3 | public function supports($resource, $type = null) |
|
76 | |||
77 | /** |
||
78 | * @throws \InvalidArgumentException |
||
79 | */ |
||
80 | 2 | private function initFinder() |
|
87 | /** |
||
88 | * @param SplFileInfo $file |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | 2 | private function createLegacyRouteName(SplFileInfo $file) |
|
101 | } |
||
102 |