src/Compiler.php
private function findEndingKey($context, $contextValue, &$activeConfig)
    {
        $lines = [];
        $endMultiLine = sprintf($this->endMultiLine, $context);

        while (!empty($activeConfig)) {
            $lineConfig = array_shift($activeConfig);

            if (preg_match($endMultiLine, $lineConfig)) {
                return $this->buildBlockDirective($context, $contextValue, $lines);
            }

            $lines[] = $this->subCompile($activeConfig, $lineConfig);
        }

        throw InvalidConfigException::forEndingKeyNotFound($context);
    }
private function findEndingKey($context, $contextValue, &$activeConfig)
    {
        $lines = [];
        $endMultiLine = sprintf($this->endMultiLine, $context);

        while (!empty($activeConfig)) {
            $lineConfig = array_shift($activeConfig);

            if (preg_match($endMultiLine, $lineConfig)) {
                return $this->buildBlockDirective($context, $contextValue, $lines);
            }

            $lines[] = $this->subCompile($activeConfig, $lineConfig);
        }

        throw InvalidConfigException::forEndingKeyNotFound($context);
    }
private function findEndingKey ( $ context , $ contextValue , & $ activeConfig ) { $ lines = [ ] ; $ endMultiLine = sprintf ( $ this -> endMultiLine , $ context ) ; while ( ! empty ( $ activeConfig ) ) { $ lineConfig = array_shift ( $ activeConfig ) ; if ( preg_match ( $ endMultiLine , $ lineConfig ) ) { return $ this -> buildBlockDirective ( $ context , $ contextValue , $ lines ) ; } $ lines [ ] = $ this -> subCompile ( $ activeConfig , $ lineConfig ) ; } throw InvalidConfigException :: forEndingKeyNotFound ( $ context ) ; }
Finds the end of a container directive.

@param string $context      a container's name
@param string $contextValue a container's value
@param array  $activeConfig a clean config array of lines

@throws Exception\InvalidConfigException if a container does not end correctly

@return Directive\BlockDirective a container of directives
Finds the end of a container directive .