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

parseConfinementBlock() protected method

Parses a line which opens or closes a confinement
protected parseConfinementBlock ( string $typoScriptLine, boolean $isOpeningConfinement ) : void
$typoScriptLine string One line of TypoScript code
$isOpeningConfinement boolean Set to TRUE, if an opening confinement is to be parsed and FALSE if it's a closing confinement.
return void
    protected function parseConfinementBlock($typoScriptLine, $isOpeningConfinement)
    {
        if ($isOpeningConfinement) {
            $result = trim(trim(trim($typoScriptLine), '{'));
            array_push($this->currentObjectPathStack, $this->getCurrentObjectPathPrefix() . $result);
        } else {
            if (count($this->currentObjectPathStack) < 1) {
                throw new Fusion\Exception('Unexpected closing confinement without matching opening confinement. Check the number of your curly braces.', 1181575973);
            }
            array_pop($this->currentObjectPathStack);
        }
    }