WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\Jetpack\Autoloader

AutoloadProcessor::processClassmap() public WC 1.0

Processes the classmap autoloads into a relative path format including the version for each file.

{} Это метод класса: AutoloadProcessor{}

Хуков нет.

Возвращает

Массив. $processed

Использование

$AutoloadProcessor = new AutoloadProcessor();
$AutoloadProcessor->processClassmap( $autoloads, $scanPsrPackages );
$autoloads(массив) (обязательный)
The autoloads we are processing.
$scanPsrPackages(true|false) (обязательный)
Whether or not PSR packages should be converted to a classmap.

Код AutoloadProcessor::processClassmap() WC 5.4.1

<?php
public function processClassmap( $autoloads, $scanPsrPackages ) {
	// We can't scan PSR packages if we don't actually have any.
	if ( empty( $autoloads['psr-4'] ) ) {
		$scanPsrPackages = false;
	}

	if ( empty( $autoloads['classmap'] ) && ! $scanPsrPackages ) {
		return null;
	}

	$excludedClasses = null;
	if ( ! empty( $autoloads['exclude-from-classmap'] ) ) {
		$excludedClasses = '{(' . implode( '|', $autoloads['exclude-from-classmap'] ) . ')}';
	}

	$processed = array();

	if ( $scanPsrPackages ) {
		foreach ( $autoloads['psr-4'] as $namespace => $sources ) {
			$namespace = empty( $namespace ) ? null : $namespace;

			foreach ( $sources as $source ) {
				$classmap = call_user_func( $this->classmapScanner, $source['path'], $excludedClasses, $namespace );

				foreach ( $classmap as $class => $path ) {
					$processed[ $class ] = array(
						'version' => $source['version'],
						'path'    => call_user_func( $this->pathCodeTransformer, $path ),
					);
				}
			}
		}
	}

	/*
	 * PSR-0 namespaces are converted to classmaps for both optimized and unoptimized autoloaders because any new
	 * development should use classmap or PSR-4 autoloading.
	 */
	if ( ! empty( $autoloads['psr-0'] ) ) {
		foreach ( $autoloads['psr-0'] as $namespace => $sources ) {
			$namespace = empty( $namespace ) ? null : $namespace;

			foreach ( $sources as $source ) {
				$classmap = call_user_func( $this->classmapScanner, $source['path'], $excludedClasses, $namespace );
				foreach ( $classmap as $class => $path ) {
					$processed[ $class ] = array(
						'version' => $source['version'],
						'path'    => call_user_func( $this->pathCodeTransformer, $path ),
					);
				}
			}
		}
	}

	if ( ! empty( $autoloads['classmap'] ) ) {
		foreach ( $autoloads['classmap'] as $package ) {
			$classmap = call_user_func( $this->classmapScanner, $package['path'], $excludedClasses, null );

			foreach ( $classmap as $class => $path ) {
				$processed[ $class ] = array(
					'version' => $package['version'],
					'path'    => call_user_func( $this->pathCodeTransformer, $path ),
				);
			}
		}
	}

	return $processed;
}