ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Extension_Debug Class Reference

More...

+ Inheritance diagram for Twig_Extension_Debug:
+ Collaboration diagram for Twig_Extension_Debug:

Public Member Functions

 getFunctions ()
 Returns a list of functions to add to the existing list. More...
 
 getName ()
 Returns the name of the extension. More...
 
- Public Member Functions inherited from Twig_Extension
 initRuntime (Twig_Environment $environment)
 
 getTokenParsers ()
 Returns the token parser instances to add to the existing list. More...
 
 getNodeVisitors ()
 Returns the node visitor instances to add to the existing list. More...
 
 getFilters ()
 Returns a list of filters to add to the existing list. More...
 
 getTests ()
 Returns a list of tests to add to the existing list. More...
 
 getFunctions ()
 Returns a list of functions to add to the existing list. More...
 
 getOperators ()
 Returns a list of operators to add to the existing list. More...
 
 getGlobals ()
 
 getName ()
 

Detailed Description

Definition at line 15 of file Debug.php.

Member Function Documentation

◆ getFunctions()

Twig_Extension_Debug::getFunctions ( )

Returns a list of functions to add to the existing list.

Returns
Twig_SimpleFunction[]

Implements Twig_ExtensionInterface.

Definition at line 17 of file Debug.php.

References array.

18  {
19  // dump is safe if var_dump is overridden by xdebug
20  $isDumpOutputHtmlSafe = extension_loaded('xdebug')
21  // false means that it was not set (and the default is on) or it explicitly enabled
22  && (false === ini_get('xdebug.overload_var_dump') || ini_get('xdebug.overload_var_dump'))
23  // false means that it was not set (and the default is on) or it explicitly enabled
24  // xdebug.overload_var_dump produces HTML only when html_errors is also enabled
25  && (false === ini_get('html_errors') || ini_get('html_errors'))
26  || 'cli' === PHP_SAPI
27  ;
28 
29  return array(
30  new Twig_SimpleFunction('dump', 'twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)),
31  );
32  }
Represents a template function.
Create styles array
The data for the language used.

◆ getName()

Twig_Extension_Debug::getName ( )

Returns the name of the extension.

Returns
string The extension name
Deprecated:
since 1.26 (to be removed in 2.0), not used anymore internally

Implements Twig_ExtensionInterface.

Definition at line 34 of file Debug.php.

35  {
36  return 'debug';
37  }

The documentation for this class was generated from the following file: