@@ 254-265 (lines=12) @@ | ||
251 | } |
|
252 | } |
|
253 | ||
254 | if ( 'classmap' === $type && isset( $autoload['classmap'] ) && is_array( $autoload['classmap'] ) ) { |
|
255 | foreach ( $autoload['classmap'] as $paths ) { |
|
256 | $paths = is_array( $paths ) ? $paths : array( $paths ); |
|
257 | foreach ( $paths as $path ) { |
|
258 | $relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path; |
|
259 | $autoloads[] = array( |
|
260 | 'path' => $relativePath, |
|
261 | 'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it? |
|
262 | ); |
|
263 | } |
|
264 | } |
|
265 | } |
|
266 | if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) { |
|
267 | foreach ( $autoload['files'] as $paths ) { |
|
268 | $paths = is_array( $paths ) ? $paths : array( $paths ); |
|
@@ 266-277 (lines=12) @@ | ||
263 | } |
|
264 | } |
|
265 | } |
|
266 | if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) { |
|
267 | foreach ( $autoload['files'] as $paths ) { |
|
268 | $paths = is_array( $paths ) ? $paths : array( $paths ); |
|
269 | foreach ( $paths as $path ) { |
|
270 | $relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path; |
|
271 | $autoloads[ $this->getFileIdentifier( $package, $path ) ] = array( |
|
272 | 'path' => $relativePath, |
|
273 | 'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it? |
|
274 | ); |
|
275 | } |
|
276 | } |
|
277 | } |
|
278 | } |
|
279 | ||
280 | return $autoloads; |