Class Smarty_Resource

Description

Smarty Resource Plugin

Base implementation for resource plugins

  • abstract:

Located in /libs/sysplugins/smarty_resource.php (line 18)


	
			
Direct descendents
Class Description
Smarty_Internal_Resource_Extends Smarty Internal Plugin Resource Extends
Smarty_Internal_Resource_File Smarty Internal Plugin Resource File
Smarty_Internal_Resource_Registered Smarty Internal Plugin Resource Registered
Smarty_Internal_Resource_String Smarty Internal Plugin Resource String
Smarty_Resource_Custom Smarty Resource Plugin
Smarty_Resource_Recompiled Smarty Resource Plugin
Smarty_Resource_Uncompiled Smarty Resource Plugin
Variable Summary
static array $compileds
static array $resources
static array $sources
static array $sysplugins
Method Summary
static Smarty_Config_Source config ( $_config)
static Smarty_Resource load (Smarty $smarty, string $resource_type)
static Smarty_Template_Source source ([Smarty_Internal_Template $_template = null], [Smarty $smarty = null], [string $template_resource = null])
string buildFilepath (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
bool fileExists (Smarty_Template_Source $source, string $file)
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Variables
static array $compileds = array() (line 28)

cache for Smarty_Template_Compiled instances

  • access: public
static array $resources = array() (line 33)

cache for Smarty_Resource instances

  • access: protected
static array $sources = array() (line 23)

cache for Smarty_Template_Source instances

  • access: public
static array $sysplugins = array(
'file' => true,
'string' => true,
'extends' => true,
'stream' => true,
'eval' => true,
'php' => true
)
(line 38)

resource types provided by the core

  • access: protected
string $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler' (line 51)

Name of the Class to compile this resource's contents with

  • access: public
string $template_lexer_class = 'Smarty_Internal_Templatelexer' (line 57)

Name of the Class to tokenize this resource's contents with

  • access: public
string $template_parser_class = 'Smarty_Internal_Templateparser' (line 63)

Name of the Class to parse this resource's contents with

  • access: public
Methods
static method config (line 441)

initialize Config Source Object for given resource

  • return: Source Object
  • access: public
static Smarty_Config_Source config ( $_config)
  • Smarty_Internal_Config $_config: config object
static method load (line 325)

Load Resource Handler

  • return: Resource Handler
  • access: public
static Smarty_Resource load (Smarty $smarty, string $resource_type)
  • Smarty $smarty: smarty object
  • string $resource_type: name of the resource
static method source (line 394)

initialize Source Object for given resource

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

  • return: Source Object
  • access: public
static Smarty_Template_Source source ([Smarty_Internal_Template $_template = null], [Smarty $smarty = null], [string $template_resource = null])
buildFilepath (line 143)

build template filepath by traversing the template_dir array

  • return: fully qualified filepath
  • throws: SmartyException if default template handler is registered but not callable
  • access: protected
string buildFilepath (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
fileExists (line 300)

test is file exists and save timestamp

  • return: true if file exists
  • access: protected
bool fileExists (Smarty_Template_Source $source, string $file)
getBasename (line 313)

Determine basename for compiled filename

  • return: resource's basename
  • access: protected
string getBasename (Smarty_Template_Source $source)

Redefined in descendants as:
getContent (line 74)

Load template's source into current template object

  • return: template source
  • abstract:
  • throws: SmartyException if source cannot be loaded
  • access: public
string getContent (Smarty_Template_Source $source)

Redefined in descendants as:
populate (line 82)

populate Source Object with meta data from Resource

  • abstract:
  • access: public
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])

Redefined in descendants as:
populateCompiledFilepath (line 100)

populate Compiled Object with compiled filepath

  • access: public
void populateCompiledFilepath (Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)

Redefined in descendants as:
populateTimestamp (line 89)

populate Source Object with timestamp and exists from Resource

  • access: public
void populateTimestamp (Smarty_Template_Source $source)

Redefined in descendants as:

Documentation generated on Sat, 24 Sep 2011 20:24:07 +0200 by phpDocumentor 1.4.1