From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- inc/3rdparty/Twig/Extension/Debug.php | 71 ----------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 inc/3rdparty/Twig/Extension/Debug.php (limited to 'inc/3rdparty/Twig/Extension/Debug.php') diff --git a/inc/3rdparty/Twig/Extension/Debug.php b/inc/3rdparty/Twig/Extension/Debug.php deleted file mode 100644 index e3a85bfe..00000000 --- a/inc/3rdparty/Twig/Extension/Debug.php +++ /dev/null @@ -1,71 +0,0 @@ - $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)), - ); - } - - /** - * Returns the name of the extension. - * - * @return string The extension name - */ - public function getName() - { - return 'debug'; - } -} - -function twig_var_dump(Twig_Environment $env, $context) -{ - if (!$env->isDebug()) { - return; - } - - ob_start(); - - $count = func_num_args(); - if (2 === $count) { - $vars = array(); - foreach ($context as $key => $value) { - if (!$value instanceof Twig_Template) { - $vars[$key] = $value; - } - } - - var_dump($vars); - } else { - for ($i = 2; $i < $count; $i++) { - var_dump(func_get_arg($i)); - } - } - - return ob_get_clean(); -} -- cgit v1.2.3