Neos\Fusion\Core\Parser::parseDeclaration PHP Метод

parseDeclaration() защищенный Метод

Parses a parser declaration of the form "declarationtype: declaration".
protected parseDeclaration ( string $typoScriptLine ) : void
$typoScriptLine string One line of TypoScript code
Результат void
    protected function parseDeclaration($typoScriptLine)
    {
        $result = preg_match(self::SPLIT_PATTERN_DECLARATION, $typoScriptLine, $matches);
        if ($result !== 1 || !(isset($matches['declarationType']) && isset($matches['declaration']))) {
            throw new Fusion\Exception('Invalid declaration "' . $typoScriptLine . '"', 1180544656);
        }
        switch ($matches['declarationType']) {
            case 'namespace':
                $this->parseNamespaceDeclaration($matches['declaration']);
                break;
            case 'include':
                $this->parseInclude($matches['declaration']);
                break;
        }
    }