@@ 124-137 (lines=14) @@ | ||
121 | $relativePath = null; |
|
122 | } |
|
123 | ||
124 | if (isset($composer["autoload"]["psr-0"])) { |
|
125 | $psr0 = $composer["autoload"]["psr-0"]; |
|
126 | foreach ($psr0 as $namespace => $paths) { |
|
127 | if ($relativePath != null) { |
|
128 | if (!is_array($paths)) { |
|
129 | $paths = [$paths]; |
|
130 | } |
|
131 | $paths = array_map(function($path) use ($relativePath) { |
|
132 | return rtrim($relativePath,'\\/').'/'.ltrim($path, '\\/'); |
|
133 | }, $paths); |
|
134 | } |
|
135 | $this->registerPsr0Namespace($namespace, $paths); |
|
136 | } |
|
137 | } |
|
138 | ||
139 | if (isset($composer["autoload"]["psr-4"])) { |
|
140 | $psr4 = $composer["autoload"]["psr-4"]; |
|
@@ 139-152 (lines=14) @@ | ||
136 | } |
|
137 | } |
|
138 | ||
139 | if (isset($composer["autoload"]["psr-4"])) { |
|
140 | $psr4 = $composer["autoload"]["psr-4"]; |
|
141 | ||
142 | foreach ($psr4 as $namespace => $paths) { |
|
143 | if ($relativePath != null) { |
|
144 | if (!is_array($paths)) { |
|
145 | $paths = [$paths]; |
|
146 | } |
|
147 | $paths = array_map(function($path) use ($relativePath) { |
|
148 | return rtrim($relativePath,'\\/').'/'.ltrim($path, '\\/'); |
|
149 | }, $paths); |
|
150 | } |
|
151 | $this->registerPsr4Namespace($namespace, $paths); |
|
152 | } |
|
153 | } |
|
154 | ||
155 | if ($useAutoloadDev) { |
|
@@ 156-169 (lines=14) @@ | ||
153 | } |
|
154 | ||
155 | if ($useAutoloadDev) { |
|
156 | if (isset($composer["autoload-dev"]["psr-0"])) { |
|
157 | $psr0 = $composer["autoload-dev"]["psr-0"]; |
|
158 | foreach ($psr0 as $namespace => $paths) { |
|
159 | if ($relativePath != null) { |
|
160 | if (!is_array($paths)) { |
|
161 | $paths = [$paths]; |
|
162 | } |
|
163 | $paths = array_map(function($path) use ($relativePath) { |
|
164 | return rtrim($relativePath,'\\/').'/'.ltrim($path, '\\/'); |
|
165 | }, $paths); |
|
166 | } |
|
167 | $this->registerPsr0Namespace($namespace, $paths); |
|
168 | } |
|
169 | } |
|
170 | ||
171 | if (isset($composer["autoload-dev"]["psr-4"])) { |
|
172 | $psr4 = $composer["autoload-dev"]["psr-4"]; |
|
@@ 171-184 (lines=14) @@ | ||
168 | } |
|
169 | } |
|
170 | ||
171 | if (isset($composer["autoload-dev"]["psr-4"])) { |
|
172 | $psr4 = $composer["autoload-dev"]["psr-4"]; |
|
173 | foreach ($psr4 as $namespace => $paths) { |
|
174 | if ($relativePath != null) { |
|
175 | if (!is_array($paths)) { |
|
176 | $paths = [$paths]; |
|
177 | } |
|
178 | $paths = array_map(function($path) use ($relativePath) { |
|
179 | return rtrim($relativePath,'\\/').'/'.ltrim($path, '\\/'); |
|
180 | }, $paths); |
|
181 | } |
|
182 | $this->registerPsr4Namespace($namespace, $paths); |
|
183 | } |
|
184 | } |
|
185 | } |
|
186 | ||
187 | return $this; |