Console
class Console extends AbstractConsole (View source)
Class Console
Properties
IOInterface | $io | Property io. | from AbstractConsole |
Methods
Write a string to standard output.
Execute the application.
Returns a property of the object or the default value if the property is not set.
Modifies a property of the object, creating it if it does not already exist.
Get or create descriptor.
Register default command.
Register a new Console.
Get command by path.
Sets whether to automatically exit after a command execution or not.
Get the default command.
Get version.
Set version.
Get description.
Set description.
Set execute code to default command.
setUsage
setHelp
Method to get property Help
Method to get property Title
Details
at line line 84
__construct(IOInterface $io = null, Structure $config = null)
Class init.
in AbstractConsole at line line 88
AbstractConsole
out(string $text = '', boolean $nl = true)
Write a string to standard output.
in AbstractConsole at line line 102
string
in()
Get a value from standard input.
in AbstractConsole at line line 112
IOInterface
getIO()
getIo
in AbstractConsole at line line 124
AbstractConsole
setIO(IOInterface $io)
setIo
in AbstractConsole at line line 140
void
close(integer|string $message)
Method to close the application.
at line line 100
void
execute()
Execute the application.
in AbstractConsole at line line 209
mixed
get(string $key, mixed $default = null)
Returns a property of the object or the default value if the property is not set.
in AbstractConsole at line line 238
mixed
set(string $key, mixed $value = null)
Modifies a property of the object, creating it if it does not already exist.
in AbstractConsole at line line 254
AbstractConsole
setConfiguration(Structure $config)
Sets the configuration for the application.
in AbstractConsole at line line 266
Structure
getConfig()
Method to get property Config
in AbstractConsole at line line 278
AbstractConsole
setConfig(Structure $config)
Method to set property config
in AbstractConsole at line line 292
DescriptorHelperInterface|TextDescriptorHelper
getDescriptor()
Get or create descriptor.
in AbstractConsole at line line 312
AbstractConsole
setDescriptor(DescriptorHelperInterface $descriptor)
Method to set property descriptor
in AbstractConsole at line line 326
string
describeCommand(AbstractCommand $command)
describeCommand
at line line 127
int
doExecute(AbstractCommand $command = null)
Method to run the application routines.
at line line 176
int
executeByPath(string $arguments, array $options = array(), IOInterface $io = null)
executeByPath
at line line 231
AbstractCommand
register(string $name)
Register a new Console.
at line line 247
AbstractCommand
addCommand(AbstractCommand|string $command)
Add a new command object.
If a command with the same name already exists, it will be overridden.
at line line 265
AbstractCommand
getCommand(string $path)
Get command by path.
Example: getCommand('foo/bar/baz');
at line line 279
Console
setAutoExit(boolean $boolean)
Sets whether to automatically exit after a command execution or not.
at line line 293
AbstractCommand
getRootCommand()
Get the default command.
at line line 303
string
getVersion()
Get version.
at line line 331
string
getDescription()
Get description.
at line line 375
$this
setUsage(string $usage)
setUsage
at line line 389
$this
setHelp(string $help)
setHelp
at line line 401
string
getHelp()
Method to get property Help
at line line 411
string
getTitle()
Method to get property Title