class Descriptor
Same name in this branch
- 11.1.x vendor/google/protobuf/src/Google/Protobuf/Descriptor.php \Google\Protobuf\Descriptor
- 11.1.x vendor/google/protobuf/src/Google/Protobuf/Internal/Descriptor.php \Google\Protobuf\Internal\Descriptor
- 11.1.x vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php \GPBMetadata\Google\Protobuf\Internal\Descriptor
@author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
@internal
Hierarchy
- class \Symfony\Component\Console\Descriptor\Descriptor implements \Symfony\Component\Console\Descriptor\DescriptorInterface
Expanded class hierarchy of Descriptor
1 string reference to 'Descriptor'
- DescriptorHelper::getName in vendor/
symfony/ console/ Helper/ DescriptorHelper.php - Returns the canonical name of this helper.
File
-
vendor/
symfony/ console/ Descriptor/ Descriptor.php, line 27
Namespace
Symfony\Component\Console\DescriptorView source
abstract class Descriptor implements DescriptorInterface {
protected OutputInterface $output;
public function describe(OutputInterface $output, object $object, array $options = []) : void {
$this->output = $output;
match (true) { $object instanceof InputArgument => $this->describeInputArgument($object, $options),
$object instanceof InputOption => $this->describeInputOption($object, $options),
$object instanceof InputDefinition => $this->describeInputDefinition($object, $options),
$object instanceof Command => $this->describeCommand($object, $options),
$object instanceof Application => $this->describeApplication($object, $options),
default => throw new InvalidArgumentException(\sprintf('Object of type "%s" is not describable.', get_debug_type($object))),
};
}
protected function write(string $content, bool $decorated = false) : void {
$this->output
->write($content, false, $decorated ? OutputInterface::OUTPUT_NORMAL : OutputInterface::OUTPUT_RAW);
}
/**
* Describes an InputArgument instance.
*/
protected abstract function describeInputArgument(InputArgument $argument, array $options = []) : void;
/**
* Describes an InputOption instance.
*/
protected abstract function describeInputOption(InputOption $option, array $options = []) : void;
/**
* Describes an InputDefinition instance.
*/
protected abstract function describeInputDefinition(InputDefinition $definition, array $options = []) : void;
/**
* Describes a Command instance.
*/
protected abstract function describeCommand(Command $command, array $options = []) : void;
/**
* Describes an Application instance.
*/
protected abstract function describeApplication(Application $application, array $options = []) : void;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Descriptor::$output | protected | property | |||
Descriptor::describe | public | function | Overrides DescriptorInterface::describe | 2 | |
Descriptor::describeApplication | abstract protected | function | Describes an Application instance. | 5 | |
Descriptor::describeCommand | abstract protected | function | Describes a Command instance. | 5 | |
Descriptor::describeInputArgument | abstract protected | function | Describes an InputArgument instance. | 5 | |
Descriptor::describeInputDefinition | abstract protected | function | Describes an InputDefinition instance. | 5 | |
Descriptor::describeInputOption | abstract protected | function | Describes an InputOption instance. | 5 | |
Descriptor::write | protected | function | 2 |