Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

AddTrait.php

Zuletzt modifiziert: 01.05.2026, 11:28 - Dateigröße: 1.25 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\Routing\Loader\Configurator\Traits;
 13   
 14  use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator;
 15  use Symfony\Component\Routing\Route;
 16  use Symfony\Component\Routing\RouteCollection;
 17   
 18  trait AddTrait
 19  {
 20      /**
 21       * @var RouteCollection
 22       */
 23      private $collection;
 24   
 25      private $name = '';
 26   
 27      /**
 28       * Adds a route.
 29       *
 30       * @param string $name
 31       * @param string $path
 32       *
 33       * @return RouteConfigurator
 34       */
 35      final public function add($name, $path)
 36      {
 37          $parentConfigurator = $this instanceof RouteConfigurator ? $this->parentConfigurator : null;
 38          $this->collection->add($this->name.$name, $route = new Route($path));
 39   
 40          return new RouteConfigurator($this->collection, $route, '', $parentConfigurator);
 41      }
 42   
 43      /**
 44       * Adds a route.
 45       *
 46       * @param string $name
 47       * @param string $path
 48       *
 49       * @return RouteConfigurator
 50       */
 51      final public function __invoke($name, $path)
 52      {
 53          return $this->add($name, $path);
 54      }
 55  }
 56