private function compileLoopBlock(\Twig_Compiler $compiler)
    {
        $loop = $this->getAttribute('loop');

        $compiler
            ->write('foreach(')->subcompile($loop[1])->raw(' as $key => $value) {')->raw("\n")
            ->indent()
            ->write('$context[')->string($loop[0])->raw('] = $value;')->raw("\n")
        ;
        $this->compileChildBlock($compiler, '$key');
        $compiler
            ->outdent()
            ->write('}')->raw("\n")
            ->write('unset($context[')->string($loop[0])->raw(']);')->raw("\n")
        ;
    }
private function compileLoopBlock(\Twig_Compiler $compiler)
    {
        $loop = $this->getAttribute('loop');

        $compiler
            ->write('foreach(')->subcompile($loop[1])->raw(' as $key => $value) {')->raw("\n")
            ->indent()
            ->write('$context[')->string($loop[0])->raw('] = $value;')->raw("\n")
        ;
        $this->compileChildBlock($compiler, '$key');
        $compiler
            ->outdent()
            ->write('}')->raw("\n")
            ->write('unset($context[')->string($loop[0])->raw(']);')->raw("\n")
        ;
    }
private function compileLoopBlock ( \ Twig_Compiler $ compiler ) { $ loop = $ this -> getAttribute ( 'loop' ) ; $ compiler -> write ( 'foreach(' ) -> subcompile ( $ loop [ 1 ] ) -> raw ( ' as $key => $value) {' ) -> raw ( "\n" ) -> indent ( ) -> write ( '$context[' ) -> string ( $ loop [ 0 ] ) -> raw ( '] = $value;' ) -> raw ( "\n" ) ; $ this -> compileChildBlock ( $ compiler , '$key' ) ; $ compiler -> outdent ( ) -> write ( '}' ) -> raw ( "\n" ) -> write ( 'unset($context[' ) -> string ( $ loop [ 0 ] ) -> raw ( ']);' ) -> raw ( "\n" ) ; }
Compile the loop block.

@param \Twig_Compiler $compiler The compiler
Compile the loop block .