PEEL Shopping
Open source ecommerce : PEEL Shopping
Public Member Functions | Protected Attributes
Twig_Loader_Chain Class Reference

Loads templates from other loaders. More...

Inheritance diagram for Twig_Loader_Chain:
Twig_LoaderInterface Twig_ExistsLoaderInterface

Public Member Functions

 __construct (array $loaders=array())
 Constructor. More...
 
 addLoader (Twig_LoaderInterface $loader)
 Adds a loader instance. More...
 
 getSource ($name)
 {Gets the source code of a template, given its name.
Parameters
string$nameThe name of the template to load
Returns
string The template source code
Exceptions
Twig_Error_LoaderWhen $name is not found
} More...
 
 exists ($name)
 {Check if we have the source code of a template, given its name.
Parameters
string$nameThe name of the template to check if we can load
Returns
boolean If the template source code is handled by this loader or not
} More...
 
 getCacheKey ($name)
 {Gets the cache key to use for the cache for a given template name.
Parameters
string$nameThe name of the template to load
Returns
string The cache key
Exceptions
Twig_Error_LoaderWhen $name is not found
} More...
 
 isFresh ($name, $time)
 {Returns true if the template is still fresh.
Parameters
string$nameThe template name
timestamp$timeThe last modification time of the cached template
Returns
Boolean true if the template is fresh, false otherwise
Exceptions
Twig_Error_LoaderWhen $name is not found
} More...
 

Protected Attributes

 $loaders
 

Detailed Description

Loads templates from other loaders.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file Chain.php.

Constructor & Destructor Documentation

__construct ( array  $loaders = array())

Constructor.

Parameters
Twig_LoaderInterface[]$loaders An array of loader instances

Definition at line 27 of file Chain.php.

Member Function Documentation

addLoader ( Twig_LoaderInterface  $loader)

Adds a loader instance.

Parameters
Twig_LoaderInterface$loaderA Loader instance

Definition at line 40 of file Chain.php.

exists (   $name)

{Check if we have the source code of a template, given its name.

Parameters
string$nameThe name of the template to check if we can load
Returns
boolean If the template source code is handled by this loader or not
}

Implements Twig_ExistsLoaderInterface.

Definition at line 70 of file Chain.php.

getCacheKey (   $name)

{Gets the cache key to use for the cache for a given template name.

Parameters
string$nameThe name of the template to load
Returns
string The cache key
Exceptions
Twig_Error_LoaderWhen $name is not found
}

Implements Twig_LoaderInterface.

Definition at line 101 of file Chain.php.

getSource (   $name)

{Gets the source code of a template, given its name.

Parameters
string$nameThe name of the template to load
Returns
string The template source code
Exceptions
Twig_Error_LoaderWhen $name is not found
}

Implements Twig_LoaderInterface.

Definition at line 49 of file Chain.php.

isFresh (   $name,
  $time 
)

{Returns true if the template is still fresh.

Parameters
string$nameThe template name
timestamp$timeThe last modification time of the cached template
Returns
Boolean true if the template is fresh, false otherwise
Exceptions
Twig_Error_LoaderWhen $name is not found
}

Implements Twig_LoaderInterface.

Definition at line 122 of file Chain.php.

Field Documentation

$loaders
protected

Definition at line 20 of file Chain.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.