HelperSet represents a set of helpers to be used with a command.
- Full name:
\Symfony\Component\Console\Helper\HelperSet
- This class implements:
\IteratorAggregate
private array<string,\Symfony\Component\Console\Helper\Helper> $helpers
private $command
public __construct(\Symfony\Component\Console\Helper\Helper[] $helpers = []): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$helpers |
\Symfony\Component\Console\Helper\Helper[] | An array of helper |
public set(\Symfony\Component\Console\Helper\HelperInterface $helper, string $alias = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$helper |
\Symfony\Component\Console\Helper\HelperInterface | |
$alias |
string |
Returns true if the helper if defined.
public has(string $name): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
Gets a helper value.
public get(string $name): \Symfony\Component\Console\Helper\HelperInterface
Parameters:
Parameter | Type | Description |
---|---|---|
$name |
string |
public setCommand(\Symfony\Component\Console\Command\Command $command = null): mixed
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
Parameters:
Parameter | Type | Description |
---|---|---|
$command |
\Symfony\Component\Console\Command\Command |
Gets the command associated with this helper set.
public getCommand(): \Symfony\Component\Console\Command\Command
- Warning: this method is deprecated. This means that this method will likely be removed in a future version.
public getIterator(): \Traversable<string,\Symfony\Component\Console\Helper\Helper>