class HelperSet implements IteratorAggregate

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

Methods

__construct(array $helpers = array())

Constructor.

set(HelperInterface $helper, string $alias = null)

Sets a helper.

bool
has(string $name)

Returns true if the helper if defined.

get(string $name)

Gets a helper value.

setCommand(Command $command = null)

Sets the command associated with this helper set.

getCommand()

Gets the command associated with this helper set.

getIterator()

No description

Details

at line line 32
__construct(array $helpers = array())

Constructor.

Parameters

array $helpers An array of helper.

at line line 45
set(HelperInterface $helper, string $alias = null)

Sets a helper.

Parameters

HelperInterface $helper The helper instance
string $alias An alias

at line line 62
bool has(string $name)

Returns true if the helper if defined.

Parameters

string $name The helper name

Return Value

bool true if the helper is defined, false otherwise

at line line 76
HelperInterface get(string $name)

Gets a helper value.

Parameters

string $name The helper name

Return Value

HelperInterface The helper instance

Exceptions

InvalidArgumentException if the helper is not defined

at line line 90
setCommand(Command $command = null)

Sets the command associated with this helper set.

Parameters

Command $command A Command instance

at line line 100
Command getCommand()

Gets the command associated with this helper set.

Return Value

Command A Command instance

at line line 105
getIterator()