Resolves view scripts based on a stack of paths

category Zend
package Zend_View
subpackage Resolver

 Methods

Constructor

__construct(null | array | \Traversable $options) 

Parameters

$options

nullarray\Traversable

Add a single path to the stack

addPath(string $path) : \Zend\View\Resolver\TemplatePathStack

Add many paths to the stack at once

addPaths(array $paths) : \Zend\View\Resolver\TemplatePathStack

Parameters

$paths

array

Returns

Clear all paths

clearPaths() : void

Get default file suffix

getDefaultSuffix() : string

Returns

string

Get the last lookup failure message, if any

getLastLookupFailure() : false | string

Returns

falsestring

Returns stack of paths

getPaths() : \Zend\Stdlib\SplStack

Return status of LFI protection flag

isLfiProtectionOn() : bool

Returns

bool

Normalize a path for insertion in the stack

normalizePath(string $path) : string

Parameters

$path

string

Returns

string

Retrieve the filesystem path to a view script

resolve(string $name, \Zend\View\Renderer\RendererInterface $renderer) : string

Parameters

$name

string

Exceptions

\Zend\View\Exception\DomainException

Returns

string

Set default file suffix

setDefaultSuffix(string $defaultSuffix) : \Zend\View\Resolver\TemplatePathStack

Parameters

$defaultSuffix

string

Returns

Set LFI protection flag

setLfiProtection(bool $flag) : \Zend\View\Resolver\TemplatePathStack

Parameters

$flag

bool

Returns

Configure object

setOptions(array | \Traversable $options) : void

Parameters

$options

array\Traversable

Exceptions

\Zend\View\Exception\InvalidArgumentException

Rest the path stack to the paths provided

setPaths(\Zend\Stdlib\SplStack | array $paths) : \Zend\View\Resolver\TemplatePathStack

Set flag indicating if stream wrapper should be used if short_open_tag is off

setUseStreamWrapper(bool $flag) : \Zend\View\Resolver\TemplatePathStack

Parameters

$flag

bool

Returns

Should the stream wrapper be used if short_open_tag is off?

useStreamWrapper() : bool

Returns true if the use_stream_wrapper flag is set, and if short_open_tag is disabled.

Returns

bool

 Properties

 

Default suffix to use

$defaultSuffix : string

Appends this suffix if the template requested does not use it.

 

Reason for last lookup failure

$lastLookupFailure : false | string

 

Flag indicating whether or not LFI protection for rendering view scripts is enabled

$lfiProtectionOn : bool

 

$paths

$paths : \Zend\Stdlib\SplStack

 

$useStreamWrapper

$useStreamWrapper 

 

$useViewStream

$useViewStream 

 Constants

 

FAILURE_NOT_FOUND

FAILURE_NOT_FOUND 

 

FAILURE_NO_PATHS

FAILURE_NO_PATHS