Pneuma Framework

CliCommand extends Command
in package

Simple CLI Command implementation.

Table of Contents

Properties

$class  : string
$method  : string

Methods

setClass()  : static
Return an instance with provided classname.
setMethod()  : static
Return an instance with provided method callback.
execute()  : int
Executes the current command.

Properties

Methods

setClass()

Return an instance with provided classname.

public setClass(string $class) : static
Parameters
$class : string

The classname.

Return values
static

setMethod()

Return an instance with provided method callback.

public setMethod(string $method) : static
Parameters
$method : string

The method callback.

Return values
static

execute()

Executes the current command.

protected execute(InputInterface $input, OutputInterface $output) : int

This method is not abstract because you can use this class as a concrete class. In this case, instead of defining the execute() method, you set the code to execute by passing a Closure to the setCode() method.

Parameters
$input : InputInterface
$output : OutputInterface
Tags
see
setCode()
Return values
int

0 if everything went fine, or an exit code


        
On this page

Search results