-
Add an argument.
This method always use the sfCommandArgument class to create an option.
-
addArguments ($arguments)
Browse code
| $arguments |
An array of arguments |
Adds an array of argument objects.
-
Add an option.
This method always use the sfCommandOption class to create an option.
-
| $options |
An array of options |
Adds an array of option objects.
-
Configures the current task.
-
-
(integer) execute ($arguments, $options)
Browse code
| $arguments |
An array of arguments |
| $options |
An array of options |
Executes the current task.
returns 0 if everything went fine, or an error code
-
Returns the aliases for the task.
returns An array of aliases for the task
-
(sfCommandArgument) getArguments ()
Browse code
Returns the argument objects.
returns An array of sfCommandArgument objects.
-
(string) getBriefDescription ()
Browse code
Returns the brief description for the task.
returns The brief description for the task
-
(string) getDetailedDescription ()
Browse code
Returns the detailed description for the task.
It also formats special string like [...|COMMENT]
depending on the current formatter.
returns The detailed description for the task
-
(string) getFullName ()
Browse code
Returns the fully qualified task name.
returns The fully qualified task name
-
Returns the task name
returns The task name
-
Returns the task namespace.
-
(sfCommandOption) getOptions ()
Browse code
Returns the options objects.
returns An array of sfCommandOption objects.
-
Returns the synopsis for the task.
-
initialize ($dispatcher, $formatter)
Browse code
| $dispatcher |
A sfEventDispatcher instance |
| $formatter |
A sfFormatter instance |
Initializes the sfTask instance.
-
| $messages |
The message as an array of lines of a single string |
Logs a message.
-
logSection ($section, $message, $size, $style)
Browse code
| $section |
The section name |
| $message |
The message |
| $size |
The maximum size of a line |
| $style |
The color scheme to apply to the section string (INFO, ERROR, or COMMAND) |
Logs a message in a section.
-
-
(integer) run ($arguments, $options)
Browse code
| $arguments |
An array of arguments |
| $options |
An array of options |
Runs the task.
returns 0 if everything went fine, or an error code
-
(integer) runFromCLI ($commandManager, $options)
Browse code
| $commandManager |
An sfCommandManager instance |
| $options |
The command line options |
Runs the task from the CLI.
returns 0 if everything went fine, or an error code
-
__construct ($dispatcher, $formatter)
Browse code
| $dispatcher |
An sfEventDispatcher instance |
| $formatter |
An sfFormatter instance |
Constructor.