TYPO3  7.6
Public Member Functions | Private Attributes | List of all members
HelperSet Class Reference
Inheritance diagram for HelperSet:

Public Member Functions

 __construct (array $helpers=array())
 
 set (HelperInterface $helper, $alias=null)
 
 has ($name)
 
 get ($name)
 
 setCommand (Command $command=null)
 
 getCommand ()
 
 getIterator ()
 

Private Attributes

 $helpers = array()
 
 $command
 

Detailed Description

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

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 21 of file HelperSet.php.

Constructor & Destructor Documentation

__construct ( array  $helpers = array())

Constructor.

Parameters
Helper[]$helpers An array of helper.

Definition at line 31 of file HelperSet.php.

References HelperSet\$helpers.

Member Function Documentation

get (   $name)

Gets a helper value.

Parameters
string$nameThe helper name
Returns
HelperInterface The helper instance
Exceptions
\InvalidArgumentExceptionif the helper is not defined

Definition at line 75 of file HelperSet.php.

References elseif, and HelperSet\has().

getCommand ( )

Gets the command associated with this helper set.

Returns
Command A Command instance

Definition at line 107 of file HelperSet.php.

References HelperSet\$command.

getIterator ( )

Definition at line 112 of file HelperSet.php.

has (   $name)

Returns true if the helper if defined.

Parameters
string$nameThe helper name
Returns
bool true if the helper is defined, false otherwise

Definition at line 61 of file HelperSet.php.

Referenced by HelperSet\get().

set ( HelperInterface  $helper,
  $alias = null 
)

Sets a helper.

Parameters
HelperInterface$helperThe helper instance
string$aliasAn alias

Definition at line 44 of file HelperSet.php.

setCommand ( Command  $command = null)

Sets the command associated with this helper set.

Parameters
Command$commandA Command instance

Definition at line 97 of file HelperSet.php.

References HelperSet\$command.

Member Data Documentation

$command
private

Definition at line 24 of file HelperSet.php.

Referenced by HelperSet\getCommand(), and HelperSet\setCommand().

$helpers = array()
private

Definition at line 23 of file HelperSet.php.

Referenced by HelperSet\__construct().