\pm_Hook_ApiCli

Hook for processing remote API-CLI requests

Summary

Methods
Properties
Constants
init()
defaultCommand()
helpCommand()
getArguments()
getOption()
getCommandName()
getAvailableCommands()
getAvailableOptions()
stdout()
stderr()
exitCode()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A

Properties

Methods

init()

init() 

Initialize command-line utility

defaultCommand()

defaultCommand() 

Default route if not matched any command Displays help message if not overridden

helpCommand()

helpCommand() 

Help command route Displays automatically generated message

getArguments()

getArguments() : array

Return command-line arguments

Returns

array

getOption()

getOption(string  $name, mixed  $default = null) : mixed

Retrieve the option value

Parameters

string $name
mixed $default

Returns

mixed

getCommandName()

getCommandName() : string

Return the name of the command that is called

Returns

string

getAvailableCommands()

getAvailableCommands() : array

Return the list of available commands

Returns

array

getAvailableOptions()

getAvailableOptions(string  $command) : array

Return the list of available options

Parameters

string $command

Returns

array

stdout()

stdout(string  $message) 

Print the message to stdout stream

Parameters

string $message

stderr()

stderr(string  $message) 

Print the message to stderr stream

Parameters

string $message

exitCode()

exitCode(integer  $code) 

Exit the utility with provided exit code

Parameters

integer $code