PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes
Smarty_Resource Class Reference
Inheritance diagram for Smarty_Resource:
Smarty_Internal_Resource_Extends Smarty_Internal_Resource_File Smarty_Internal_Resource_Registered Smarty_Internal_Resource_String Smarty_Resource_Custom Smarty_Resource_Recompiled Smarty_Resource_Uncompiled Smarty_Internal_Resource_Eval Smarty_Internal_Resource_Stream Smarty_Internal_Resource_PHP

Public Member Functions

 getContent (Smarty_Template_Source $source)
 Load template's source into current template object. More...
 
 populate (Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
 populate Source Object with meta data from Resource More...
 
 populateTimestamp (Smarty_Template_Source $source)
 populate Source Object with timestamp and exists from Resource More...
 
 populateCompiledFilepath (Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
 populate Compiled Object with compiled filepath More...
 

Static Public Member Functions

static load (Smarty $smarty, $type)
 Load Resource Handler. More...
 
static getUniqueTemplateName ($smarty, $template_resource)
 modify resource_name according to resource handlers specifications More...
 
static source (Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null)
 initialize Source Object for given resource More...
 
static config (Smarty_Internal_Config $_config)
 initialize Config Source Object for given resource More...
 

Data Fields

 $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler'
 
 $template_lexer_class = 'Smarty_Internal_Templatelexer'
 
 $template_parser_class = 'Smarty_Internal_Templateparser'
 

Static Public Attributes

static $sources = array()
 
static $compileds = array()
 
static $resources = array()
 

Protected Member Functions

 buildUniqueResourceName (Smarty $smarty, $resource_name)
 modify resource_name according to resource handlers specifications More...
 
 normalizePath ($_path, $ds=true)
 Normalize Paths "foo/../bar" to "bar". More...
 
 buildFilepath (Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
 build template filepath by traversing the template_dir array More...
 
 fileExists (Smarty_Template_Source $source, $file)
 test is file exists and save timestamp More...
 
 getBasename (Smarty_Template_Source $source)
 Determine basename for compiled filename. More...
 

Static Protected Member Functions

static parseResourceName ($resource_name, $default_resource, &$name, &$type)
 extract resource_type and resource_name from template_resource and config_resource More...
 

Static Protected Attributes

static $sysplugins
 

Detailed Description

Definition at line 18 of file smarty_resource.php.

Member Function Documentation

buildFilepath ( Smarty_Template_Source  $source,
Smarty_Internal_Template  $_template = null 
)
protected

build template filepath by traversing the template_dir array

Parameters
Smarty_Template_Source$sourcesource object
Smarty_Internal_Template$_templatetemplate object
Returns
string fully qualified filepath
Exceptions
SmartyExceptionif default template handler is registered but not callable

Definition at line 201 of file smarty_resource.php.

buildUniqueResourceName ( Smarty  $smarty,
  $resource_name 
)
protected

modify resource_name according to resource handlers specifications

Parameters
Smarty$smartySmarty instance
string$resource_nameresource_name to make unique
Returns
string unique resource name

Definition at line 102 of file smarty_resource.php.

static config ( Smarty_Internal_Config  $_config)
static

initialize Config Source Object for given resource

Parameters
Smarty_Internal_Config$_configconfig object
Returns
Smarty_Config_Source Source Object

Definition at line 542 of file smarty_resource.php.

fileExists ( Smarty_Template_Source  $source,
  $file 
)
protected

test is file exists and save timestamp

Parameters
Smarty_Template_Source$sourcesource object
string$filefile name
Returns
bool true if file exists

Definition at line 347 of file smarty_resource.php.

getBasename ( Smarty_Template_Source  $source)
protected

Determine basename for compiled filename.

Parameters
Smarty_Template_Source$sourcesource object
Returns
string resource's basename

Definition at line 360 of file smarty_resource.php.

getContent ( Smarty_Template_Source  $source)
abstract

Load template's source into current template object.

{

static getUniqueTemplateName (   $smarty,
  $template_resource 
)
static

modify resource_name according to resource handlers specifications

Parameters
Smarty$smartySmarty instance
string$resource_nameresource_name to make unique
Returns
string unique resource name modify template_resource according to resource handlers specifications
Parameters
string$smartySmarty instance
string$template_resourcetemplate_resource to extracate resource handler and name of
Returns
string unique resource name

Definition at line 488 of file smarty_resource.php.

static load ( Smarty  $smarty,
  $type 
)
static

Load Resource Handler.

Parameters
Smarty$smartysmarty object
string$typename of the resource
Returns
Smarty_Resource Resource Handler

Definition at line 372 of file smarty_resource.php.

normalizePath (   $_path,
  $ds = true 
)
protected

Normalize Paths "foo/../bar" to "bar".

Parameters
string$_pathpath to normalize
boolean$dsrespect windows directory separator
Returns
string normalized path

Definition at line 155 of file smarty_resource.php.

static parseResourceName (   $resource_name,
  $default_resource,
$name,
$type 
)
staticprotected

extract resource_type and resource_name from template_resource and config_resource

Note
"C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including).
Parameters
string$resource_nametemplate_resource or config_resource to parse
string$default_resourcethe default resource_type defined in $smarty
string&$namethe parsed resource name
string&$typethe parsed resource type
Returns
void

Definition at line 458 of file smarty_resource.php.

populate ( Smarty_Template_Source  $source,
Smarty_Internal_Template  $_template = null 
)
abstract

populate Source Object with meta data from Resource

Parameters
Smarty_Template_Source$sourcesource object
Smarty_Internal_Template$_templatetemplate object
populateCompiledFilepath ( Smarty_Template_Compiled  $compiled,
Smarty_Internal_Template  $_template 
)

populate Compiled Object with compiled filepath

Parameters
Smarty_Template_Compiled$compiledcompiled object
Smarty_Internal_Template$_templatetemplate object

Definition at line 113 of file smarty_resource.php.

populateTimestamp ( Smarty_Template_Source  $source)

populate Source Object with timestamp and exists from Resource

Parameters
Smarty_Template_Source$sourcesource object

Definition at line 89 of file smarty_resource.php.

static source ( Smarty_Internal_Template  $_template = null,
Smarty  $smarty = null,
  $template_resource = null 
)
static

initialize Source Object for given resource

Either [$_template] or [$smarty, $template_resource] must be specified

Parameters
Smarty_Internal_Template$_templatetemplate object
Smarty$smartysmarty object
string$template_resourceresource identifier
Returns
Smarty_Template_Source Source Object

Definition at line 506 of file smarty_resource.php.

Field Documentation

$compileds = array()
static

Definition at line 28 of file smarty_resource.php.

Definition at line 51 of file smarty_resource.php.

$resources = array()
static

Definition at line 33 of file smarty_resource.php.

$sources = array()
static

Definition at line 23 of file smarty_resource.php.

$sysplugins
staticprotected
Initial value:
= array(
'file' => true,
'string' => true,
'extends' => true,
'stream' => true,
'eval' => true,
'php' => true
)

Definition at line 38 of file smarty_resource.php.

$template_lexer_class = 'Smarty_Internal_Templatelexer'

Definition at line 57 of file smarty_resource.php.

$template_parser_class = 'Smarty_Internal_Templateparser'

Definition at line 63 of file smarty_resource.php.


The documentation for this class was generated from the following file:

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:44 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.