PHP Class Pagekit\Application\Console\Command

Inheritance: extends Symfony\Component\Console\Command\Command
Mostra file Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Property Type Description
$config array The Pagekit config.
$container Pagekit\Container The Container instance.
$description string The console command description.
$input Symfony\Component\Console\Input\InputInterface The console command input.
$name string The console command name.
$output Symfony\Component\Console\Output\OutputInterface The console command output.

Public Methods

Method Description
__construct ( ) Create a new console command instance.
abort ( string $string ) Aborts command execution.
argument ( string $key = null ) : string | array Get the value of a command argument.
ask ( string $question, string $default = null ) : string Prompt the user for input.
comment ( string $string ) Write a string as comment output.
confirm ( string $question, boolean $default = true ) : boolean Confirm a question with the user.
error ( string $string ) Write a string as error output.
info ( string $string ) Write a string as information output.
line ( string $string ) Write a string as standard output.
option ( string $key = null ) : string | array Get the value of a command option.
question ( string $string ) Write a string as question output.
secret ( string $question, boolean $fallback = true ) : string Prompt the user for input but hide the answer from the console.
setConfig ( array $config ) Set the Pagekit config.
setContainer ( Pagekit\Container $container ) Set the Pagekit application instance.

Protected Methods

Method Description
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )

Method Details

__construct() public method

Create a new console command instance.
public __construct ( )

abort() public method

Aborts command execution.
public abort ( string $string )
$string string

argument() public method

Get the value of a command argument.
public argument ( string $key = null ) : string | array
$key string
return string | array

ask() public method

Prompt the user for input.
public ask ( string $question, string $default = null ) : string
$question string
$default string
return string

comment() public method

Write a string as comment output.
public comment ( string $string )
$string string

confirm() public method

Confirm a question with the user.
public confirm ( string $question, boolean $default = true ) : boolean
$question string
$default boolean
return boolean

error() public method

Write a string as error output.
public error ( string $string )
$string string

info() public method

Write a string as information output.
public info ( string $string )
$string string

initialize() protected method

protected initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

line() public method

Write a string as standard output.
public line ( string $string )
$string string

option() public method

Get the value of a command option.
public option ( string $key = null ) : string | array
$key string
return string | array

question() public method

Write a string as question output.
public question ( string $string )
$string string

secret() public method

Prompt the user for input but hide the answer from the console.
public secret ( string $question, boolean $fallback = true ) : string
$question string
$fallback boolean
return string

setConfig() public method

Set the Pagekit config.
public setConfig ( array $config )
$config array

setContainer() public method

Set the Pagekit application instance.
public setContainer ( Pagekit\Container $container )
$container Pagekit\Container

Property Details

$config protected_oe property

The Pagekit config.
protected array $config
return array

$container protected_oe property

The Container instance.
protected Container,Pagekit $container
return Pagekit\Container

$description protected_oe property

The console command description.
protected string $description
return string

$input protected_oe property

The console command input.
protected InputInterface,Symfony\Component\Console\Input $input
return Symfony\Component\Console\Input\InputInterface

$name protected_oe property

The console command name.
protected string $name
return string

$output protected_oe property

The console command output.
protected OutputInterface,Symfony\Component\Console\Output $output
return Symfony\Component\Console\Output\OutputInterface