class CommandHelper

Supports commands related to building console commands and associated helper classes.

Constants

private COMMAND_PATH

The path for user defined command classes.

private HELPER_PATH

The path for user defined command helper classes.

Methods

static string
commandTemplate(string $commandName)

Creates template for new command class.

static string
helperTemplate(string $helperName)

Creates new helper class.

static int
makeCommand(InputInterface $input)

Generates new class that extends Command.

static int
makeHelper(InputInterface $input)

Generates new class that contains functions that support multiple console commands.

Details

at line 30
static string commandTemplate(string $commandName)

Creates template for new command class.

Parameters

string $commandName

The name of the class.

Return Value

string

The contents for the new command class.

at line 76
static string helperTemplate(string $helperName)

Creates new helper class.

Parameters

string $helperName

The name of the helper class.

Return Value

string

The contents of the helper class.

at line 98
static int makeCommand(InputInterface $input)

Generates new class that extends Command.

Parameters

InputInterface $input

The Symfony InputInterface object.

Return Value

int

A value that indicates success, invalid, or failure.

at line 112
static int makeHelper(InputInterface $input)

Generates new class that contains functions that support multiple console commands.

Parameters

InputInterface $input

The Symfony InputInterface object.

Return Value

int

A value that indicates success, invalid, or failure.