mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
* updated Twig to the latest version in 1.x series (v1.35.0)
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
/*
|
||||
* This file is part of Twig.
|
||||
*
|
||||
* (c) 2009 Fabien Potencier
|
||||
* (c) 2009 Armin Ronacher
|
||||
* (c) Fabien Potencier
|
||||
* (c) Armin Ronacher
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -14,6 +14,8 @@
|
||||
* Represents a Token.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class Twig_Token
|
||||
{
|
||||
@@ -36,8 +38,6 @@ class Twig_Token
|
||||
const INTERPOLATION_END_TYPE = 11;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param int $type The type of the token
|
||||
* @param string $value The token value
|
||||
* @param int $lineno The line position in the source
|
||||
@@ -49,11 +49,6 @@ class Twig_Token
|
||||
$this->lineno = $lineno;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the token.
|
||||
*
|
||||
* @return string A string representation of the token
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return sprintf('%s(%s)', self::typeToString($this->type, true), $this->value);
|
||||
@@ -63,9 +58,9 @@ class Twig_Token
|
||||
* Tests the current token for a type and/or a value.
|
||||
*
|
||||
* Parameters may be:
|
||||
* * just type
|
||||
* * type and value (or array of possible values)
|
||||
* * just value (or array of possible values) (NAME_TYPE is used as type)
|
||||
* * just type
|
||||
* * type and value (or array of possible values)
|
||||
* * just value (or array of possible values) (NAME_TYPE is used as type)
|
||||
*
|
||||
* @param array|int $type The type to test
|
||||
* @param array|string|null $values The token value
|
||||
@@ -87,9 +82,7 @@ class Twig_Token
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the line.
|
||||
*
|
||||
* @return int The source line
|
||||
* @return int
|
||||
*/
|
||||
public function getLine()
|
||||
{
|
||||
@@ -97,9 +90,7 @@ class Twig_Token
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token type.
|
||||
*
|
||||
* @return int The token type
|
||||
* @return int
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
@@ -107,9 +98,7 @@ class Twig_Token
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the token value.
|
||||
*
|
||||
* @return string The token value
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
@@ -174,7 +163,7 @@ class Twig_Token
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the english representation of a given type.
|
||||
* Returns the English representation of a given type.
|
||||
*
|
||||
* @param int $type The type as an integer
|
||||
*
|
||||
@@ -214,3 +203,5 @@ class Twig_Token
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class_alias('Twig_Token', 'Twig\Token', false);
|
||||
|
Reference in New Issue
Block a user