Documentation

CommandInterface

Console command interface

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

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

version
5.0.0

Table of Contents

Methods

__toString()  : string
Render the command as its name and params
getHelp()  : string|null
Get the command help
getName()  : string|null
Get the command name
getParams()  : string|null
Get the command params
getScriptName()  : string|null
Get the script name the command was registered under
hasHelp()  : bool
Determine if the command has help
hasName()  : bool
Determine if the command has name
hasParams()  : bool
Determine if the command has params
hasScriptName()  : bool
Determine if the command has a script name
setHelp()  : static
Set the command help
setName()  : static
Set the command name
setParams()  : static
Set the command params
setScriptName()  : static
Set the script name the command was registered under

Methods

__toString()

Render the command as its name and params

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

getScriptName()

Get the script name the command was registered under

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

hasHelp()

Determine if the command has help

public hasHelp() : bool
Return values
bool

hasName()

Determine if the command has name

public hasName() : bool
Return values
bool

hasParams()

Determine if the command has params

public hasParams() : bool
Return values
bool

hasScriptName()

Determine if the command has a script name

public hasScriptName() : bool
Return values
bool

setHelp()

Set the command help

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

setName()

Set the command name

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

setParams()

Set the command params

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

setScriptName()

Set the script name the command was registered under

public setScriptName(string $scriptName) : static
Parameters
$scriptName : string
Return values
static

        
On this page

Search results