[ Index ]

PHP Cross Reference of phpBB-3.2.11-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
  20   */
  21  class TextDumper extends BaseDumper
  22  {
  23      protected function formatTemplate(Profile $profile, $prefix)
  24      {
  25          return sprintf('%s└ %s', $prefix, $profile->getTemplate());
  26      }
  27  
  28      protected function formatNonTemplate(Profile $profile, $prefix)
  29      {
  30          return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
  31      }
  32  
  33      protected function formatTime(Profile $profile, $percent)
  34      {
  35          return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
  36      }
  37  }
  38  
  39  class_alias('Twig\Profiler\Dumper\TextDumper', 'Twig_Profiler_Dumper_Text');


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1