diff options
| author | Benjamin Southall <applemansigloo@gmail.com> | 2019-02-26 10:11:12 +1000 |
|---|---|---|
| committer | Benjamin Southall <applemansigloo@gmail.com> | 2019-02-26 10:11:12 +1000 |
| commit | f79395851b044689567e0e6c9504acbcaa742782 (patch) | |
| tree | ee539aee9ffa90e8accd6f130b30a8ebed7a232e /inc/lib/Twig/Extension/Debug.php | |
| parent | 28f32baf0125ca5085266e73dc5071e5814d8e3b (diff) | |
Twig update to latest Twig 1.x legacy as per vichan
Diffstat (limited to 'inc/lib/Twig/Extension/Debug.php')
| -rw-r--r-- | inc/lib/Twig/Extension/Debug.php | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/inc/lib/Twig/Extension/Debug.php b/inc/lib/Twig/Extension/Debug.php index e3a85bfe..d0cd1962 100644 --- a/inc/lib/Twig/Extension/Debug.php +++ b/inc/lib/Twig/Extension/Debug.php @@ -3,18 +3,17 @@ /* * This file is part of Twig. * - * (c) 2011 Fabien Potencier + * (c) Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ + +/** + * @final + */ class Twig_Extension_Debug extends Twig_Extension { - /** - * Returns a list of global functions to add to the existing list. - * - * @return array An array of global functions - */ public function getFunctions() { // dump is safe if var_dump is overridden by xdebug @@ -24,7 +23,7 @@ class Twig_Extension_Debug extends Twig_Extension // false means that it was not set (and the default is on) or it explicitly enabled // xdebug.overload_var_dump produces HTML only when html_errors is also enabled && (false === ini_get('html_errors') || ini_get('html_errors')) - || 'cli' === php_sapi_name() + || 'cli' === PHP_SAPI ; return array( @@ -32,11 +31,6 @@ class Twig_Extension_Debug extends Twig_Extension ); } - /** - * Returns the name of the extension. - * - * @return string The extension name - */ public function getName() { return 'debug'; @@ -62,10 +56,12 @@ function twig_var_dump(Twig_Environment $env, $context) var_dump($vars); } else { - for ($i = 2; $i < $count; $i++) { + for ($i = 2; $i < $count; ++$i) { var_dump(func_get_arg($i)); } } return ob_get_clean(); } + +class_alias('Twig_Extension_Debug', 'Twig\Extension\DebugExtension', false); |
