class HelperSet implements IteratorAggregate
HelperSet represents a set of helpers to be used with a command.
__construct(array $helpers = array()) | ||
set(HelperInterface $helper, string $alias = null) Sets a helper. | ||
bool | has(string $name) Returns true if the helper if defined. | |
HelperInterface | get(string $name) Gets a helper value. | |
setCommand(Command $command = null) | ||
Command | getCommand() Gets the command associated with this helper set. | |
Helper[] | getIterator() |
array | $helpers | An array of helper |
Sets a helper.
HelperInterface | $helper | The helper instance |
string | $alias | An alias |
Returns true if the helper if defined.
string | $name | The helper name |
bool | true if the helper is defined, false otherwise |
Gets a helper value.
string | $name | The helper name |
HelperInterface | The helper instance |
InvalidArgumentException | if the helper is not defined |
Command | $command |
Gets the command associated with this helper set.
Command | A Command instance |
Helper[] |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Console/Helper/HelperSet.html