\Pop\ConsoleCommand

Console command class

Summary

Methods
Properties
Constants
__construct()
setName()
setParams()
setHelp()
getName()
getParams()
hasParams()
getHelp()
hasHelp()
__toString()
No public properties found
No constants found
No protected methods found
$name
$params
$help
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : string

Command name

Type

string

$params

$params : string

Command params

Type

string

$help

$help : string

Command help

Type

string

Methods

__construct()

__construct(string  $name, string  $params = null, string  $help = null) : \Pop\Console\Command

Instantiate the command object

Parameters

string $name
string $params
string $help

Returns

\Pop\Console\Command

setName()

setName(string  $name) : \Pop\Console\Command

Set the command name

Parameters

string $name

Returns

\Pop\Console\Command

setParams()

setParams(string  $params) : \Pop\Console\Command

Set the command params

Parameters

string $params

Returns

\Pop\Console\Command

setHelp()

setHelp(string  $help) : \Pop\Console\Command

Set the command help

Parameters

string $help

Returns

\Pop\Console\Command

getName()

getName() : string

Get the command name

Returns

string

getParams()

getParams() : string

Get the command params

Returns

string

hasParams()

hasParams() : boolean

Determine if the command has params

Returns

boolean

getHelp()

getHelp() : string

Get the command help

Returns

string

hasHelp()

hasHelp() : boolean

Determine if the command has help

Returns

boolean

__toString()

__toString() : string

Return the command name as string

Returns

string