$sources
$sources : array
cache for Smarty_Template_Source instances
Smarty Internal Plugin Resource File
Implements the file system as resource for Smarty templates
getContent(\Smarty_Template_Source $source) : string
Load template's source from file into current template object
\Smarty_Template_Source | $source | source object |
if source cannot be loaded
template source
populate(\Smarty_Template_Source $source, \Smarty_Internal_Template $_template = null)
populate Source Object with meta data from Resource
\Smarty_Template_Source | $source | source object |
\Smarty_Internal_Template | $_template | template object |
populateTimestamp(\Smarty_Template_Source $source)
populate Source Object with timestamp and exists from Resource
\Smarty_Template_Source | $source | source object |
populateCompiledFilepath(\Smarty_Template_Compiled $compiled, \Smarty_Internal_Template $_template)
populate Compiled Object with compiled filepath
\Smarty_Template_Compiled | $compiled | compiled object |
\Smarty_Internal_Template | $_template | template object |
getBasename(\Smarty_Template_Source $source) : string
Determine basename for compiled filename
\Smarty_Template_Source | $source | source object |
resource's basename
load(\Smarty $smarty, string $type) : \Smarty_Resource
Load Resource Handler
\Smarty | $smarty | smarty object |
string | $type | name of the resource |
Resource Handler
getUniqueTemplateName(string $smarty, string $template_resource) : string
modify template_resource according to resource handlers specifications
string | $smarty | Smarty instance |
string | $template_resource | template_resource to extracate resource handler and name of |
unique resource name
source(\Smarty_Internal_Template $_template = null, \Smarty $smarty = null, string $template_resource = null) : \Smarty_Template_Source
initialize Source Object for given resource
Either [$_template] or [$smarty, $template_resource] must be specified
\Smarty_Internal_Template | $_template | template object |
\Smarty | $smarty | smarty object |
string | $template_resource | resource identifier |
Source Object
config(\Smarty_Internal_Config $_config) : \Smarty_Config_Source
initialize Config Source Object for given resource
\Smarty_Internal_Config | $_config | config object |
Source Object
buildUniqueResourceName(\Smarty $smarty, string $resource_name) : string
modify resource_name according to resource handlers specifications
\Smarty | $smarty | Smarty instance |
string | $resource_name | resource_name to make unique |
unique resource name
buildFilepath(\Smarty_Template_Source $source, \Smarty_Internal_Template $_template = null) : string
build template filepath by traversing the template_dir array
\Smarty_Template_Source | $source | source object |
\Smarty_Internal_Template | $_template | template object |
if default template handler is registered but not callable
fully qualified filepath
fileExists(\Smarty_Template_Source $source, string $file) : boolean
test is file exists and save timestamp
\Smarty_Template_Source | $source | source object |
string | $file | file name |
true if file exists
parseResourceName(string $resource_name, string $default_resource, $name, $type) : void
extract resource_type and resource_name from template_resource and config_resource
string | $resource_name | template_resource or config_resource to parse |
string | $default_resource | the default resource_type defined in $smarty |
$name | ||
$type |