SetAclCommand
class SetAclCommand extends ContainerAwareCommand
Sets ACL for objects.
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 XML and Text 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 57
__construct(string|null $name = null)
Constructor.
in Command at line line 77
ignoreValidationErrors()
Ignores validation errors.
This is mainly useful for the help command.
in Command at line line 87
setApplication(Application $application = null)
Sets the application instance for this command.
in Command at line line 122
Application
getApplication()
Gets the application instance for this command.
at line line 36
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 213
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 279
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 304
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 331
Command
setDefinition(array|InputDefinition $definition)
Sets an array of argument and option instances.
in Command at line line 349
InputDefinition
getDefinition()
Gets the InputDefinition attached to this Command.
in Command at line line 364
InputDefinition
getNativeDefinition()
Gets the InputDefinition to be used to create XML and Text 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 379
Command
addArgument(string $name, int $mode = null, string $description = '', mixed $default = null)
Adds an argument.
in Command at line line 397
Command
addOption(string $name, string $shortcut = null, int $mode = null, string $description = '', mixed $default = null)
Adds an option.
in Command at line line 418
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 439
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 451
string
getName()
Returns the command name.
in Command at line line 463
Command
setDescription(string $description)
Sets the description for the command.
in Command at line line 475
string
getDescription()
Returns the description for the command.
in Command at line line 499
string
getHelp()
Returns the help for the command.
in Command at line line 510
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 555
array
getAliases()
Returns the aliases for the command.
in Command at line line 567
string
getSynopsis(bool $short = false)
Returns the synopsis for the command.
in Command at line line 583
addUsage(string $usage)
Add a command usage example.
in Command at line line 599
array
getUsages()
Returns alternative usages of the command.
in Command at line line 613
mixed
getHelper(string $name)
Gets a helper instance by name.
in Command at line line 625
string
asText()
deprecated
deprecated
Returns a text representation of the command.
in Command at line line 645
string|DOMDocument
asXml(bool $asDom = false)
deprecated
deprecated
Returns an XML representation of the command.
in ContainerAwareCommand at line line 52
setContainer(ContainerInterface $container = null)
Sets the container.