HelperSet
in package
implements
IteratorAggregate
HelperSet represents a set of helpers to be used with a command.
Tags
Interfaces, Classes and Traits
- IteratorAggregate
Table of Contents
- $command : mixed
- $helpers : array<string|int, Helper>
- __construct() : mixed
- get() : HelperInterface
- Gets a helper value.
- getCommand() : Command
- Gets the command associated with this helper set.
- getIterator() : array<string|int, Helper>
- has() : bool
- Returns true if the helper if defined.
- set() : mixed
- setCommand() : mixed
Properties
$command
private
mixed
$command
$helpers
private
array<string|int, Helper>
$helpers
= []
Methods
__construct()
public
__construct([array<string|int, Helper> $helpers = [] ]) : mixed
Parameters
- $helpers : array<string|int, Helper> = []
-
An array of helper
Return values
mixed —get()
Gets a helper value.
public
get(string $name) : HelperInterface
Parameters
- $name : string
Tags
Return values
HelperInterface —The helper instance
getCommand()
Gets the command associated with this helper set.
public
getCommand() : Command
Return values
Command —A Command instance
getIterator()
public
getIterator() : array<string|int, Helper>
Return values
array<string|int, Helper> —has()
Returns true if the helper if defined.
public
has(string $name) : bool
Parameters
- $name : string
Return values
bool —true if the helper is defined, false otherwise
set()
public
set(HelperInterface $helper[, string $alias = null ]) : mixed
Parameters
- $helper : HelperInterface
- $alias : string = null
Return values
mixed —setCommand()
public
setCommand([Command $command = null ]) : mixed
Parameters
- $command : Command = null