PHP Class Pagekit\Application\Console\Command

Inheritance: extends Symfony\Component\Console\Command\Command
Afficher le fichier Open project: pagekit/pagekit Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Method Details

__construct() public méthode

Create a new console command instance.
public __construct ( )

abort() public méthode

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

argument() public méthode

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

ask() public méthode

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

comment() public méthode

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

confirm() public méthode

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

error() public méthode

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

info() public méthode

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

initialize() protected méthode

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 méthode

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

option() public méthode

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

question() public méthode

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

secret() public méthode

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

setConfig() public méthode

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

setContainer() public méthode

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
Résultat array

$container protected_oe property

The Container instance.
protected Container,Pagekit $container
Résultat Pagekit\Container

$description protected_oe property

The console command description.
protected string $description
Résultat string

$input protected_oe property

The console command input.
protected InputInterface,Symfony\Component\Console\Input $input
Résultat Symfony\Component\Console\Input\InputInterface

$name protected_oe property

The console command name.
protected string $name
Résultat string

$output protected_oe property

The console command output.
protected OutputInterface,Symfony\Component\Console\Output $output
Résultat Symfony\Component\Console\Output\OutputInterface