Automattic\Jetpack\Autoloader
AutoloadGenerator::writeManifests() private WC 1.0
Writes all of the manifest files to disk.
{} Это метод класса: AutoloadGenerator{}
Хуков нет.
Возвращает
Null. Ничего.
Использование
// private - только в коде основоного (родительского) класса $result = $this->writeManifests( $outDir, $processedAutoloads );
- $outDir(строка) (обязательный)
- The directory to write to.
- $processedAutoloads(массив) (обязательный)
- The processed autoloads.
Код AutoloadGenerator::writeManifests() AutoloadGenerator::writeManifests WC 5.0.0
private function writeManifests( $outDir, $processedAutoloads ) {
$this->io->writeError( "<info>Generating jetpack autoloader manifests ($outDir)</info>" );
$manifestFiles = array(
'classmap' => 'jetpack_autoload_classmap.php',
'psr-4' => 'jetpack_autoload_psr4.php',
'files' => 'jetpack_autoload_filemap.php',
);
foreach ( $manifestFiles as $key => $file ) {
// Make sure the file doesn't exist so it isn't there if we don't write it.
$this->filesystem->remove( $outDir . '/' . $file );
if ( empty( $processedAutoloads[ $key ] ) ) {
continue;
}
$content = ManifestGenerator::buildManifest( $key, $file, $processedAutoloads[ $key ] );
if ( empty( $content ) ) {
continue;
}
if ( file_put_contents( $outDir . '/' . $file, $content ) ) {
$this->io->writeError( " <info>Generated: $file</info>" );
} else {
$this->io->writeError( " <error>Error: $file</error>" );
}
}
}