Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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

Glob.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 2.07 KiB


 001  <?php
 002   
 003  /*
 004   * This file is part of the Symfony package.
 005   *
 006   * (c) Fabien Potencier <fabien@symfony.com>
 007   *
 008   * For the full copyright and license information, please view the LICENSE
 009   * file that was distributed with this source code.
 010   */
 011   
 012  namespace Symfony\Component\Finder\Expression;
 013   
 014  @trigger_error('The '.__NAMESPACE__.'\Glob class is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
 015   
 016  use Symfony\Component\Finder\Glob as FinderGlob;
 017   
 018  /**
 019   * @author Jean-François Simon <contact@jfsimon.fr>
 020   */
 021  class Glob implements ValueInterface
 022  {
 023      /**
 024       * @var string
 025       */
 026      private $pattern;
 027   
 028      /**
 029       * @param string $pattern
 030       */
 031      public function __construct($pattern)
 032      {
 033          $this->pattern = $pattern;
 034      }
 035   
 036      /**
 037       * {@inheritdoc}
 038       */
 039      public function render()
 040      {
 041          return $this->pattern;
 042      }
 043   
 044      /**
 045       * {@inheritdoc}
 046       */
 047      public function renderPattern()
 048      {
 049          return $this->pattern;
 050      }
 051   
 052      /**
 053       * {@inheritdoc}
 054       */
 055      public function getType()
 056      {
 057          return Expression::TYPE_GLOB;
 058      }
 059   
 060      /**
 061       * {@inheritdoc}
 062       */
 063      public function isCaseSensitive()
 064      {
 065          return true;
 066      }
 067   
 068      /**
 069       * {@inheritdoc}
 070       */
 071      public function prepend($expr)
 072      {
 073          $this->pattern = $expr.$this->pattern;
 074   
 075          return $this;
 076      }
 077   
 078      /**
 079       * {@inheritdoc}
 080       */
 081      public function append($expr)
 082      {
 083          $this->pattern .= $expr;
 084   
 085          return $this;
 086      }
 087   
 088      /**
 089       * Tests if glob is expandable ("*.{a,b}" syntax).
 090       *
 091       * @return bool
 092       */
 093      public function isExpandable()
 094      {
 095          return false !== strpos($this->pattern, '{')
 096              && false !== strpos($this->pattern, '}');
 097      }
 098   
 099      /**
 100       * @param bool $strictLeadingDot
 101       * @param bool $strictWildcardSlash
 102       *
 103       * @return Regex
 104       */
 105      public function toRegex($strictLeadingDot = true, $strictWildcardSlash = true)
 106      {
 107          $regex = FinderGlob::toRegex($this->pattern, $strictLeadingDot, $strictWildcardSlash, '');
 108   
 109          return new Regex($regex);
 110      }
 111  }
 112