Class BasicTemplateResolver
Resolves templates pathname.
-
ICanBoogie\Render\BasicTemplateResolver
implements
ICanBoogie\Render\TemplateResolver
uses
ICanBoogie\Render\TemplateResolverTrait
Methods summary
public
|
|
public
string|false
|
#
resolve( string $name, array $extensions, array & $tried = [] )
Parameters
- $name
- The base name of the template.
- $extensions
- The supported extensions.
- $tried
- Tried pathname collection.
Returns
string|false The pathname to the matching template or false if none match.
Inheritdoc
Implementation of
|
public
string|false
|
#
add_path( string $path, integer $weight = 0 )
Adds a path to search templates in.
Adds a path to search templates in.
Note: The path is discarded if it cannot be resolved with realpath() .
Parameters
Returns
string|false The real path, or false if the path was not added.
|
public
array
|
#
get_paths( )
Returns the paths used to search templates.
Returns the paths used to search templates.
Returns
array
|
Properties summary
protected
array
|
$paths
An array of key/value pairs, where key if a pathname and value its weight.
An array of key/value pairs, where key if a pathname and value its weight.
|
|