-
Notifications
You must be signed in to change notification settings - Fork 0
DBResource
MekDrop edited this page Jul 25, 2022
·
1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!# Imponeer\Smarty\Extensions\DBResource\DBResource
Smarty resource type to fetch template from database
Imponeer\Contracts\Smarty\Extension\SmartyResourceInterface, Imponeer\Contracts\Smarty\Extension\SmartyExtensionInterface
Smarty_Resource_Custom
Name | Description |
---|---|
__construct | Constructor. |
getName |
Name | Description |
---|---|
buildUniqueResourceName | modify resource_name according to resource handlers specifications |
checkTimestamps | - |
getBasename | Determine basename for compiled filename |
getContent | Load template's source into current template object |
getUniqueTemplateName | modify template_resource according to resource handlers specifications |
load | Load Resource Handler |
parseResourceName | extract resource_type and resource_name from template_resource and config_resource |
populate | populate Source Object with meta data from Resource |
populateTimestamp | populate Source Object with timestamp and exists from Resource |
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 |
Description
public __construct (\PDO $pdo, string $tplSetName, string $templatesTableName, string $templateSourceColumnName, string $templateModificationColumnName, string $tplSetColumnName, string $templateNameColumnName, callable $templatePathGetter, string $defaultTplSetName)
Constructor.
Parameters
-
(\PDO) $pdo
: PDO compatible database connection instance -
(string) $tplSetName
: Current template set name -
(string) $templatesTableName
: Table name where all template data are located -
(string) $templateSourceColumnName
: Column name that is used to store template source code -
(string) $templateModificationColumnName
: Column name that is used to store template modification Unix timestamp -
(string) $tplSetColumnName
: Column name that identifies template related teplate set for core -
(string) $templateNameColumnName
: Column name that identifies template file name -
(callable) $templatePathGetter
: Callable that is used to convert from database fetched data into real template path -
(string) $defaultTplSetName
: Default template set name
Return Values
void
Description
getName (void)
Parameters
This function has no parameters.
Return Values
void