1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/11700] Move all recent code to namespaces

PHPBB3-11700
This commit is contained in:
Nils Adermann
2013-09-10 14:01:09 +02:00
parent 196e1813cd
commit b95fdacdd3
420 changed files with 2316 additions and 1840 deletions

View File

@@ -7,6 +7,8 @@
*
*/
namespace phpbb\template\twig\tokenparser;
/**
* @ignore
*/
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
}
class phpbb_template_twig_tokenparser_php extends Twig_TokenParser
class php extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
@@ -25,20 +27,20 @@ class phpbb_template_twig_tokenparser_php extends Twig_TokenParser
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
public function parse(Twig_Token $token)
public function parse(\Twig_Token $token)
{
$stream = $this->parser->getStream();
$stream->expect(Twig_Token::BLOCK_END_TYPE);
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
$body = $this->parser->subparse(array($this, 'decideEnd'), true);
$stream->expect(Twig_Token::BLOCK_END_TYPE);
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
return new phpbb_template_twig_node_php($body, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
return new \phpbb\template\twig\node\php($body, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
}
public function decideEnd(Twig_Token $token)
public function decideEnd(\Twig_Token $token)
{
return $token->test('ENDPHP');
}