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

parseTypoScriptLine() protected method

Parses one line of TypoScript
protected parseTypoScriptLine ( string $typoScriptLine ) : void
$typoScriptLine string One line of TypoScript code
return void
    protected function parseTypoScriptLine($typoScriptLine)
    {
        $typoScriptLine = trim($typoScriptLine);
        if ($this->currentBlockCommentState === true) {
            $this->parseComment($typoScriptLine);
        } else {
            if ($typoScriptLine === '') {
                return;
            } elseif (preg_match(self::SCAN_PATTERN_COMMENT, $typoScriptLine)) {
                $this->parseComment($typoScriptLine);
            } elseif (preg_match(self::SCAN_PATTERN_OPENINGCONFINEMENT, $typoScriptLine)) {
                $this->parseConfinementBlock($typoScriptLine, true);
            } elseif (preg_match(self::SCAN_PATTERN_CLOSINGCONFINEMENT, $typoScriptLine)) {
                $this->parseConfinementBlock($typoScriptLine, false);
            } elseif (preg_match(self::SCAN_PATTERN_DECLARATION, $typoScriptLine)) {
                $this->parseDeclaration($typoScriptLine);
            } elseif (preg_match(self::SCAN_PATTERN_OBJECTDEFINITION, $typoScriptLine)) {
                $this->parseObjectDefinition($typoScriptLine);
            } else {
                throw new Fusion\Exception('Syntax error in line ' . $this->currentLineNumber . '. (' . $typoScriptLine . ')', 1180547966);
            }
        }
    }