aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/twig/tokenparser
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-09-27 10:47:10 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-09-27 10:47:10 +0200
commit663b4b2eb74e8edb076c962662ff5124e94353ea (patch)
tree0ff449c776397b2b66fc7d567f93bbb7d62ea2e3 /phpBB/phpbb/template/twig/tokenparser
parent01512104b5823d15eed64d362b41b9594f870f0c (diff)
parent8db820be634cfce0fdb079fdbaee2c49661a7870 (diff)
downloadforums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar.gz
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar.bz2
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.tar.xz
forums-663b4b2eb74e8edb076c962662ff5124e94353ea.zip
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/passwords
Conflicts: phpBB/develop/create_schema_files.php
Diffstat (limited to 'phpBB/phpbb/template/twig/tokenparser')
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/defineparser.php (renamed from phpBB/phpbb/template/twig/tokenparser/define.php)18
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/event.php10
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includecss.php10
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includejs.php10
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includeparser.php (renamed from phpBB/phpbb/template/twig/tokenparser/include.php)8
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/includephp.php14
-rw-r--r--phpBB/phpbb/template/twig/tokenparser/php.php14
7 files changed, 49 insertions, 35 deletions
diff --git a/phpBB/phpbb/template/twig/tokenparser/define.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
index 4ea15388c4..688afec191 100644
--- a/phpBB/phpbb/template/twig/tokenparser/define.php
+++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\template\twig\tokenparser;
+
/**
* @ignore
*/
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
}
-class phpbb_template_twig_tokenparser_define extends Twig_TokenParser
+class defineparser extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
@@ -25,31 +27,31 @@ class phpbb_template_twig_tokenparser_define extends Twig_TokenParser
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
- public function parse(Twig_Token $token)
+ public function parse(\Twig_Token $token)
{
$lineno = $token->getLine();
$stream = $this->parser->getStream();
$name = $this->parser->getExpressionParser()->parseExpression();
$capture = false;
- if ($stream->test(Twig_Token::OPERATOR_TYPE, '=')) {
+ if ($stream->test(\Twig_Token::OPERATOR_TYPE, '=')) {
$stream->next();
$value = $this->parser->getExpressionParser()->parseExpression();
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
} else {
$capture = true;
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
$value = $this->parser->subparse(array($this, 'decideBlockEnd'), true);
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
}
- return new phpbb_template_twig_node_define($capture, $name, $value, $lineno, $this->getTag());
+ return new \phpbb\template\twig\node\definenode($capture, $name, $value, $lineno, $this->getTag());
}
- public function decideBlockEnd(Twig_Token $token)
+ public function decideBlockEnd(\Twig_Token $token)
{
return $token->test('ENDDEFINE');
}
diff --git a/phpBB/phpbb/template/twig/tokenparser/event.php b/phpBB/phpbb/template/twig/tokenparser/event.php
index e4dddd6dcc..7cf4000909 100644
--- a/phpBB/phpbb/template/twig/tokenparser/event.php
+++ b/phpBB/phpbb/template/twig/tokenparser/event.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\template\twig\tokenparser;
+
/**
* @ignore
*/
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
}
-class phpbb_template_twig_tokenparser_event extends Twig_TokenParser
+class event extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
@@ -25,14 +27,14 @@ class phpbb_template_twig_tokenparser_event extends Twig_TokenParser
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
- public function parse(Twig_Token $token)
+ public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
- return new phpbb_template_twig_node_event($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ return new \phpbb\template\twig\node\event($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
}
/**
diff --git a/phpBB/phpbb/template/twig/tokenparser/includecss.php b/phpBB/phpbb/template/twig/tokenparser/includecss.php
index 6c24dda647..7bf4c610b1 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includecss.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includecss.php
@@ -7,7 +7,9 @@
*
*/
-class phpbb_template_twig_tokenparser_includecss extends Twig_TokenParser
+namespace phpbb\template\twig\tokenparser;
+
+class includecss extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
@@ -16,14 +18,14 @@ class phpbb_template_twig_tokenparser_includecss extends Twig_TokenParser
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
- public function parse(Twig_Token $token)
+ public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
- return new phpbb_template_twig_node_includecss($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ return new \phpbb\template\twig\node\includecss($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
}
/**
diff --git a/phpBB/phpbb/template/twig/tokenparser/includejs.php b/phpBB/phpbb/template/twig/tokenparser/includejs.php
index b02b2f89ba..30a99f3279 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includejs.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includejs.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\template\twig\tokenparser;
+
/**
* @ignore
*/
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
}
-class phpbb_template_twig_tokenparser_includejs extends Twig_TokenParser
+class includejs extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
@@ -25,14 +27,14 @@ class phpbb_template_twig_tokenparser_includejs extends Twig_TokenParser
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
- public function parse(Twig_Token $token)
+ public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
- return new phpbb_template_twig_node_includejs($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
+ return new \phpbb\template\twig\node\includejs($expr, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
}
/**
diff --git a/phpBB/phpbb/template/twig/tokenparser/include.php b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
index 520f9fd1a0..715c0ec84d 100644
--- a/phpBB/phpbb/template/twig/tokenparser/include.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includeparser.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\template\twig\tokenparser;
+
/**
* @ignore
*/
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
}
-class phpbb_template_twig_tokenparser_include extends Twig_TokenParser_Include
+class includeparser extends \Twig_TokenParser_Include
{
/**
* Parses a token and returns a node.
@@ -25,13 +27,13 @@ class phpbb_template_twig_tokenparser_include extends Twig_TokenParser_Include
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
- public function parse(Twig_Token $token)
+ public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
list($variables, $only, $ignoreMissing) = $this->parseArguments();
- return new phpbb_template_twig_node_include($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
+ return new \phpbb\template\twig\node\includenode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
}
/**
diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php
index 13fe6de8a6..d906837590 100644
--- a/phpBB/phpbb/template/twig/tokenparser/includephp.php
+++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php
@@ -7,6 +7,8 @@
*
*/
+namespace phpbb\template\twig\tokenparser;
+
/**
* @ignore
*/
@@ -16,7 +18,7 @@ if (!defined('IN_PHPBB'))
}
-class phpbb_template_twig_tokenparser_includephp extends Twig_TokenParser
+class includephp extends \Twig_TokenParser
{
/**
* Parses a token and returns a node.
@@ -25,23 +27,23 @@ class phpbb_template_twig_tokenparser_includephp extends Twig_TokenParser
*
* @return Twig_NodeInterface A Twig_NodeInterface instance
*/
- public function parse(Twig_Token $token)
+ public function parse(\Twig_Token $token)
{
$expr = $this->parser->getExpressionParser()->parseExpression();
$stream = $this->parser->getStream();
$ignoreMissing = false;
- if ($stream->test(Twig_Token::NAME_TYPE, 'ignore')) {
+ if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) {
$stream->next();
- $stream->expect(Twig_Token::NAME_TYPE, 'missing');
+ $stream->expect(\Twig_Token::NAME_TYPE, 'missing');
$ignoreMissing = true;
}
- $stream->expect(Twig_Token::BLOCK_END_TYPE);
+ $stream->expect(\Twig_Token::BLOCK_END_TYPE);
- return new phpbb_template_twig_node_includephp($expr, $this->parser->getEnvironment(), $ignoreMissing, $token->getLine(), $this->getTag());
+ return new \phpbb\template\twig\node\includephp($expr, $this->parser->getEnvironment(), $ignoreMissing, $token->getLine(), $this->getTag());
}
/**
diff --git a/phpBB/phpbb/template/twig/tokenparser/php.php b/phpBB/phpbb/template/twig/tokenparser/php.php
index 197980a59a..e4f70fb9b1 100644
--- a/phpBB/phpbb/template/twig/tokenparser/php.php
+++ b/phpBB/phpbb/template/twig/tokenparser/php.php
@@ -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');
}