Fully Qualified Name: | Laminas\View\Resolver\TemplateMapResolver |
Implements: | IteratorAggregate, ResolverInterface |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | TemplateMapResolver |
add() | Add an entry to the map | TemplateMapResolver |
get() | Retrieve a template path by name | TemplateMapResolver |
getIterator() | IteratorAggregate: return internal iterator | TemplateMapResolver |
getMap() | Retrieve the template map | TemplateMapResolver |
has() | Does the resolver contain an entry for the given name? | TemplateMapResolver |
merge() | Merge internal map with provided map | TemplateMapResolver |
resolve() | Resolve a template/pattern name to a resource the renderer can consume | TemplateMapResolver |
setMap() | Set (overwrite) template map | TemplateMapResolver |
Constructor
Instantiate and optionally populate template map.
Parameter Name | Type | Description |
---|---|---|
$map | array|\Traversable |
Returns:
Add an entry to the map
Parameter Name | Type | Description |
---|---|---|
$nameOrMap | string|array|\Traversable | |
$path | null|string |
Returns: \TemplateMapResolver
Retrieve a template path by name
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: bool|string
IteratorAggregate: return internal iterator
Returns: \Traversable
Retrieve the template map
Returns: array
Does the resolver contain an entry for the given name?
Parameter Name | Type | Description |
---|---|---|
$name | string |
Returns: bool
Merge internal map with provided map
Parameter Name | Type | Description |
---|---|---|
$map | array|\Traversable |
Returns: \TemplateMapResolver
Resolve a template/pattern name to a resource the renderer can consume
Parameter Name | Type | Description |
---|---|---|
$name | string | |
$renderer | null|\Renderer |
Returns: string
Set (overwrite) template map
Maps should be arrays or Traversable objects with name => path pairs
Parameter Name | Type | Description |
---|---|---|
$map | array|\Traversable |
Returns: \TemplateMapResolver