class vB5_Template_Cache_Filesystem extends vB5_Template_Cache

Class to handle fetching the template filenames when stored on the filesystem.

Note that this requires that the template file is the same path for both front end and backend code.

Constants

PLACEHOLDER_PREFIX

PLACEHOLDER_SUFIX

Properties

static protected $instance from vB5_Template_Cache
protected $cache from vB5_Template_Cache
protected $renderTemplatesInReverseOrder from vB5_Template_Cache
protected $preloadHashKey from vB5_Template_Cache
protected $preloadTemplates from vB5_Template_Cache
protected $textOnlyReplace from vB5_Template_Cache
protected array $pending from vB5_Template_Cache
protected $textOnlyTemplates

Methods

static 
instance()

No description

isTemplateText()

No description

string
register(string $templateName, array $args)

Stores template info for deferred fetching & rendering, and returns a placeholder

registerTemplateVariables(vB5_Template $templater, array $templateArgs)

Register variables in template

setRenderTemplatesInReverseOrder(bool $value)

Instructs the class to render the templates in reverse order or not

replacePlaceholders(string $content)

Replaces all template placeholders in $content with the rendered templates

getTemplate($templateId)

No description

getPlaceholder($templateName, $pos)

No description

fetchTemplate(mixed $templateName)

Receives either a template name or an array of template names to be fetched from the API

replaceTextOnly($finalRendered)

No description

__construct()

No description

Details

in vB5_Template_Cache at line 32
static instance()

at line 21
isTemplateText()

in vB5_Template_Cache at line 59
string register(string $templateName, array $args)

Stores template info for deferred fetching & rendering, and returns a placeholder

Parameters

string $templateName
array $args

Return Value

string

in vB5_Template_Cache at line 74
protected registerTemplateVariables(vB5_Template $templater, array $templateArgs)

Register variables in template

Parameters

vB5_Template $templater
array $templateArgs

in vB5_Template_Cache at line 94
setRenderTemplatesInReverseOrder(bool $value)

Instructs the class to render the templates in reverse order or not

Parameters

bool $value

in vB5_Template_Cache at line 103
replacePlaceholders(string $content)

Replaces all template placeholders in $content with the rendered templates

Parameters

string $content

in vB5_Template_Cache at line 174
getTemplate($templateId)

Parameters

$templateId

in vB5_Template_Cache at line 195
protected getPlaceholder($templateName, $pos)

Parameters

$templateName
$pos

at line 35
protected fetchTemplate(mixed $templateName)

Receives either a template name or an array of template names to be fetched from the API

Parameters

mixed $templateName

in vB5_Template_Cache at line 259
replaceTextOnly($finalRendered)

Parameters

$finalRendered

at line 26
protected __construct()