ConsoleIO
class ConsoleIO extends SymfonyStyle implements InflectionInterface (View source)
Traits
Properties
protected | $input | ||
protected | $output |
Methods
Ask the provided parent class to inject all of the dependencies that it has and we need.
No description
No description
No description
No description
No description
No description
No description
{@inheritdoc}
Take all dependencies availble to this task and inject any that are needed into the provided task. The general pattern is that, for every FooAwareInterface that this class implements, it should test to see if the child also implements the same interface, and if so, should call $child->setFoo($this->foo).
Details
$this
inflect(InflectionInterface|mixed $parent)
Ask the provided parent class to inject all of the dependencies that it has and we need.
__construct(InputInterface $input, OutputInterface $output)
No description
input()
No description
output()
No description
say(string $text)
No description
yell(string $text, int $length = 40, string $color = 'green')
No description
protected
formattedOutput(string $text, int $length, string $format)
No description
protected string
decorationCharacter(string $nonDecorated, string $decorated)
No description
lightText($message)
{@inheritdoc}
injectDependencies(mixed $child)
Take all dependencies availble to this task and inject any that are needed into the provided task. The general pattern is that, for every FooAwareInterface that this class implements, it should test to see if the child also implements the same interface, and if so, should call $child->setFoo($this->foo).
The benefits of this are pretty large. Any time an object that implements
InflectionInterface is created, just call $child->inflect($this)
, and
any available optional dependencies will be hooked up via setter injection.
The required dependencies of an object should be provided via constructor injection, not inflection.