class ConsoleIO extends SymfonyStyle implements InflectionInterface (View source)

Traits

Properties

protected $input
protected $output

Methods

$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

formattedOutput(string $text, int $length, string $format)

No description

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).

Details

$this inflect(InflectionInterface|mixed $parent)

Ask the provided parent class to inject all of the dependencies that it has and we need.

Parameters

InflectionInterface|mixed $parent

Return Value

$this

__construct(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

input()

No description

output()

No description

say(string $text)

No description

Parameters

string $text

yell(string $text, int $length = 40, string $color = 'green')

No description

Parameters

string $text
int $length
string $color

protected formattedOutput(string $text, int $length, string $format)

No description

Parameters

string $text
int $length
string $format

protected string decorationCharacter(string $nonDecorated, string $decorated)

No description

Parameters

string $nonDecorated
string $decorated

Return Value

string

lightText($message)

{@inheritdoc}

Parameters

$message

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.

Parameters

mixed $child

An object with one or more *AwareInterfaces implemented.