Class TemplateMapResolver

Summary

Fully Qualified Name: Laminas\View\Resolver\TemplateMapResolver
Implements: IteratorAggregate, ResolverInterface

Description

Methods

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

Method Details

__construct()

Constructor

Instantiate and optionally populate template map.

Parameter Name Type Description
$map array|\Traversable

Returns:

add()

Add an entry to the map

Parameter Name Type Description
$nameOrMap string|array|\Traversable
$path null|string

Returns: \TemplateMapResolver

get()

Retrieve a template path by name

Parameter Name Type Description
$name string

Returns: bool|string

getIterator()

IteratorAggregate: return internal iterator

Returns: \Traversable

getMap()

Retrieve the template map

Returns: array

has()

Does the resolver contain an entry for the given name?

Parameter Name Type Description
$name string

Returns: bool

merge()

Merge internal map with provided map

Parameter Name Type Description
$map array|\Traversable

Returns: \TemplateMapResolver

resolve()

Resolve a template/pattern name to a resource the renderer can consume

Parameter Name Type Description
$name string
$renderer null|\Renderer

Returns: string

setMap()

Set (overwrite) template map

Maps should be arrays or Traversable objects with name => path pairs

Parameter Name Type Description
$map array|\Traversable

Returns: \TemplateMapResolver

Top