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

@final

Definition at line 17 of file Html.php.

Member Function Documentation

◆ dump()

Twig_Profiler_Dumper_Html::dump ( Twig_Profiler_Profile  $profile)

Reimplemented from Twig_Profiler_Dumper_Base.

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

Reimplemented from Twig_Profiler_Dumper_Base.

Definition at line 36 of file Html.php.

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 }

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

+ Here is the call graph for this function:

◆ formatTemplate()

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

Reimplemented from Twig_Profiler_Dumper_Base.

Definition at line 31 of file Html.php.

32 {
33 return sprintf('%s└ <span style="background-color: %s">%s</span>', $prefix, self::$colors['template'], $profile->getTemplate());
34 }

References Twig_Profiler_Profile\getTemplate().

+ Here is the call graph for this function:

◆ formatTime()

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

Reimplemented from Twig_Profiler_Dumper_Base.

Definition at line 41 of file Html.php.

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

References Twig_Profiler_Profile\getDuration().

+ Here is the call graph for this function:

Field Documentation

◆ $colors

Twig_Profiler_Dumper_Html::$colors
staticprivate
Initial value:
= array(
'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: