src/Compiler.php
private function buildBlockDirective($context, $contextValue, $lines)
    {
        $class = 'WebHelper\Parser\Directive\BlockDirective';
        $known = $this->parser->getServer()->getKnownDirectives();
        if (in_array($context, array_keys($known))) {
            if (isset($known[$context]['class'])) {
                $class = 'WebHelper\Parser\Directive\\'.$known[$context]['class'];
            }
        }
        $block = new $class($context, $contextValue);
        foreach ($lines as $directive) {
            $block->add($directive);
        }

        return $block;
    }
private function buildBlockDirective($context, $contextValue, $lines)
    {
        $class = 'WebHelper\Parser\Directive\BlockDirective';
        $known = $this->parser->getServer()->getKnownDirectives();
        if (in_array($context, array_keys($known))) {
            if (isset($known[$context]['class'])) {
                $class = 'WebHelper\Parser\Directive\\'.$known[$context]['class'];
            }
        }
        $block = new $class($context, $contextValue);
        foreach ($lines as $directive) {
            $block->add($directive);
        }

        return $block;
    }
private function buildBlockDirective ( $ context , $ contextValue , $ lines ) { $ class = 'WebHelper\Parser\Directive\BlockDirective' ; $ known = $ this -> parser -> getServer ( ) -> getKnownDirectives ( ) ; if ( in_array ( $ context , array_keys ( $ known ) ) ) { if ( isset ( $ known [ $ context ] [ 'class' ] ) ) { $ class = 'WebHelper\Parser\Directive\\' . $ known [ $ context ] [ 'class' ] ; } } $ block = new $ class ( $ context , $ contextValue ) ; foreach ( $ lines as $ directive ) { $ block -> add ( $ directive ) ; } return $ block ; }
Builds a BlockDirective.

@param string $context      a container's name
@param string $contextValue a container's value
@param array  $lines        an array of directives

@return Directive\BlockDirective the BlockDirective
Builds a BlockDirective .