Properties

$facade

$facade : string

The facade class name that the cli application will call the methods on.

Type

string

$methods

$methods : array

List of available methods/actions in the cli application.

Type

array

Methods

__construct()

__construct(string  $facade, array  $methods) 

Cli application constructor. Needs a facade name and a methods list.

Parameters

string $facade
array $methods

getCustomMethods()

getCustomMethods() 

run()

run(  $arguments) : boolean

Run the CLI applications with arguments list, return true for a success status, false for an error status.

Parameters

$arguments

Returns

boolean

getAvailableMethods()

getAvailableMethods(array|null  $customMethods = null) : \Generator

Yield all available methods.

Parameters

array|null $customMethods

pass custom methods list (calculated from the facade if missing)

Returns

\Generator

listAvailableMethods()

listAvailableMethods(array|null  $customMethods = null) 

Dump the list of available methods as textual output.

Parameters

array|null $customMethods

pass custom methods list (calculated from the facade if missing)

convertToKebabCase()

convertToKebabCase(  $string) 

Parameters

$string

convertToCamelCase()

convertToCamelCase(  $string) 

Parameters

$string

execute()

execute(  $facade,   $method,   $arguments,   $outputFile) 

Parameters

$facade
$method
$arguments
$outputFile

getNamedArgumentBySpaceDelimiter()

getNamedArgumentBySpaceDelimiter(array  $arguments,   $index,   $name) 

Parameters

array $arguments
$index
$name

getNamedArgumentByEqualOperator()

getNamedArgumentByEqualOperator(array  $arguments,   $index,   $name) 

Parameters

array $arguments
$index
$name

getNamedArgument()

getNamedArgument(array  $arguments, array  $names) 

Parameters

array $arguments
array $names