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 string getUniqueTemplateName (string $smarty, string $template_resource)
static Smarty_Resource load (Smarty $smarty, string $type)
static void parseResourceName (string $resource_name, string $default_resource, string &$name, string &$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])
string buildUniqueResourceName (Smarty $smarty, string $resource_name)
bool fileExists (Smarty_Template_Source $source, string $file)
string normalizePath (string $_path, [boolean $ds = true])
void populate (Smarty_Template_Source $source, [Smarty_Internal_Template $_template = null])
Variables
Strict standards: Only variables should be passed by reference in C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0006 229032 1. {main}() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:0 0.0027 240216 2. include('C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:59 0.1463 8650352 3. phpDocumentor_setup->createDocs() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc:65 13.2331 130016152 4. phpDocumentor_IntermediateParser->Output() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Setup.inc.php:761 13.9644 131381624 5. phpDocumentor_IntermediateParser->Convert() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1865 13.9644 131381720 6. Converter->walk() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1652 25.8077 135811368 7. HTMLframesConverter->endClass() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converter.inc:1904 25.8081 135812568 8. Smarty->fetch() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 25.8111 136293648 9. include('C:\wamp\www\smarty3.1.0\development\Smarty3Doc\Smarty\PluginsInternal\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 25.8135 136453488 10. Smarty->_smarty_include() C:\wamp\www\smarty3.1.0\development\Smarty3Doc\Smarty\PluginsInternal\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:585 25.8137 136457720 11. Smarty->_compile_resource() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 25.8141 136464400 12. Smarty->_compile_source() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 25.8145 136498504 13. Smarty_Compiler->_compile_file() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 25.8156 136544152 14. Smarty_Compiler->_compile_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 25.8166 136545072 15. Smarty_Compiler->_compile_custom_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537 Strict standards: Only variables should be passed by reference in C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php on line 712 Call Stack: 0.0006 229032 1. {main}() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:0 0.0027 240216 2. include('C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpdoc:59 0.1463 8650352 3. phpDocumentor_setup->createDocs() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\phpdoc.inc:65 13.2331 130016152 4. phpDocumentor_IntermediateParser->Output() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Setup.inc.php:761 13.9644 131381624 5. phpDocumentor_IntermediateParser->Convert() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1865 13.9644 131381720 6. Converter->walk() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\IntermediateParser.inc:1652 25.8077 135811368 7. HTMLframesConverter->endClass() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converter.inc:1904 25.8081 135812568 8. Smarty->fetch() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Converters\HTML\frames\HTMLframesConverter.inc:347 25.8111 136293648 9. include('C:\wamp\www\smarty3.1.0\development\Smarty3Doc\Smarty\PluginsInternal\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php') C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1298 25.8135 136453488 10. Smarty->_smarty_include() C:\wamp\www\smarty3.1.0\development\Smarty3Doc\Smarty\PluginsInternal\26d3399f63abd43a7d72f8c21440dcb0\%%165^%%1653142046^class.tpl.php:585 25.8137 136457720 11. Smarty->_compile_resource() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1935 25.8141 136464400 12. Smarty->_compile_source() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1458 25.8145 136498504 13. Smarty_Compiler->_compile_file() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty.class.php:1523 25.8222 136573648 14. Smarty_Compiler->_compile_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:316 25.8229 136574648 15. Smarty_Compiler->_compile_custom_tag() C:\wamp\www\phpdocumentator\PhpDocumentor-1.4.3\phpDocumentor\Smarty-2.6.0\libs\Smarty_Compiler.class.php:537
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: public
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 542)

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 getUniqueTemplateName (line 488)

modify template_resource according to resource handlers specifications

  • return: unique resource name
  • access: public
static string getUniqueTemplateName (string $smarty, string $template_resource)
  • string $smarty: Smarty instance
  • string $template_resource: template_resource to extracate resource handler and name of
static method load (line 372)

Load Resource Handler

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

extract resource_type and resource_name from template_resource and config_resource

  • access: protected
static void parseResourceName (string $resource_name, string $default_resource, string &$name, string &$type)
  • string $resource_name: template_resource or config_resource to parse
  • string $default_resource: the default resource_type defined in $smarty
  • string &$name: the parsed resource name
  • string &$type: the parsed resource type
static method source (line 506)

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 201)

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])
buildUniqueResourceName (line 102)

modify resource_name according to resource handlers specifications

  • return: unique resource name
  • access: protected
string buildUniqueResourceName (Smarty $smarty, string $resource_name)
  • Smarty $smarty: Smarty instance
  • string $resource_name: resource_name to make unique

Redefined in descendants as:
fileExists (line 347)

test is file exists and save timestamp

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

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:
normalizePath (line 155)

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

  • return: normalized path
  • access: protected
string normalizePath (string $_path, [boolean $ds = true])
  • string $_path: path to normalize
  • boolean $ds: respect windows directory separator
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 113)

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 Mon, 17 Jun 2013 21:06:51 +0000 by phpDocumentor 1.4.3