Documentation

Command
in package

Console command class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.1.0

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
string

getHelp()

Get the command help

public getHelp() : string|null
Return values
string|null

getName()

Get the command name

public getName() : string|null
Return values
string|null

getParams()

Get the command params

public getParams() : string|null
Return values
string|null

hasHelp()

Determine if the command has help

public hasHelp() : bool
Return values
bool

hasParams()

Determine if the command has params

public hasParams() : bool
Return values
bool

setHelp()

Set the command help

public setHelp(string $help) : Command
Parameters
$help : string
Return values
Command

setName()

Set the command name

public setName(string $name) : Command
Parameters
$name : string
Return values
Command

setParams()

Set the command params

public setParams(string $params) : Command
Parameters
$params : string
Return values
Command

        
On this page

Search results