InputAwareMakerInterface
extends
MakerInterface
in
Lets the configureDependencies method access to the command's input.
Tags
Table of Contents
Methods
- configureCommand() : mixed
- Configure the command: set description, input arguments, options, etc.
- configureDependencies() : mixed
- Configure any library dependencies that your maker requires.
- generate() : mixed
- Called after normal code generation: allows you to do anything.
- getCommandName() : string
- Return the command name for your maker (e.g. make:report).
- interact() : mixed
- If necessary, you can use this method to interactively ask the user for input.
Methods
configureCommand()
Configure the command: set description, input arguments, options, etc.
public
configureCommand(Command $command, InputConfiguration $inputConfig) : mixed
By default, all arguments will be asked interactively. If you want to avoid that, use the $inputConfig->setArgumentAsNonInteractive() method.
Parameters
- $command : Command
- $inputConfig : InputConfiguration
configureDependencies()
Configure any library dependencies that your maker requires.
public
configureDependencies(DependencyBuilder $dependencies[, InputInterface $input = null ]) : mixed
Parameters
- $dependencies : DependencyBuilder
- $input : InputInterface = null
generate()
Called after normal code generation: allows you to do anything.
public
generate(InputInterface $input, ConsoleStyle $io, Generator $generator) : mixed
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $generator : Generator
getCommandName()
Return the command name for your maker (e.g. make:report).
public
static getCommandName() : string
Return values
stringinteract()
If necessary, you can use this method to interactively ask the user for input.
public
interact(InputInterface $input, ConsoleStyle $io, Command $command) : mixed
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $command : Command