Skip to content

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

Implements:

Imponeer\Contracts\Smarty\Extension\SmartyResourceInterface, Imponeer\Contracts\Smarty\Extension\SmartyExtensionInterface

Extend:

Smarty_Resource_Custom

Methods

Name Description
__construct Constructor.
getName

Inherited methods

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

DBResource::__construct

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


DBResource::getName

Description

 getName (void)

Parameters

This function has no parameters.

Return Values

void


Clone this wiki locally