class \mpf\cli\Command

class \mpf\cli\Command

-no description found-

Attributes
public mixed $debug = false

-no description found-

public string $defaultAction = "index"

-no description found-

private string $currentAction

To be set by setActiveAction() and read by getActiveAction()

private bool $error

Records if there was an error or not when trying to call the method.

Methods

protected bool applyParamsToClass ()

Apply request options to class also, not just method params;

public \mpf\cli\Command setActiveAction (string $name)

  • $name

    -no description found-

Set/change current action;

public string getActiveAction ()

Get active action name;

protected bool beforeAction (string $actionName)

  • $actionName

    name of the action to be executed, except for action part

You can overwrite this method to add portion of the code to be executed every time before action.

protected bool afterAction (string $actionName, mixed $result)

  • $actionName

    -no description found-

  • $result

    -no description found-

-no description found-

public mixed run (mixed $arguments = [])

  • $arguments

    -no description found-

-no description found-

public string[] getMethodParameters (string $name, string[] $options)

  • $name

    -no description found-

  • $options

    -no description found-

Read parameters for searched method;

public mixed callMethod (string $methodName, string[] $options)

  • $methodName

    -no description found-

  • $options

    -no description found-

Call selected method using selected options;