Smarty_Internal_Resource_String
Smarty Internal Plugin Resource String Implements the strings as resource for Smarty template {@internal unlike eval-resources the compiled state of string-resources is saved for subsequent access}}
- Full name:
\Smarty_Internal_Resource_String
- Parent class:
\Smarty_Resource
Methods
populate
populate Source Object with meta data from Resource
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
$_template |
\Smarty_Internal_Template | template object |
getContent
Load template's source from $resource_name into current template object
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
Return Value:
template source
decode
decode base64 and urlencode
Parameters:
Parameter | Type | Description |
---|---|---|
$string |
string | template_resource to decode |
Return Value:
decoded template_resource
buildUniqueResourceName
modify resource_name according to resource handlers specifications
public buildUniqueResourceName(\Smarty $smarty, string $resource_name, bool $isConfig = false): string
Parameters:
Parameter | Type | Description |
---|---|---|
$smarty |
\Smarty | Smarty instance |
$resource_name |
string | resource_name to make unique |
$isConfig |
bool | flag for config resource |
Return Value:
unique resource name
getBasename
Determine basename for compiled filename Always returns an empty string.
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
Return Value:
resource's basename
checkTimestamps
Inherited methods
load
Load Resource Handler
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$smarty |
\Smarty | smarty object |
$type |
string | name of the resource |
Return Value:
Resource Handler
Throws:
parseResourceName
extract resource_type and resource_name from template_resource and config_resource
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$resource_name |
string | template_resource or config_resource to parse |
$default_resource |
string | the default resource_type defined in $smarty |
Return Value:
with parsed resource name and type
getUniqueTemplateName
modify template_resource according to resource handlers specifications
public static getUniqueTemplateName(\Smarty_Internal_Template|\Smarty $obj, string $template_resource): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$obj |
\Smarty_Internal_Template|\Smarty | Smarty instance |
$template_resource |
string | template_resource to extract resource handler and name of |
Return Value:
unique resource name
Throws:
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
public static source(\Smarty_Internal_Template $_template = null, \Smarty $smarty = null, string $template_resource = null): \Smarty_Template_Source
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$_template |
\Smarty_Internal_Template | template object |
$smarty |
\Smarty | smarty object |
$template_resource |
string | resource identifier |
Return Value:
Source Object
Throws:
getContent
Load template's source into current template object
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
Return Value:
template source
Throws:
if source cannot be loaded
populate
populate Source Object with meta data from Resource
public populate(\Smarty_Template_Source $source, \Smarty_Internal_Template $_template = null): mixed
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
$_template |
\Smarty_Internal_Template | template object |
populateTimestamp
populate Source Object with timestamp and exists from Resource
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
buildUniqueResourceName
modify resource_name according to resource handlers specifications
public buildUniqueResourceName(\Smarty $smarty, string $resource_name, bool $isConfig = false): string
Parameters:
Parameter | Type | Description |
---|---|---|
$smarty |
\Smarty | Smarty instance |
$resource_name |
string | resource_name to make unique |
$isConfig |
bool | flag for config resource |
Return Value:
unique resource name
getBasename
Determine basename for compiled filename
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
\Smarty_Template_Source | source object |
Return Value:
resource's basename
checkTimestamps
Automatically generated on 2025-03-18