[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/twig/twig/src/Profiler/Dumper/ -> TextDumper.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of Twig.
   5   *
   6   * (c) Fabien Potencier
   7   *
   8   * For the full copyright and license information, please view the LICENSE
   9   * file that was distributed with this source code.
  10   */
  11  
  12  namespace Twig\Profiler\Dumper;
  13  
  14  use Twig\Profiler\Profile;
  15  
  16  /**
  17   * @author Fabien Potencier <fabien@symfony.com>
  18   */
  19  final class TextDumper extends BaseDumper
  20  {
  21      protected function formatTemplate(Profile $profile, $prefix)
  22      {
  23          return sprintf('%s└ %s', $prefix, $profile->getTemplate());
  24      }
  25  
  26      protected function formatNonTemplate(Profile $profile, $prefix)
  27      {
  28          return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
  29      }
  30  
  31      protected function formatTime(Profile $profile, $percent)
  32      {
  33          return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
  34      }
  35  }
  36  
  37  class_alias('Twig\Profiler\Dumper\TextDumper', 'Twig_Profiler_Dumper_Text');


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1