Level51\SakeMore\Command
Base class for each SakeMore command.
Each command can be executed via the sake dev/more COMMAND_URL_SEGMENT route.
Synopsis
class Command
{
- // members
- private HTTPRequest $request;
- // methods
- 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()
Members
private
- $request — SilverStripe\Control\HTTPRequest
Methods
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()