Trait TemplateResolverTrait
Support functions for template resolvers.
Methods summary
protected
resolve_tries( array $paths
, string $name
, array $extensions
)
: array
Resolves path tries.
The method resolves a try path collection from a collection of roots, template name, and
extension collection.
Parameters
$paths
- Template directories paths.
$name
- Template name.
$extensions
- Supported extensions.
Returns
array
A collection of candidate template pathnames.
protected
resolve_path( array $tries
, array & $tried
)
: string|null
Resolves a template path.
Resolves a template path.
The method returns the pathname of the first file matching the path collection. The tried
paths are collected in $tried
.
Parameters
Returns
string|null