ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_Extension_Profiler Class Reference
+ Inheritance diagram for Twig_Extension_Profiler:
+ Collaboration diagram for Twig_Extension_Profiler:

Public Member Functions

 __construct (Twig_Profiler_Profile $profile)
 
 enter (Twig_Profiler_Profile $profile)
 
 leave (Twig_Profiler_Profile $profile)
 
 getNodeVisitors ()
 Returns the node visitor instances to add to the existing list. More...
 
 getName ()
 
- 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 ()
 
 initRuntime (Twig_Environment $environment)
 Initializes the runtime environment. More...
 
 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 ()
 Returns a list of global variables to add to the existing list. More...
 
 getName ()
 Returns the name of the extension. More...
 

Private Attributes

 $actives = array()
 

Detailed Description

Definition at line 12 of file Profiler.php.

Constructor & Destructor Documentation

◆ __construct()

Twig_Extension_Profiler::__construct ( Twig_Profiler_Profile  $profile)

Definition at line 16 of file Profiler.php.

17 {
18 $this->actives[] = $profile;
19 }

Member Function Documentation

◆ enter()

Twig_Extension_Profiler::enter ( Twig_Profiler_Profile  $profile)

Definition at line 21 of file Profiler.php.

22 {
23 $this->actives[0]->addProfile($profile);
24 array_unshift($this->actives, $profile);
25 }

◆ getName()

Twig_Extension_Profiler::getName ( )
Deprecated:
since 1.26 (to be removed in 2.0), not used anymore internally

Reimplemented from Twig_Extension.

Definition at line 42 of file Profiler.php.

43 {
44 return 'profiler';
45 }

◆ getNodeVisitors()

Twig_Extension_Profiler::getNodeVisitors ( )

Returns the node visitor instances to add to the existing list.

Returns
Twig_NodeVisitorInterface[]

Reimplemented from Twig_Extension.

Definition at line 37 of file Profiler.php.

38 {
39 return array(new Twig_Profiler_NodeVisitor_Profiler(get_class($this)));
40 }

◆ leave()

Twig_Extension_Profiler::leave ( Twig_Profiler_Profile  $profile)

Definition at line 27 of file Profiler.php.

28 {
29 $profile->leave();
30 array_shift($this->actives);
31
32 if (1 === count($this->actives)) {
33 $this->actives[0]->leave();
34 }
35 }
leave()
Stops the profiling.
Definition: Profile.php:139

References Twig_Profiler_Profile\leave().

+ Here is the call graph for this function:

Field Documentation

◆ $actives

Twig_Extension_Profiler::$actives = array()
private

Definition at line 14 of file Profiler.php.


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