Implements the streams as resource for Smarty template
Methods
initialize Config Source Object for given resource
config(\Smarty_Internal_Config $_config) : \Smarty_Config_Source
InheritedStatic
inherited_from |
\Smarty_Resource::config() |
inherited_from |
\Smarty_Resource_Recompiled::config() |
Parameters
$_config
\Smarty_Internal_Config
config object
Returns
Load template's source from stream into current template object
getContent(\Smarty_Template_Source $source) : string
Parameters
Exceptions
Returns
string
template source
modify template_resource according to resource handlers specifications
getUniqueTemplateName(string $smarty, string $template_resource) : string
InheritedStatic
inherited_from |
\Smarty_Resource::getUniqueTemplateName() |
inherited_from |
\Smarty_Resource_Recompiled::getUniqueTemplateName() |
Parameters
$smarty
string
Smarty instance
$template_resource
string
template_resource to extracate resource handler and name of
Returns
string
unique resource name
Load Resource Handler
load(\Smarty $smarty, string $type) : \Smarty_Resource
InheritedStatic
inherited_from |
\Smarty_Resource::load() |
inherited_from |
\Smarty_Resource_Recompiled::load() |
Parameters
$type
string
name of the resource
Returns
populate Source Object with meta data from Resource
populate(\Smarty_Template_Source $source, \Smarty_Internal_Template $_template) : void
populate Compiled Object with compiled filepath
populateCompiledFilepath(\Smarty_Template_Compiled $compiled, \Smarty_Internal_Template $_template) : void
Inherited
inherited_from |
\Smarty_Resource_Recompiled::populateCompiledFilepath() |
Parameters
populate Source Object with timestamp and exists from Resource
populateTimestamp(\Smarty_Template_Source $source)
Inherited
inherited_from |
\Smarty_Resource::populateTimestamp() |
inherited_from |
\Smarty_Resource_Recompiled::populateTimestamp() |
Parameters
initialize Source Object for given resource
source(\Smarty_Internal_Template $_template, \Smarty $smarty, string $template_resource) : \Smarty_Template_Source
InheritedStatic
Either [$_template] or [$smarty, $template_resource] must be specified
inherited_from |
\Smarty_Resource::source() |
inherited_from |
\Smarty_Resource_Recompiled::source() |
Parameters
$template_resource
string
resource identifier
Returns
build template filepath by traversing the template_dir array
buildFilepath(\Smarty_Template_Source $source, \Smarty_Internal_Template $_template) : string
Inherited
inherited_from |
\Smarty_Resource::buildFilepath() |
inherited_from |
\Smarty_Resource_Recompiled::buildFilepath() |
Parameters
Exceptions
Returns
string
fully qualified filepath
modify resource_name according to resource handlers specifications
buildUniqueResourceName(\Smarty $smarty, string $resource_name) : string
Parameters
$resource_name
string
resource_name to make unique
Returns
string
unique resource name
test is file exists and save timestamp
fileExists(\Smarty_Template_Source $source, string $file) : bool
Inherited
inherited_from |
\Smarty_Resource::fileExists() |
inherited_from |
\Smarty_Resource_Recompiled::fileExists() |
Parameters
Returns
bool
true if file exists
Determine basename for compiled filename
getBasename(\Smarty_Template_Source $source) : string
Inherited
inherited_from |
\Smarty_Resource::getBasename() |
inherited_from |
\Smarty_Resource_Recompiled::getBasename() |
Parameters
Returns
string
resource's basename
Normalize Paths "foo/.
normalizePath(string $_path, boolean $ds) : string
Inherited
inherited_from |
\Smarty_Resource::normalizePath() |
inherited_from |
\Smarty_Resource_Recompiled::normalizePath() |
Parameters
$_path
string
path to normalize
$ds
boolean
respect windows directory separator
Returns
string
normalized path
extract resource_type and resource_name from template_resource and config_resource
parseResourceName(string $resource_name, string $default_resource, string $name, string $type) : void
InheritedStatic
note |
"C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including). |
inherited_from |
\Smarty_Resource::parseResourceName() |
inherited_from |
\Smarty_Resource_Recompiled::parseResourceName() |
Parameters
$resource_name
string
template_resource or config_resource to parse
$default_resource
string
the default resource_type defined in $smarty
$name
string
&$name the parsed resource name
$type
string
&$type the parsed resource type
Properties
$compileds : array
Inherited
inherited_from |
\Smarty_Resource::$$compileds |
inherited_from |
\Smarty_Resource_Recompiled::$$compileds |
$compiler_class : string
Inherited
inherited_from |
\Smarty_Resource::$$compiler_class |
inherited_from |
\Smarty_Resource_Recompiled::$$compiler_class |
$resources : array
Inherited
inherited_from |
\Smarty_Resource::$$resources |
inherited_from |
\Smarty_Resource_Recompiled::$$resources |
$sources : array
Inherited
inherited_from |
\Smarty_Resource::$$sources |
inherited_from |
\Smarty_Resource_Recompiled::$$sources |
$template_lexer_class : string
Inherited
inherited_from |
\Smarty_Resource::$$template_lexer_class |
inherited_from |
\Smarty_Resource_Recompiled::$$template_lexer_class |
$template_parser_class : string
Inherited
inherited_from |
\Smarty_Resource::$$template_parser_class |
inherited_from |
\Smarty_Resource_Recompiled::$$template_parser_class |
$sysplugins : array
Inherited
inherited_from |
\Smarty_Resource::$$sysplugins |
inherited_from |
\Smarty_Resource_Recompiled::$$sysplugins |