parser->getStream(); $stream->expect(\Twig_Token::BLOCK_END_TYPE); $body = $this->parser->subparse(array($this, 'decideEnd'), true); $stream->expect(\Twig_Token::BLOCK_END_TYPE); return new \phpbb\template\twig\node\php($body, $this->parser->getEnvironment(), $token->getLine(), $this->getTag()); } public function decideEnd(\Twig_Token $token) { return $token->test('ENDPHP'); } /** * Gets the tag name associated with this token parser. * * @return string The tag name */ public function getTag() { return 'PHP'; } }