Smarty Internal Plugin Resource Registered

Implements the registered resource for Smarty template

package Smarty
subpackage TemplateResources
deprecated

 Methods

initialize Config Source Object for given resource

config(\Smarty_Internal_Config $_config) : \Smarty_Config_Source
InheritedStatic
inherited_from \Smarty_Resource::config()

Parameters

$_config

\Smarty_Internal_Config

config object

Returns

\Smarty_Config_SourceSource Object

Load template's source by invoking the registered callback into current template object

getContent(\Smarty_Template_Source $source) : string

Parameters

$source

\Smarty_Template_Source

source object

Exceptions

\SmartyException if source cannot be loaded

Returns

stringtemplate source

Get timestamp (epoch) the template source was modified

getTemplateTimestamp(\Smarty_Template_Source $source) : integer | boolean

Parameters

$source

\Smarty_Template_Source

source object

Returns

integerbooleantimestamp (epoch) the template was modified, false if resources has no timestamp

modify template_resource according to resource handlers specifications

getUniqueTemplateName(string $smarty, string $template_resource) : string
InheritedStatic
inherited_from \Smarty_Resource::getUniqueTemplateName()

Parameters

$smarty

string

Smarty instance

$template_resource

string

template_resource to extracate resource handler and name of

Returns

stringunique resource name

Load Resource Handler

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

Parameters

$smarty

\Smarty

smarty object

$type

string

name of the resource

Returns

\Smarty_ResourceResource Handler

populate Source Object with meta data from Resource

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

Parameters

$source

\Smarty_Template_Source

source object

$_template

\Smarty_Internal_Template

template object

populate Compiled Object with compiled filepath

populateCompiledFilepath(\Smarty_Template_Compiled $compiled, \Smarty_Internal_Template $_template) 
Inherited
inherited_from \Smarty_Resource::populateCompiledFilepath()

Parameters

$compiled

\Smarty_Template_Compiled

compiled object

$_template

\Smarty_Internal_Template

template object

populate Source Object with timestamp and exists from Resource

populateTimestamp(\Smarty_Template_Source $source) : void

Parameters

$source

\Smarty_Template_Source

source object

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()

Parameters

$_template

\Smarty_Internal_Template

template object

$smarty

\Smarty

smarty object

$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()

Parameters

$source

\Smarty_Template_Source

source object

$_template

\Smarty_Internal_Template

template object

Exceptions

\SmartyException if default template handler is registered but not callable

Returns

stringfully qualified filepath

modify resource_name according to resource handlers specifications

buildUniqueResourceName(\Smarty $smarty, string $resource_name) : string
Inherited
inherited_from \Smarty_Resource::buildUniqueResourceName()

Parameters

$smarty

\Smarty

Smarty instance

$resource_name

string

resource_name to make unique

Returns

stringunique resource name

test is file exists and save timestamp

fileExists(\Smarty_Template_Source $source, string $file) : bool
Inherited
inherited_from \Smarty_Resource::fileExists()

Parameters

$source

\Smarty_Template_Source

source object

$file

string

file name

Returns

booltrue if file exists

Determine basename for compiled filename

getBasename(\Smarty_Template_Source $source) : string

Parameters

$source

\Smarty_Template_Source

source object

Returns

stringresource's basename

Normalize Paths "foo/.

normalizePath(string $_path, boolean $ds) : string
Inherited

./bar" to "bar"

inherited_from \Smarty_Resource::normalizePath()

Parameters

$_path

string

path to normalize

$ds

boolean

respect windows directory separator

Returns

stringnormalized 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()

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
 

$compiler_class : string
Inherited
inherited_from \Smarty_Resource::$$compiler_class
 

$resources : array
Inherited
inherited_from \Smarty_Resource::$$resources
 

$sources : array
Inherited
inherited_from \Smarty_Resource::$$sources
 

$template_lexer_class : string
Inherited
inherited_from \Smarty_Resource::$$template_lexer_class
 

$template_parser_class : string
Inherited
inherited_from \Smarty_Resource::$$template_parser_class
 

$sysplugins : array
Inherited
inherited_from \Smarty_Resource::$$sysplugins