Neos\Fusion\Core\Parser::parseNamespaceDeclaration PHP Method

parseNamespaceDeclaration() protected method

Parses a namespace declaration and stores the result in the namespace registry.
protected parseNamespaceDeclaration ( string $namespaceDeclaration ) : void
$namespaceDeclaration string The namespace declaration, for example "neos = Neos.Neos"
return void
    protected function parseNamespaceDeclaration($namespaceDeclaration)
    {
        $result = preg_match(self::SPLIT_PATTERN_NAMESPACEDECLARATION, $namespaceDeclaration, $matches);
        if ($result !== 1 || !(isset($matches['alias']) && isset($matches['packageKey']))) {
            throw new Fusion\Exception('Invalid namespace declaration "' . $namespaceDeclaration . '"', 1180547190);
        }
        $namespaceAlias = $matches['alias'];
        $namespacePackageKey = $matches['packageKey'];
        $this->objectTypeNamespaces[$namespaceAlias] = $namespacePackageKey;
    }