protected function buildSubNamespace($unifiedSubNamespace, array $editionClassDescriptions, array $backwardsCompatibilityMap)
    {
        $unifiedSubNamespacePath = $this->createUnifiedNamespaceSubDirectory($unifiedSubNamespace);

        foreach ($editionClassDescriptions as $editionClassDescription) {
            $filePath = $unifiedSubNamespacePath . '/' . $editionClassDescription['shortUnifiedClassName'] . '.php';
            $fullyQualifiedUnifiedClass = '\\' . trim($unifiedSubNamespace . '\\' . $editionClassDescription['shortUnifiedClassName'], '\\');

            $backwardsCompatibleClass = null;
            $backwardsCompatibilityMapIndex = trim($fullyQualifiedUnifiedClass, '\\');
            if (array_key_exists($backwardsCompatibilityMapIndex, $backwardsCompatibilityMap)) {
                $backwardsCompatibleClass = $backwardsCompatibilityMap[$backwardsCompatibilityMapIndex];
            }

            $content = $this->renderContent(
                $unifiedSubNamespace,
                $editionClassDescription,
                $fullyQualifiedUnifiedClass,
                $backwardsCompatibleClass
            );

            $this->writeFile($filePath, $content);
        }
    }
protected function buildSubNamespace($unifiedSubNamespace, array $editionClassDescriptions, array $backwardsCompatibilityMap)
    {
        $unifiedSubNamespacePath = $this->createUnifiedNamespaceSubDirectory($unifiedSubNamespace);

        foreach ($editionClassDescriptions as $editionClassDescription) {
            $filePath = $unifiedSubNamespacePath . '/' . $editionClassDescription['shortUnifiedClassName'] . '.php';
            $fullyQualifiedUnifiedClass = '\\' . trim($unifiedSubNamespace . '\\' . $editionClassDescription['shortUnifiedClassName'], '\\');

            $backwardsCompatibleClass = null;
            $backwardsCompatibilityMapIndex = trim($fullyQualifiedUnifiedClass, '\\');
            if (array_key_exists($backwardsCompatibilityMapIndex, $backwardsCompatibilityMap)) {
                $backwardsCompatibleClass = $backwardsCompatibilityMap[$backwardsCompatibilityMapIndex];
            }

            $content = $this->renderContent(
                $unifiedSubNamespace,
                $editionClassDescription,
                $fullyQualifiedUnifiedClass,
                $backwardsCompatibleClass
            );

            $this->writeFile($filePath, $content);
        }
    }
protected function buildSubNamespace ( $ unifiedSubNamespace , array $ editionClassDescriptions , array $ backwardsCompatibilityMap ) { $ unifiedSubNamespacePath = $ this -> createUnifiedNamespaceSubDirectory ( $ unifiedSubNamespace ) ; foreach ( $ editionClassDescriptions as $ editionClassDescription ) { $ filePath = $ unifiedSubNamespacePath . '/' . $ editionClassDescription [ 'shortUnifiedClassName' ] . '.php' ; $ fullyQualifiedUnifiedClass = '\\' . trim ( $ unifiedSubNamespace . '\\' . $ editionClassDescription [ 'shortUnifiedClassName' ] , '\\' ) ; $ backwardsCompatibleClass = null ; $ backwardsCompatibilityMapIndex = trim ( $ fullyQualifiedUnifiedClass , '\\' ) ; if ( array_key_exists ( $ backwardsCompatibilityMapIndex , $ backwardsCompatibilityMap ) ) { $ backwardsCompatibleClass = $ backwardsCompatibilityMap [ $ backwardsCompatibilityMapIndex ] ; } $ content = $ this -> renderContent ( $ unifiedSubNamespace , $ editionClassDescription , $ fullyQualifiedUnifiedClass , $ backwardsCompatibleClass ) ; $ this -> writeFile ( $ filePath , $ content ) ; } }
Delegate rendering of the contents and writing the class files for a given sub-namespace

@param string $unifiedSubNamespace       A given unified sub-namespace
@param array  $editionClassDescriptions  Holds all corresponding edition class descriptions
@param array  $backwardsCompatibilityMap A map of backwards compatible classes to classes in the unified namespace

@throws \Exception
Delegate rendering of the contents and writing the class files for a given sub - namespace