Zend\View\Resolver\TemplatePathStack
Resolves view scripts based on a stack of paths
Synopsis
class TemplatePathStack
implements
ResolverInterface
{
- // constants
- const FAILURE_NO_PATHS = 'TemplatePathStack_Failure_No_Paths';
- const FAILURE_NOT_FOUND = 'TemplatePathStack_Failure_Not_Found';
- // members
- protected string $defaultSuffix;
- protected SplStack $paths;
- protected false|string $lastLookupFailure;
- protected bool $lfiProtectionOn;
- protected $useViewStream;
- protected $useStreamWrapper;
- // methods
- public void __construct()
- public void setOptions()
- public TemplatePathStack setDefaultSuffix()
- public string getDefaultSuffix()
- public TemplatePathStack addPaths()
- public TemplatePathStack setPaths()
- public static string normalizePath()
- public TemplatePathStack addPath()
- public void clearPaths()
- public SplStack getPaths()
- public TemplatePathStack setLfiProtection()
- public bool isLfiProtectionOn()
- public TemplatePathStack setUseStreamWrapper()
- public bool useStreamWrapper()
- public string resolve()
- public false|string getLastLookupFailure()
Hierarchy
Implements
Constants
Name | Value |
---|---|
FAILURE_NO_PATHS | 'TemplatePathStack_Failure_No_Paths' |
FAILURE_NOT_FOUND | 'TemplatePathStack_Failure_Not_Found' |
Members
protected
- $defaultSuffix
—
string
Default suffix to use - $lastLookupFailure
—
Zend\View\Resolver\false|string
Reason for last lookup failure - $lfiProtectionOn
—
Zend\View\Resolver\bool
Flag indicating whether or not LFI protection for rendering view scripts is enabled - $paths — Zend\Stdlib\SplStack
- $useStreamWrapper
- $useViewStream
Methods
public
- __construct() — Constructor
- addPath() — Add a single path to the stack
- addPaths() — Add many paths to the stack at once
- clearPaths() — Clear all paths
- getDefaultSuffix() — Get default file suffix
- getLastLookupFailure() — Get the last lookup failure message, if any
- getPaths() — Returns stack of paths
- isLfiProtectionOn() — Return status of LFI protection flag
- normalizePath() — Normalize a path for insertion in the stack
- resolve() — Retrieve the filesystem path to a view script
- setDefaultSuffix() — Set default file suffix
- setLfiProtection() — Set LFI protection flag
- setOptions() — Configure object
- setPaths() — Rest the path stack to the paths provided
- setUseStreamWrapper() — Set flag indicating if stream wrapper should be used if short_open_tag is off
- useStreamWrapper() — Should the stream wrapper be used if short_open_tag is off?