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

Descriptor.php

Zuletzt modifiziert: 01.05.2026, 11:27 - Dateigröße: 3.10 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\Console\Descriptor;
 013   
 014  use Symfony\Component\Console\Application;
 015  use Symfony\Component\Console\Command\Command;
 016  use Symfony\Component\Console\Exception\InvalidArgumentException;
 017  use Symfony\Component\Console\Input\InputArgument;
 018  use Symfony\Component\Console\Input\InputDefinition;
 019  use Symfony\Component\Console\Input\InputOption;
 020  use Symfony\Component\Console\Output\OutputInterface;
 021   
 022  /**
 023   * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
 024   *
 025   * @internal
 026   */
 027  abstract class Descriptor implements DescriptorInterface
 028  {
 029      /**
 030       * @var OutputInterface
 031       */
 032      protected $output;
 033   
 034      /**
 035       * {@inheritdoc}
 036       */
 037      public function describe(OutputInterface $output, $object, array $options = [])
 038      {
 039          $this->output = $output;
 040   
 041          switch (true) {
 042              case $object instanceof InputArgument:
 043                  $this->describeInputArgument($object, $options);
 044                  break;
 045              case $object instanceof InputOption:
 046                  $this->describeInputOption($object, $options);
 047                  break;
 048              case $object instanceof InputDefinition:
 049                  $this->describeInputDefinition($object, $options);
 050                  break;
 051              case $object instanceof Command:
 052                  $this->describeCommand($object, $options);
 053                  break;
 054              case $object instanceof Application:
 055                  $this->describeApplication($object, $options);
 056                  break;
 057              default:
 058                  throw new InvalidArgumentException(sprintf('Object of type "%s" is not describable.', \get_class($object)));
 059          }
 060      }
 061   
 062      /**
 063       * Writes content to output.
 064       *
 065       * @param string $content
 066       * @param bool   $decorated
 067       */
 068      protected function write($content, $decorated = false)
 069      {
 070          $this->output->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW);
 071      }
 072   
 073      /**
 074       * Describes an InputArgument instance.
 075       *
 076       * @return string|mixed
 077       */
 078      abstract protected function describeInputArgument(InputArgument $argument, array $options = []);
 079   
 080      /**
 081       * Describes an InputOption instance.
 082       *
 083       * @return string|mixed
 084       */
 085      abstract protected function describeInputOption(InputOption $option, array $options = []);
 086   
 087      /**
 088       * Describes an InputDefinition instance.
 089       *
 090       * @return string|mixed
 091       */
 092      abstract protected function describeInputDefinition(InputDefinition $definition, array $options = []);
 093   
 094      /**
 095       * Describes a Command instance.
 096       *
 097       * @return string|mixed
 098       */
 099      abstract protected function describeCommand(Command $command, array $options = []);
 100   
 101      /**
 102       * Describes an Application instance.
 103       *
 104       * @return string|mixed
 105       */
 106      abstract protected function describeApplication(Application $application, array $options = []);
 107  }
 108