src/CodeGeneration/NamespaceHelper.php
public function getOwningInterfaceFqn(
        string $hasType,
        string $ownedEntityFqn,
        string $projectRootNamespace = null,
        string $srcFolder = AbstractCommand::DEFAULT_SRC_SUBFOLDER
    ): string {
        try {
            $ownedHasName = $this->getOwnedHasName($hasType, $ownedEntityFqn, $srcFolder, $projectRootNamespace);
            if (null === $projectRootNamespace) {
                $projectRootNamespace = $this->getProjectRootNamespaceFromComposerJson($srcFolder);
            }
            list($ownedClassName, , $ownedSubDirectories) = $this->parseFullyQualifiedName(
                $ownedEntityFqn,
                $srcFolder,
                $projectRootNamespace
            );
            $interfaceSubDirectories = \array_slice($ownedSubDirectories, 2);
            $owningInterfaceFqn      = $this->getOwningRelationsRootFqn(
                $projectRootNamespace,
                $interfaceSubDirectories
            );
            $required                = \ts\stringContains($hasType, RelationsGenerator::PREFIX_REQUIRED)
                ? 'Required'
                : '';
            $owningInterfaceFqn      .= '\\' .
                                        $ownedClassName .
                                        '\\Interfaces\\Has' .
                                        $required .
                                        $ownedHasName .
                                        'Interface';

            return $this->tidy($owningInterfaceFqn);
        } catch (\Exception $e) {
            throw new DoctrineStaticMetaException(
                'Exception in ' . __METHOD__ . ': ' . $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
public function getOwningInterfaceFqn(
        string $hasType,
        string $ownedEntityFqn,
        string $projectRootNamespace = null,
        string $srcFolder = AbstractCommand::DEFAULT_SRC_SUBFOLDER
    ): string {
        try {
            $ownedHasName = $this->getOwnedHasName($hasType, $ownedEntityFqn, $srcFolder, $projectRootNamespace);
            if (null === $projectRootNamespace) {
                $projectRootNamespace = $this->getProjectRootNamespaceFromComposerJson($srcFolder);
            }
            list($ownedClassName, , $ownedSubDirectories) = $this->parseFullyQualifiedName(
                $ownedEntityFqn,
                $srcFolder,
                $projectRootNamespace
            );
            $interfaceSubDirectories = \array_slice($ownedSubDirectories, 2);
            $owningInterfaceFqn      = $this->getOwningRelationsRootFqn(
                $projectRootNamespace,
                $interfaceSubDirectories
            );
            $required                = \ts\stringContains($hasType, RelationsGenerator::PREFIX_REQUIRED)
                ? 'Required'
                : '';
            $owningInterfaceFqn      .= '\\' .
                                        $ownedClassName .
                                        '\\Interfaces\\Has' .
                                        $required .
                                        $ownedHasName .
                                        'Interface';

            return $this->tidy($owningInterfaceFqn);
        } catch (\Exception $e) {
            throw new DoctrineStaticMetaException(
                'Exception in ' . __METHOD__ . ': ' . $e->getMessage(),
                $e->getCode(),
                $e
            );
        }
    }
public function getOwningInterfaceFqn ( string $ hasType , string $ ownedEntityFqn , string $ projectRootNamespace = null , string $ srcFolder = AbstractCommand :: DEFAULT_SRC_SUBFOLDER ) : string { try { $ ownedHasName = $ this -> getOwnedHasName ( $ hasType , $ ownedEntityFqn , $ srcFolder , $ projectRootNamespace ) ; if ( null === $ projectRootNamespace ) { $ projectRootNamespace = $ this -> getProjectRootNamespaceFromComposerJson ( $ srcFolder ) ; } list ( $ ownedClassName , , $ ownedSubDirectories ) = $ this -> parseFullyQualifiedName ( $ ownedEntityFqn , $ srcFolder , $ projectRootNamespace ) ; $ interfaceSubDirectories = \ array_slice ( $ ownedSubDirectories , 2 ) ; $ owningInterfaceFqn = $ this -> getOwningRelationsRootFqn ( $ projectRootNamespace , $ interfaceSubDirectories ) ; $ required = \ ts \ stringContains ( $ hasType , RelationsGenerator :: PREFIX_REQUIRED ) ? 'Required' : '' ; $ owningInterfaceFqn .= '\\' . $ ownedClassName . '\\Interfaces\\Has' . $ required . $ ownedHasName . 'Interface' ; return $ this -> tidy ( $ owningInterfaceFqn ) ; } catch ( \ Exception $ e ) { throw new DoctrineStaticMetaException ( 'Exception in ' . __METHOD__ . ': ' . $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Get the Fully Qualified Namespace for the Relation Interface for a specific Entity and hasType

@param string      $hasType
@param string      $ownedEntityFqn
@param string|null $projectRootNamespace
@param string      $srcFolder

@return string
@throws DoctrineStaticMetaException
Get the Fully Qualified Namespace for the Relation Interface for a specific Entity and hasType