\Smarty_Internal_Resource_Stream

Smarty Internal Plugin Resource Stream Implements the streams as resource for Smarty template

Summary

Methods
Properties
Constants
process()
populateCompiledFilepath()
checkTimestamps()
getContent()
populate()
populateTimestamp()
buildUniqueResourceName()
getBasename()
load()
parseResourceName()
getUniqueTemplateName()
source()
renderUncompiled()
populateCompiledFilepath()
process()
$recompiled
$hasCompiledHandler
$uncompiled
$sysplugins
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$recompiled

$recompiled : boolean

Source must be recompiled on every occasion

Type

boolean

$hasCompiledHandler

$hasCompiledHandler : boolean

Flag if resource does implement populateCompiledFilepath() method

Type

boolean

$uncompiled

$uncompiled : boolean

Source is bypassing compiler

Type

boolean

$sysplugins

$sysplugins : array

resource types provided by the core

Type

array

Methods

process()

process(\Smarty_Internal_Template  $_smarty_tpl) 

compile template from source

Parameters

\Smarty_Internal_Template $_smarty_tpl

do not change variable name, is used by compiled template

Throws

\Exception

populateCompiledFilepath()

populateCompiledFilepath(\Smarty_Template_Compiled  $compiled, \Smarty_Internal_Template  $_template) : void

populate Compiled Object with compiled filepath

Parameters

\Smarty_Template_Compiled $compiled

compiled object

\Smarty_Internal_Template $_template

template object

checkTimestamps()

checkTimestamps() 

getContent()

getContent(\Smarty_Template_Source  $source) : string

Load template's source from stream into current template object

Parameters

\Smarty_Template_Source $source

source object

Throws

\SmartyException

if source cannot be loaded

Returns

string —

template source

populate()

populate(\Smarty_Template_Source  $source, \Smarty_Internal_Template  $_template = null) : void

populate Source Object with meta data from Resource

Parameters

\Smarty_Template_Source $source

source object

\Smarty_Internal_Template $_template

template object

populateTimestamp()

populateTimestamp(\Smarty_Template_Source  $source) 

populate Source Object with timestamp and exists from Resource

Parameters

\Smarty_Template_Source $source

source object

buildUniqueResourceName()

buildUniqueResourceName(\Smarty  $smarty, string  $resource_name, boolean  $isConfig = false) : string

modify resource_name according to resource handlers specifications

Parameters

\Smarty $smarty

Smarty instance

string $resource_name

resource_name to make unique

boolean $isConfig

flag for config resource

Returns

string —

unique resource name

getBasename()

getBasename(\Smarty_Template_Source  $source) : string

Determine basename for compiled filename

Parameters

\Smarty_Template_Source $source

source object

Returns

string —

resource's basename

load()

load(\Smarty  $smarty, string  $type) : \Smarty_Resource

Load Resource Handler

Parameters

\Smarty $smarty

smarty object

string $type

name of the resource

Throws

\SmartyException

Returns

\Smarty_Resource

Resource Handler

parseResourceName()

parseResourceName(string  $resource_name, string  $default_resource) : array

extract resource_type and resource_name from template_resource and config_resource

Parameters

string $resource_name

template_resource or config_resource to parse

string $default_resource

the default resource_type defined in $smarty

Returns

array —

with parsed resource name and type

getUniqueTemplateName()

getUniqueTemplateName(\Smarty_Internal_Template|\Smarty  $obj, string  $template_resource) : string

modify template_resource according to resource handlers specifications

Parameters

\Smarty_Internal_Template|\Smarty $obj

Smarty instance

string $template_resource

template_resource to extract resource handler and name of

Returns

string —

unique resource name

source()

source(\Smarty_Internal_Template  $_template = null, \Smarty  $smarty = null, string  $template_resource = null) : \Smarty_Template_Source

initialize Source Object for given resource wrapper for backward compatibility to versions < 3.1.22 Either [$_template] or [$smarty, $template_resource] must be specified

Parameters

\Smarty_Internal_Template $_template

template object

\Smarty $smarty

smarty object

string $template_resource

resource identifier

Returns

\Smarty_Template_Source

Source Object

renderUncompiled()

renderUncompiled(\Smarty_Template_Source  $source, \Smarty_Internal_Template  $_template) : void

Parameters

\Smarty_Template_Source $source
\Smarty_Internal_Template $_template

populateCompiledFilepath()

populateCompiledFilepath(\Smarty_Template_Compiled  $compiled, \Smarty_Internal_Template  $_template) : void

Parameters

\Smarty_Template_Compiled $compiled
\Smarty_Internal_Template $_template

process()

process(\Smarty_Internal_Template  $_smarty_tpl) : void

Parameters

\Smarty_Internal_Template $_smarty_tpl