Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

Helper.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 1.42 KiB


 01  <?php
 02   
 03  /*
 04   * This file is part of the Symfony package.
 05   *
 06   * (c) Fabien Potencier <fabien@symfony.com>
 07   *
 08   * For the full copyright and license information, please view the LICENSE
 09   * file that was distributed with this source code.
 10   */
 11   
 12  namespace Symfony\Component\Console\Helper;
 13   
 14  /**
 15   * Helper is the base class for all helper classes.
 16   *
 17   * @author Fabien Potencier <fabien@symfony.com>
 18   */
 19  abstract class Helper implements HelperInterface
 20  {
 21      protected $helperSet = null;
 22   
 23      /**
 24       * Sets the helper set associated with this helper.
 25       *
 26       * @param HelperSet $helperSet A HelperSet instance
 27       */
 28      public function setHelperSet(HelperSet $helperSet = null)
 29      {
 30          $this->helperSet = $helperSet;
 31      }
 32   
 33      /**
 34       * Gets the helper set associated with this helper.
 35       *
 36       * @return HelperSet A HelperSet instance
 37       */
 38      public function getHelperSet()
 39      {
 40          return $this->helperSet;
 41      }
 42   
 43      /**
 44       * Returns the length of a string, using mb_strlen if it is available.
 45       *
 46       * @param string $string The string to check its length
 47       *
 48       * @return int     The length of the string
 49       */
 50      protected function strlen($string)
 51      {
 52          if (!function_exists('mb_strwidth')) {
 53              return strlen($string);
 54          }
 55   
 56          if (false === $encoding = mb_detect_encoding($string)) {
 57              return strlen($string);
 58          }
 59   
 60          return mb_strwidth($string, $encoding);
 61      }
 62  }
 63