Class Symfony\Component\Console\Helper\HelperSet


HelperSet represents a set of helpers to be used with a command.

Method Details

__construct() public method


public void __construct ( array $helpers = [] )
$helpers Symfony\Component\Console\Helper\Helper[]

An array of helper

get() public method

Gets a helper value.

public Symfony\Component\Console\Helper\HelperInterface get ( $name )
$name string

The helper name

return Symfony\Component\Console\Helper\HelperInterface

The helper instance

throws Symfony\Component\Console\Exception\InvalidArgumentException

if the helper is not defined

getCommand() public method

Gets the command associated with this helper set.

public Symfony\Component\Console\Command\Command getCommand ( )
return Symfony\Component\Console\Command\Command

A Command instance

getIterator() public method

public Symfony\Component\Console\Helper\Helper[] getIterator ( )
has() public method

Returns true if the helper if defined.

public bool has ( $name )
$name string

The helper name

return bool

True if the helper is defined, false otherwise

set() public method

Sets a helper.

public void set ( Symfony\Component\Console\Helper\HelperInterface $helper, $alias null )
$helper Symfony\Component\Console\Helper\HelperInterface

The helper instance

$alias string

An alias

setCommand() public method

Sets the command associated with this helper set.

public void setCommand ( Symfony\Component\Console\Command\Command $command null )
$command Symfony\Component\Console\Command\Command

A Command instance