You are here

class Twig_Extension_Debug in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Extension/Debug.php \Twig_Extension_Debug

Hierarchy

Expanded class hierarchy of Twig_Extension_Debug

1 string reference to 'Twig_Extension_Debug'
core.services.yml in core/core.services.yml
core/core.services.yml
1 service uses Twig_Extension_Debug
twig.extension.debug in core/core.services.yml
Twig_Extension_Debug

File

vendor/twig/twig/lib/Twig/Extension/Debug.php, line 11

View source
class Twig_Extension_Debug extends Twig_Extension {
  public function getFunctions() {

    // dump is safe if var_dump is overridden by xdebug
    $isDumpOutputHtmlSafe = extension_loaded('xdebug') && (false === ini_get('xdebug.overload_var_dump') || ini_get('xdebug.overload_var_dump')) && (false === ini_get('html_errors') || ini_get('html_errors')) || 'cli' === php_sapi_name();
    return array(
      new Twig_SimpleFunction('dump', 'twig_var_dump', array(
        'is_safe' => $isDumpOutputHtmlSafe ? array(
          'html',
        ) : array(),
        'needs_context' => true,
        'needs_environment' => true,
      )),
    );
  }
  public function getName() {
    return 'debug';
  }

}

Members