HelperSet

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.

HelperInterface get(string $name)

Gets a helper value.

setCommand(Command $command = null)

Sets the command associated with this helper set.

Command getCommand()

Gets the command associated with this helper set.

Helper[] getIterator()

Details

__construct(array $helpers = array())

Constructor.

Parameters

array $helpers An array of helper

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

Sets a helper.

Parameters

HelperInterface $helper The helper instance
string $alias An alias

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

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

setCommand(Command $command = null)

Sets the command associated with this helper set.

Parameters

Command $command A Command instance

Command getCommand()

Gets the command associated with this helper set.

Return Value

Command A Command instance

Helper[] getIterator()

Return Value

Helper[]
doc_Symfony
2016-10-28 06:20:22
Comments
Leave a Comment

Please login to continue.