think\console\output\Descriptor::describe PHP Метод

describe() публичный Метод

public describe ( Output $output, $object, array $options = [] )
$output think\console\Output
$options array
    public function describe(Output $output, $object, array $options = [])
    {
        $this->output = $output;
        switch (true) {
            case $object instanceof InputArgument:
                $this->describeInputArgument($object, $options);
                break;
            case $object instanceof InputOption:
                $this->describeInputOption($object, $options);
                break;
            case $object instanceof InputDefinition:
                $this->describeInputDefinition($object, $options);
                break;
            case $object instanceof Command:
                $this->describeCommand($object, $options);
                break;
            case $object instanceof Console:
                $this->describeConsole($object, $options);
                break;
            default:
                throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object)));
        }
    }

Usage Example

Пример #1
0
 public function describe($object, array $options = [])
 {
     $descriptor = new Descriptor();
     $options = array_merge(['raw_text' => false], $options);
     $descriptor->describe($this, $object, $options);
 }