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

Public Member Functions

 dump (Twig_Profiler_Profile $profile)
 
- Public Member Functions inherited from Twig_Profiler_Dumper_Base
 dump (Twig_Profiler_Profile $profile)
 

Protected Member Functions

 formatTemplate (Twig_Profiler_Profile $profile, $prefix)
 
 formatNonTemplate (Twig_Profiler_Profile $profile, $prefix)
 
 formatTime (Twig_Profiler_Profile $profile, $percent)
 
- Protected Member Functions inherited from Twig_Profiler_Dumper_Base
 formatTemplate (Twig_Profiler_Profile $profile, $prefix)
 
 formatNonTemplate (Twig_Profiler_Profile $profile, $prefix)
 
 formatTime (Twig_Profiler_Profile $profile, $percent)
 

Static Private Attributes

static $colors
 

Detailed Description

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file Html.php.

Member Function Documentation

◆ dump()

Twig_Profiler_Dumper_Html::dump ( Twig_Profiler_Profile  $profile)

Definition at line 26 of file Html.php.

27  {
28  return '<pre>'.parent::dump($profile).'</pre>';
29  }

◆ formatNonTemplate()

Twig_Profiler_Dumper_Html::formatNonTemplate ( Twig_Profiler_Profile  $profile,
  $prefix 
)
protected

Definition at line 36 of file Html.php.

References Twig_Profiler_Profile\getName(), Twig_Profiler_Profile\getTemplate(), and Twig_Profiler_Profile\getType().

37  {
38  return sprintf('%s└ %s::%s(<span style="background-color: %s">%s</span>)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName());
39  }
+ Here is the call graph for this function:

◆ formatTemplate()

Twig_Profiler_Dumper_Html::formatTemplate ( Twig_Profiler_Profile  $profile,
  $prefix 
)
protected

Definition at line 31 of file Html.php.

References Twig_Profiler_Profile\getTemplate().

32  {
33  return sprintf('%s└ <span style="background-color: %s">%s</span>', $prefix, self::$colors['template'], $profile->getTemplate());
34  }
+ Here is the call graph for this function:

◆ formatTime()

Twig_Profiler_Dumper_Html::formatTime ( Twig_Profiler_Profile  $profile,
  $percent 
)
protected

Definition at line 41 of file Html.php.

References Twig_Profiler_Profile\getDuration().

42  {
43  return sprintf('<span style="color: %s">%.2fms/%.0f%%</span>', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent);
44  }
getDuration()
Returns the duration in microseconds.
Definition: Profile.php:89
+ Here is the call graph for this function:

Field Documentation

◆ $colors

Twig_Profiler_Dumper_Html::$colors
staticprivate
Initial value:
'block' => '#dfd',
'macro' => '#ddf',
'template' => '#ffd',
'big' => '#d44',
)

Definition at line 19 of file Html.php.


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