@@ 66-83 (lines=18) @@ | ||
63 | $this->message(' <info>[ OK ]</info>'); |
|
64 | } |
|
65 | ||
66 | protected function installAliases() |
|
67 | { |
|
68 | $this->message('Installing class aliases...', static::FLAG_SPACE_PAD_CONTINUE); |
|
69 | $aliases = []; |
|
70 | foreach ($this->packages as $packageFile => $package) { |
|
71 | foreach ($package as $name => $resources) { |
|
72 | if (empty($resources['class_aliases']) || !is_array($resources['class_aliases'])) { |
|
73 | continue; |
|
74 | } |
|
75 | foreach ($resources['class_aliases'] as $sort => $detectedAliases) { |
|
76 | $aliases[$sort . '-' . $name] = $detectedAliases; |
|
77 | } |
|
78 | } |
|
79 | } |
|
80 | $target = $this->testRootDir . '/vendor/phwoolcon/class_aliases.php'; |
|
81 | fileSaveArray($target, arraySortedMerge($aliases)); |
|
82 | $this->message(' <info>[ OK ]</info>'); |
|
83 | } |
|
84 | ||
85 | protected function installConfig() |
|
86 | { |
|
@@ 104-122 (lines=19) @@ | ||
101 | $this->message(' <info>[ OK ]</info>'); |
|
102 | } |
|
103 | ||
104 | protected function installDi() |
|
105 | { |
|
106 | $this->message('Installing DI...', static::FLAG_SPACE_PAD_CONTINUE); |
|
107 | $diFiles = []; |
|
108 | foreach ($this->packages as $packageFile => $package) { |
|
109 | $path = $package['path']; |
|
110 | foreach ($package as $name => $resources) { |
|
111 | if (empty($resources['di'])) { |
|
112 | continue; |
|
113 | } |
|
114 | foreach ((array)$resources['di'] as $sort => $file) { |
|
115 | $diFiles[$sort][] = $path . '/phwoolcon-package/' . $file; |
|
116 | } |
|
117 | } |
|
118 | } |
|
119 | $target = $this->testRootDir . '/vendor/phwoolcon/di.php'; |
|
120 | fileSaveInclude($target, arraySortedMerge($diFiles)); |
|
121 | $this->message(' <info>[ OK ]</info>'); |
|
122 | } |
|
123 | ||
124 | protected function installLocale() |
|
125 | { |
|
@@ 159-179 (lines=21) @@ | ||
156 | $this->message(' <info>[ OK ]</info>'); |
|
157 | } |
|
158 | ||
159 | protected function installRoutes() |
|
160 | { |
|
161 | $this->message('Installing routes...', static::FLAG_SPACE_PAD_CONTINUE); |
|
162 | $routeFiles = []; |
|
163 | foreach ($this->packages as $packageFile => $package) { |
|
164 | $path = $package['path']; |
|
165 | foreach ($package as $name => $resources) { |
|
166 | if (empty($resources['routes'])) { |
|
167 | continue; |
|
168 | } |
|
169 | // @codeCoverageIgnoreStart |
|
170 | foreach ((array)$resources['routes'] as $sort => $file) { |
|
171 | $routeFiles[$sort][] = $path . '/phwoolcon-package/' . $file; |
|
172 | } |
|
173 | // @codeCoverageIgnoreEnd |
|
174 | } |
|
175 | } |
|
176 | $target = $this->testRootDir . '/vendor/phwoolcon/routes.php'; |
|
177 | fileSaveInclude($target, arraySortedMerge($routeFiles)); |
|
178 | $this->message(' <info>[ OK ]</info>'); |
|
179 | } |
|
180 | ||
181 | protected function installViews() |
|
182 | { |