ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 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 ()
 

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 ( )

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 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[]

Implements Twig_ExtensionInterface.

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.

References Twig_Profiler_Profile\leave().

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
+ 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: