|
@@ 153-164 (lines=12) @@
|
| 150 |
|
} |
| 151 |
|
} |
| 152 |
|
|
| 153 |
|
if ( 'classmap' === $type && isset( $autoload['classmap'] ) && is_array( $autoload['classmap'] ) ) { |
| 154 |
|
foreach ( $autoload['classmap'] as $paths ) { |
| 155 |
|
$paths = is_array( $paths ) ? $paths : array( $paths ); |
| 156 |
|
foreach ( $paths as $path ) { |
| 157 |
|
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path; |
| 158 |
|
$autoloads[] = array( |
| 159 |
|
'path' => $relativePath, |
| 160 |
|
'version' => $package->getVersion(), // Version of the class comes from the package - should we try to parse it? |
| 161 |
|
); |
| 162 |
|
} |
| 163 |
|
} |
| 164 |
|
} |
| 165 |
|
if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) { |
| 166 |
|
foreach ( $autoload['files'] as $paths ) { |
| 167 |
|
$paths = is_array( $paths ) ? $paths : array( $paths ); |
|
@@ 165-176 (lines=12) @@
|
| 162 |
|
} |
| 163 |
|
} |
| 164 |
|
} |
| 165 |
|
if ( 'files' === $type && isset( $autoload['files'] ) && is_array( $autoload['files'] ) ) { |
| 166 |
|
foreach ( $autoload['files'] as $paths ) { |
| 167 |
|
$paths = is_array( $paths ) ? $paths : array( $paths ); |
| 168 |
|
foreach ( $paths as $path ) { |
| 169 |
|
$relativePath = empty( $installPath ) ? ( empty( $path ) ? '.' : $path ) : $installPath . '/' . $path; |
| 170 |
|
$autoloads[ $this->getFileIdentifier( $package, $path ) ] = array( |
| 171 |
|
'path' => $relativePath, |
| 172 |
|
'version' => $package->getVersion(), // Version of the file comes from the package - should we try to parse it? |
| 173 |
|
); |
| 174 |
|
} |
| 175 |
|
} |
| 176 |
|
} |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
return $autoloads; |