WordPress at a glance
function is not described


ManifestGenerator::buildManifest() public WC 1.0

Builds a manifest file for the given autoloader type.

{} It's a method of the class: ManifestGenerator{}

No Hooks.


String|null. $manifestFile


$result = ManifestGenerator::buildManifest( $autoloaderType, $fileName, $content );
$autoloaderType(string) (required)
The type of autoloader to build a manifest for.
$fileName(string) (required)
The filename of the manifest.
$content(array) (required)
The manifest content to generate using.

Code of ManifestGenerator::buildManifest() WC 5.2.2

public static function buildManifest( $autoloaderType, $fileName, $content ) {
	if ( empty( $content ) ) {
		return null;

	switch ( $autoloaderType ) {
		case 'classmap':
		case 'files':
			return self::buildStandardManifest( $fileName, $content );
		case 'psr-4':
			return self::buildPsr4Manifest( $fileName, $content );

	throw new \InvalidArgumentException( 'An invalid manifest type of ' . $autoloaderType . ' was passed!' );