PHP Class Composer\Satis\Console\Command\InitCommand

Author: Sergey Kolodyazhnyy ([email protected])
Inheritance: extends Composer\Command\BaseCommand
Show file Open project: composer/satis

Protected Methods

Method Description
configure ( )
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer Generate configuration file
getQuestion ( string $prompt, string $default ) : Symfony\Component\Console\Question\Question Build a question
initialize ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) Print welcome message
interact ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) Interact with user
prompt ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, string $prompt, string $optionName, callable $validator ) Prompt for an input option.

Method Details

configure() protected method

protected configure ( )

execute() protected method

Generate configuration file
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer
$input Symfony\Component\Console\Input\InputInterface The input instance
$output Symfony\Component\Console\Output\OutputInterface The output instance
return integer

getQuestion() protected method

Build a question
protected getQuestion ( string $prompt, string $default ) : Symfony\Component\Console\Question\Question
$prompt string
$default string
return Symfony\Component\Console\Question\Question

initialize() protected method

Print welcome message
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

interact() protected method

Interact with user
protected interact ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface

prompt() protected method

Prompt for an input option.
protected prompt ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output, string $prompt, string $optionName, callable $validator )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
$prompt string
$optionName string For the default value and where the answer is set
$validator callable