platform/api/symfony/Component/Console/DataCollector/CommandDataCollector.yaml

143 lines
5.2 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: CommandDataCollector
class_comment: null
dependencies:
- name: Command
type: class
source: Symfony\Component\Console\Command\Command
- name: CliRequest
type: class
source: Symfony\Component\Console\Debug\CliRequest
- name: OutputInterface
type: class
source: Symfony\Component\Console\Output\OutputInterface
- name: SignalMap
type: class
source: Symfony\Component\Console\SignalRegistry\SignalMap
- name: Request
type: class
source: Symfony\Component\HttpFoundation\Request
- name: Response
type: class
source: Symfony\Component\HttpFoundation\Response
- name: DataCollector
type: class
source: Symfony\Component\HttpKernel\DataCollector\DataCollector
- name: Data
type: class
source: Symfony\Component\VarDumper\Cloner\Data
properties: []
methods:
- name: getCommand
visibility: public
parameters: []
comment: "# * @internal\n# *\n# * @author Jules Pietri <jules@heahprod.com>\n# */\n\
# final class CommandDataCollector extends DataCollector\n# {\n# public function\
\ collect(Request $request, Response $response, ?\\Throwable $exception = null):\
\ void\n# {\n# if (!$request instanceof CliRequest) {\n# return;\n# }\n# \n# $command\
\ = $request->command;\n# $application = $command->getApplication();\n# \n# $this->data\
\ = [\n# 'command' => $this->cloneVar($command->command),\n# 'exit_code' => $command->exitCode,\n\
# 'interrupted_by_signal' => $command->interruptedBySignal,\n# 'duration' => $command->duration,\n\
# 'max_memory_usage' => $command->maxMemoryUsage,\n# 'verbosity_level' => match\
\ ($command->output->getVerbosity()) {\n# OutputInterface::VERBOSITY_QUIET =>\
\ 'quiet',\n# OutputInterface::VERBOSITY_NORMAL => 'normal',\n# OutputInterface::VERBOSITY_VERBOSE\
\ => 'verbose',\n# OutputInterface::VERBOSITY_VERY_VERBOSE => 'very verbose',\n\
# OutputInterface::VERBOSITY_DEBUG => 'debug',\n# },\n# 'interactive' => $command->isInteractive,\n\
# 'validate_input' => !$command->ignoreValidation,\n# 'enabled' => $command->isEnabled(),\n\
# 'visible' => !$command->isHidden(),\n# 'input' => $this->cloneVar($command->input),\n\
# 'output' => $this->cloneVar($command->output),\n# 'interactive_inputs' => array_map($this->cloneVar(...),\
\ $command->interactiveInputs),\n# 'signalable' => $command->getSubscribedSignals(),\n\
# 'handled_signals' => $command->handledSignals,\n# 'helper_set' => array_map($this->cloneVar(...),\
\ iterator_to_array($command->getHelperSet())),\n# ];\n# \n# $baseDefinition =\
\ $application->getDefinition();\n# \n# foreach ($command->arguments as $argName\
\ => $argValue) {\n# if ($baseDefinition->hasArgument($argName)) {\n# $this->data['application_inputs'][$argName]\
\ = $this->cloneVar($argValue);\n# } else {\n# $this->data['arguments'][$argName]\
\ = $this->cloneVar($argValue);\n# }\n# }\n# \n# foreach ($command->options as\
\ $optName => $optValue) {\n# if ($baseDefinition->hasOption($optName)) {\n# $this->data['application_inputs']['--'.$optName]\
\ = $this->cloneVar($optValue);\n# } else {\n# $this->data['options'][$optName]\
\ = $this->cloneVar($optValue);\n# }\n# }\n# }\n# \n# public function getName():\
\ string\n# {\n# return 'command';\n# }\n# \n# /**\n# * @return array{\n# * \
\ class?: class-string,\n# * executor?: string,\n# * file: string,\n\
# * line: int,\n# * }"
- name: getInterruptedBySignal
visibility: public
parameters: []
comment: null
- name: getDuration
visibility: public
parameters: []
comment: null
- name: getMaxMemoryUsage
visibility: public
parameters: []
comment: null
- name: getVerbosityLevel
visibility: public
parameters: []
comment: null
- name: getInteractive
visibility: public
parameters: []
comment: null
- name: getValidateInput
visibility: public
parameters: []
comment: null
- name: getEnabled
visibility: public
parameters: []
comment: null
- name: getVisible
visibility: public
parameters: []
comment: null
- name: getInput
visibility: public
parameters: []
comment: null
- name: getOutput
visibility: public
parameters: []
comment: null
- name: getArguments
visibility: public
parameters: []
comment: '# * @return Data[]'
- name: getOptions
visibility: public
parameters: []
comment: '# * @return Data[]'
- name: getApplicationInputs
visibility: public
parameters: []
comment: '# * @return Data[]'
- name: getInteractiveInputs
visibility: public
parameters: []
comment: '# * @return Data[]'
- name: getSignalable
visibility: public
parameters: []
comment: null
- name: getHandledSignals
visibility: public
parameters: []
comment: null
- name: getHelperSet
visibility: public
parameters: []
comment: '# * @return Data[]'
- name: reset
visibility: public
parameters: []
comment: null
traits:
- Symfony\Component\Console\Command\Command
- Symfony\Component\Console\Debug\CliRequest
- Symfony\Component\Console\Output\OutputInterface
- Symfony\Component\Console\SignalRegistry\SignalMap
- Symfony\Component\HttpFoundation\Request
- Symfony\Component\HttpFoundation\Response
- Symfony\Component\HttpKernel\DataCollector\DataCollector
- Symfony\Component\VarDumper\Cloner\Data
interfaces: []