TranslationDebugCommand
class TranslationDebugCommand extends ContainerAwareCommand
Helps finding unused or missing translation messages in a given locale and comparing them with the fallback ones.
Constants
MESSAGE_MISSING |
|
MESSAGE_UNUSED |
|
MESSAGE_EQUALS_FALLBACK |
|
Methods
Checks whether the command is enabled or not in the current environment.
Merges the application definition with the command definition.
Gets the InputDefinition to be used to create representations of this Command.
Adds an argument.
Adds an option.
Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
Details
in Command at line line 54
__construct(string|null $name = null)
Constructor.
in Command at line line 74
ignoreValidationErrors()
Ignores validation errors.
This is mainly useful for the help command.
in Command at line line 84
setApplication(Application $application = null)
Sets the application instance for this command.
in Command at line line 119
Application
getApplication()
Gets the application instance for this command.
in Command at line line 132
bool
isEnabled()
Checks whether the command is enabled or not in the current environment.
Override this to check for x or y and return false if the command can not run properly under the current conditions.
in Command at line line 210
int
run(InputInterface $input, OutputInterface $output)
Runs the command.
The code to execute is either defined directly with the setCode() method or by overriding the execute() method in a sub-class.
in Command at line line 276
Command
setCode(callable $code)
Sets the code to execute when running this command.
If this method is used, it overrides the code defined in the execute() method.
in Command at line line 297
mergeApplicationDefinition(bool $mergeArgs = true)
Merges the application definition with the command definition.
This method is not part of public API and should not be used directly.
in Command at line line 324
Command
setDefinition(array|InputDefinition $definition)
Sets an array of argument and option instances.
in Command at line line 342
InputDefinition
getDefinition()
Gets the InputDefinition attached to this Command.
in Command at line line 357
InputDefinition
getNativeDefinition()
Gets the InputDefinition to be used to create representations of this Command.
Can be overridden to provide the original command representation when it would otherwise be changed by merging with the application InputDefinition.
This method is not part of public API and should not be used directly.
in Command at line line 372
Command
addArgument(string $name, int $mode = null, string $description = '', mixed $default = null)
Adds an argument.
in Command at line line 390
Command
addOption(string $name, string $shortcut = null, int $mode = null, string $description = '', mixed $default = null)
Adds an option.
in Command at line line 411
Command
setName(string $name)
Sets the name of the command.
This method can set both the namespace and the name if you separate them by a colon (:)
$command->setName('foo:bar');
in Command at line line 432
Command
setProcessTitle(string $title)
Sets the process title of the command.
This feature should be used only when creating a long process command, like a daemon.
PHP 5.5+ or the proctitle PECL library is required
in Command at line line 444
string
getName()
Returns the command name.
in Command at line line 456
Command
setDescription(string $description)
Sets the description for the command.
in Command at line line 468
string
getDescription()
Returns the description for the command.
in Command at line line 492
string
getHelp()
Returns the help for the command.
in Command at line line 503
string
getProcessedHelp()
Returns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
in Command at line line 548
array
getAliases()
Returns the aliases for the command.
in Command at line line 560
string
getSynopsis(bool $short = false)
Returns the synopsis for the command.
in Command at line line 576
addUsage(string $usage)
Add a command usage example.
in Command at line line 592
array
getUsages()
Returns alternative usages of the command.
in Command at line line 606
mixed
getHelper(string $name)
Gets a helper instance by name.
in ContainerAwareCommand at line line 52
setContainer(ContainerInterface $container = null)
Sets the container.