ICanBoogie
  • Documentation
  • API Reference
  • Render 0.6.x
Namespaces
  • ICanBoogie
    • Render
      • EngineCollection
      • Renderer
      • TemplateResolver
Classes
  • BasicTemplateResolver
  • EngineCollection
  • EngineNotAvailable
  • EngineNotDefined
  • PHPEngine
  • Renderer
  • StringObject
  • TemplateName
Interfaces
  • Engine
  • Exception
  • TemplateResolver
  • TemplateResolverDecorator
Traits
  • TemplateResolverDecoratorTrait
  • TemplateResolverTrait
Exceptions
  • InvalidRenderTarget
  • TemplateNotFound
Functions
  • get_engines
  • get_renderer
  • get_template_resolver
  • render

Class BasicTemplateResolver

Resolves templates pathname.

ICanBoogie\Render\BasicTemplateResolver implements ICanBoogie\Render\TemplateResolver uses ICanBoogie\Render\TemplateResolverTrait
Namespace: ICanBoogie\Render
Located at BasicTemplateResolver.php

Methods summary

public __construct( array $paths = [] )

Parameters

$paths
public resolve( string $name, array $extensions, array & $tried = [] ) : string|false

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

ICanBoogie\Render\TemplateResolver::resolve()
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

$path
$weight

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

Methods used from ICanBoogie\Render\TemplateResolverTrait

resolve_path(), resolve_tries()

Properties summary

protected $paths : array

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.

[]
Render 0.6.x – Check on GitHub – API documentation generated by ApiGen