Interface TemplateResolver
An interface for template resolvers.
Namespace: ICanBoogie\
Render
Package: ICanBoogie\Render
Located at TemplateResolver.php
Methods summary
public
resolve( string $name
, array $extensions
, array & $tried
= [] )
: string|false
Returns the pathname to the matching template.
Returns the pathname to the matching template.
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.
public
add_path( string $path
, integer $weight
= 0 )
: string|false
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
get_paths( void )
: array
Returns the paths used to search templates.
Returns the paths used to search templates.
Returns
array