Level51\SakeMore\MultiCommand
Abstract base class for each SakeMore command providing more than one action.
Synopsis
class MultiCommand
extends Command
{
- // methods
- public abstract array getSubCommands()
- public void run()
- public void runSubCommand()
- public array getSubCommand()
- private void validateSubCommand()
- public void showSubCommandsInfo()
- // Inherited methods from Command
- public void setRequest()
- public HTTPRequest getRequest()
- public array getAllArgs()
- public array getArgs()
- public array getFlags()
- public bool hasFlag()
- public abstract string getUrlSegment()
- public abstract string getDescription()
- public abstract void run()
Hierarchy
Extends
Methods
private
- validateSubCommand() — Validate if the given sub command is valid / executable.
public
- getSubCommand() — Try to get the requested sub command.
- getSubCommands() — Get a list of available sub commands.
- run() — Implement the run action from the Command base class and delegate it to the subCommand handler.
- runSubCommand() — Run the sub command depending on the request.
- showSubCommandsInfo() — Default sub-command which will be executed if the MultiCommand is called without additional arguments.
Inherited from Level51\SakeMore\Command
public
- getAllArgs() — Get all request arguments.
- getArgs() — Get only the request arguments not starting with -- (flag).
- getDescription() — Description of the functionality of this specific command.
- getFlags() — Get all request argument flags (starting with --).
- getRequest()
- getUrlSegment() — Defines the url segment under which this command is callable.
- hasFlag() — Check if given flag is set on the request.
- run() — Defines the functionality of this command, this method is called on execution.
- setRequest()