Class Dwoo_Template_File

Description

represents a Dwoo template contained in a file

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

This file is released under the LGPL "GNU Lesser General Public License" More information can be found here: http://www.gnu.org/copyleft/lesser.html

Located in /Dwoo/Template/File.php (line 22)

Dwoo_Template_String
   |
   --Dwoo_Template_File
Variable Summary
string $file
Method Summary
static Dwoo_Template_File|null templateFactory (Dwoo $dwoo, mixed $resourceId, [int $cacheTime = null], [string $cacheId = null], [string $compileId = null])
Dwoo_Template_File __construct (string $file, [int $cacheTime = null], [string $cacheId = null], [string $compileId = null])
string getCompiledFilename (Dwoo $dwoo)
string getCompiledTemplate (Dwoo $dwoo, [Dwoo_ICompiler $compiler = null])
string getResourceName ()
string getSource ()
string getUid ()
Variables
Methods
static templateFactory (line 163)

returns a new template object from the given include name, null if no include is possible (resource not found), or false if include is not permitted by this resource type

  • access: public
static Dwoo_Template_File|null templateFactory (Dwoo $dwoo, mixed $resourceId, [int $cacheTime = null], [string $cacheId = null], [string $compileId = null])
  • Dwoo $dwoo: the dwoo instance requiring it
  • mixed $resourceId: the filename (relative to this template's dir) of the template to include
  • int $cacheTime: duration of the cache validity for this template, if null it defaults to the Dwoo instance that will render this template
  • string $cacheId: the unique cache identifier of this page or anything else that makes this template's content unique, if null it defaults to the current url
  • string $compileId: the unique compiled identifier, which is used to distinguish this template from others, if null it defaults to the filename+bits of the path

Redefinition of:
Dwoo_Template_String::templateFactory()
returns false as this template type does not support inclusions
Constructor __construct (line 44)

creates a template from a file

  • access: public
Dwoo_Template_File __construct (string $file, [int $cacheTime = null], [string $cacheId = null], [string $compileId = null])
  • string $file: the path to the template file, make sure it exists
  • int $cacheTime: duration of the cache validity for this template, if null it defaults to the Dwoo instance that will render this template
  • string $cacheId: the unique cache identifier of this page or anything else that makes this template's content unique, if null it defaults to the current url
  • string $compileId: the unique compiled identifier, which is used to distinguish this template from others, if null it defaults to the filename+bits of the path

Redefinition of:
Dwoo_Template_String::__construct()
creates a template from a string
getCompiledFilename (line 196)

returns the full compiled file name and assigns a default value to it if required

  • return: the full path to the compiled file
  • access: protected
string getCompiledFilename (Dwoo $dwoo)
  • Dwoo $dwoo: the dwoo instance that requests the file name

Redefinition of:
Dwoo_Template_String::getCompiledFilename()
returns the full compiled file name and assigns a default value to it if required
getCompiledTemplate (line 66)

returns the compiled template file name

  • access: public
string getCompiledTemplate (Dwoo $dwoo, [Dwoo_ICompiler $compiler = null])
  • Dwoo $dwoo: the dwoo instance that requests it
  • Dwoo_ICompiler $compiler: the compiler that must be used

Redefinition of:
Dwoo_Template_String::getCompiledTemplate()
returns the compiled template file name
getResourceIdentifier (line 131)

returns this template's source filename

  • access: public
string getResourceIdentifier ()

Redefinition of:
Dwoo_Template_String::getResourceIdentifier()
returns the resource identifier for this template, false here as strings don't have identifiers
getResourceName (line 121)

returns the resource name for this template class

  • access: public
string getResourceName ()

Redefinition of:
Dwoo_Template_String::getResourceName()
returns the resource name for this template class
getSource (line 111)

returns the template source of this template

  • access: public
string getSource ()

Redefinition of:
Dwoo_Template_String::getSource()
returns the template source of this template
getUid (line 142)

returns an unique value identifying the current version of this template, in this case it's the unix timestamp of the last modification

  • access: public
string getUid ()

Redefinition of:
Dwoo_Template_String::getUid()
returns an unique value identifying the current version of this template, in this case it's the md4 hash of the content

Inherited Methods

Inherited From Dwoo_Template_String

Dwoo_Template_String::__construct()
Dwoo_Template_String::cache()
Dwoo_Template_String::clearCache()
Dwoo_Template_String::forceCompilation()
Dwoo_Template_String::getCachedTemplate()
Dwoo_Template_String::getCacheFilename()
Dwoo_Template_String::getCacheTime()
Dwoo_Template_String::getCompiledFilename()
Dwoo_Template_String::getCompiledTemplate()
Dwoo_Template_String::getCompiler()
Dwoo_Template_String::getName()
Dwoo_Template_String::getResourceIdentifier()
Dwoo_Template_String::getResourceName()
Dwoo_Template_String::getSource()
Dwoo_Template_String::getUid()
Dwoo_Template_String::makeDirectory()
Dwoo_Template_String::setCacheTime()
Dwoo_Template_String::templateFactory()

Documentation generated on Sat, 28 Jun 2008 01:38:23 +0200 by phpDocumentor 1.4.0