Command
in package
Console command class
Tags
Table of Contents
Properties
- $help : string|null
- Command help
- $name : string|null
- Command name
- $params : string|null
- Command params
Methods
- __construct() : mixed
- Instantiate the command object
- __toString() : string
- Return the command name as string
- getHelp() : string|null
- Get the command help
- getName() : string|null
- Get the command name
- getParams() : string|null
- Get the command params
- hasHelp() : bool
- Determine if the command has help
- hasParams() : bool
- Determine if the command has params
- setHelp() : Command
- Set the command help
- setName() : Command
- Set the command name
- setParams() : Command
- Set the command params
Properties
$help
Command help
protected
string|null
$help
= null
$name
Command name
protected
string|null
$name
= null
$params
Command params
protected
string|null
$params
= null
Methods
__construct()
Instantiate the command object
public
__construct(string $name[, string|null $params = null ][, string|null $help = null ]) : mixed
Parameters
- $name : string
- $params : string|null = null
- $help : string|null = null
__toString()
Return the command name as string
public
__toString() : string
Return values
stringgetHelp()
Get the command help
public
getHelp() : string|null
Return values
string|nullgetName()
Get the command name
public
getName() : string|null
Return values
string|nullgetParams()
Get the command params
public
getParams() : string|null
Return values
string|nullhasHelp()
Determine if the command has help
public
hasHelp() : bool
Return values
boolhasParams()
Determine if the command has params
public
hasParams() : bool
Return values
boolsetHelp()
Set the command help
public
setHelp(string $help) : Command
Parameters
- $help : string
Return values
CommandsetName()
Set the command name
public
setName(string $name) : Command
Parameters
- $name : string
Return values
CommandsetParams()
Set the command params
public
setParams(string $params) : Command
Parameters
- $params : string