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

Descriptor.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 2.81 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\Descriptor;
 13   
 14  use Symfony\Component\Console\Application;
 15  use Symfony\Component\Console\Command\Command;
 16  use Symfony\Component\Console\Input\InputArgument;
 17  use Symfony\Component\Console\Input\InputDefinition;
 18  use Symfony\Component\Console\Input\InputOption;
 19   
 20  /**
 21   * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
 22   */
 23  abstract class Descriptor implements DescriptorInterface
 24  {
 25      public function describe($object, array $options = array())
 26      {
 27          switch (true) {
 28              case $object instanceof InputArgument:
 29                  return $this->describeInputArgument($object, $options);
 30              case $object instanceof InputOption:
 31                  return $this->describeInputOption($object, $options);
 32              case $object instanceof InputDefinition:
 33                  return $this->describeInputDefinition($object, $options);
 34              case $object instanceof Command:
 35                  return $this->describeCommand($object, $options);
 36              case $object instanceof Application:
 37                  return $this->describeApplication($object, $options);
 38          }
 39   
 40          throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object)));
 41      }
 42   
 43      /**
 44       * Describes an InputArgument instance.
 45       *
 46       * @param InputArgument $argument
 47       * @param array         $options
 48       *
 49       * @return string|mixed
 50       */
 51      abstract protected function describeInputArgument(InputArgument $argument, array $options = array());
 52   
 53      /**
 54       * Describes an InputOption instance.
 55       *
 56       * @param InputOption $option
 57       * @param array       $options
 58       *
 59       * @return string|mixed
 60       */
 61      abstract protected function describeInputOption(InputOption $option, array $options = array());
 62   
 63      /**
 64       * Describes an InputDefinition instance.
 65       *
 66       * @param InputDefinition $definition
 67       * @param array           $options
 68       *
 69       * @return string|mixed
 70       */
 71      abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array());
 72   
 73      /**
 74       * Describes a Command instance.
 75       *
 76       * @param Command $command
 77       * @param array   $options
 78       *
 79       * @return string|mixed
 80       */
 81      abstract protected function describeCommand(Command $command, array $options = array());
 82   
 83      /**
 84       * Describes an Application instance.
 85       *
 86       * @param Application $application
 87       * @param array       $options
 88       *
 89       * @return string|mixed
 90       */
 91      abstract protected function describeApplication(Application $application, array $options = array());
 92  }
 93