protected function createNamespaceMapEntry(string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0)
    {
        $unifiedClassPath = Files::getNormalizedPath($classPath);
        $entryIdentifier = md5($unifiedClassPath . '-' . $mappingType);

        $currentArray = & $this->packageNamespaces;
        foreach (explode('\\', rtrim($namespace, '\\')) as $namespacePart) {
            if (!isset($currentArray[$namespacePart])) {
                $currentArray[$namespacePart] = [];
            }
            $currentArray = & $currentArray[$namespacePart];
        }
        if (!isset($currentArray['_pathData'])) {
            $currentArray['_pathData'] = [];
        }

        $currentArray['_pathData'][$entryIdentifier] = [
            'mappingType' => $mappingType,
            'path' => $unifiedClassPath
        ];
    }
protected function createNamespaceMapEntry(string $namespace, string $classPath, string $mappingType = self::MAPPING_TYPE_PSR0)
    {
        $unifiedClassPath = Files::getNormalizedPath($classPath);
        $entryIdentifier = md5($unifiedClassPath . '-' . $mappingType);

        $currentArray = & $this->packageNamespaces;
        foreach (explode('\\', rtrim($namespace, '\\')) as $namespacePart) {
            if (!isset($currentArray[$namespacePart])) {
                $currentArray[$namespacePart] = [];
            }
            $currentArray = & $currentArray[$namespacePart];
        }
        if (!isset($currentArray['_pathData'])) {
            $currentArray['_pathData'] = [];
        }

        $currentArray['_pathData'][$entryIdentifier] = [
            'mappingType' => $mappingType,
            'path' => $unifiedClassPath
        ];
    }
protected function createNamespaceMapEntry ( string $ namespace , string $ classPath , string $ mappingType = self :: MAPPING_TYPE_PSR0 ) { $ unifiedClassPath = Files :: getNormalizedPath ( $ classPath ) ; $ entryIdentifier = md5 ( $ unifiedClassPath . '-' . $ mappingType ) ; $ currentArray = & $ this -> packageNamespaces ; foreach ( explode ( '\\' , rtrim ( $ namespace , '\\' ) ) as $ namespacePart ) { if ( ! isset ( $ currentArray [ $ namespacePart ] ) ) { $ currentArray [ $ namespacePart ] = [ ] ; } $ currentArray = & $ currentArray [ $ namespacePart ] ; } if ( ! isset ( $ currentArray [ '_pathData' ] ) ) { $ currentArray [ '_pathData' ] = [ ] ; } $ currentArray [ '_pathData' ] [ $ entryIdentifier ] = [ 'mappingType' => $ mappingType , 'path' => $ unifiedClassPath ] ; }
Add a namespace to class path mapping to the class loader for resolving classes.

@param string $namespace A namespace to map to a class path.
@param string $classPath The class path to be mapped.
@param string $mappingType The mapping type for this mapping entry. Currently one of self::MAPPING_TYPE_PSR0 or self::MAPPING_TYPE_PSR4 will work. Defaults to self::MAPPING_TYPE_PSR0
@return void
Add a namespace to class path mapping to the class loader for resolving classes .