Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: patTemplate

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /pattemplate/patTemplate/TemplateCache.php

Documentation is available at TemplateCache.php

  1. <?PHP
  2. /**
  3.  * Base class for patTemplate template cache
  4.  *
  5.  * $Id: TemplateCache.php 219 2004-05-25 20:38:38Z schst $
  6.  *
  7.  * A template cache is used to cache the data after
  8.  * the template has been read, but before the variables
  9.  * have been added.
  10.  *
  11.  * Data is normally stored in serialized format. This
  12.  * will increase performance.
  13.  *
  14.  * This is not related to an output cache!
  15.  *
  16.  * @package        patTemplate
  17.  * @subpackage    Caches
  18.  * @author        Stephan Schmidt <[email protected]>
  19.  */
  20.  
  21. // Check to ensure this file is within the rest of the framework
  22. defined('JPATH_BASE'or die();
  23.  
  24. /**
  25.  * Base class for patTemplate template cache
  26.  *
  27.  * $Id: TemplateCache.php 219 2004-05-25 20:38:38Z schst $
  28.  *
  29.  * A template cache is used to cache the data after
  30.  * the template has been read, but before the variables
  31.  * have been added.
  32.  *
  33.  * Data is normally stored in serialized format. This
  34.  * will increase performance.
  35.  *
  36.  * This is not related to an output cache!
  37.  *
  38.  * @abstract
  39.  * @package        patTemplate
  40.  * @subpackage    Caches
  41.  * @author        Stephan Schmidt <[email protected]>
  42.  */
  43. {
  44.    /**
  45.     * load template from cache
  46.     *
  47.     * @access    public
  48.     * @param    string            cache key
  49.     * @param    integer            modification time of original template
  50.     * @return    array|boolean   either an array containing the templates or false cache could not be loaded
  51.     */
  52.     function load$key$modTime = -)
  53.     {
  54.         return false;
  55.     }
  56.  
  57.    /**
  58.     * write template to cache
  59.     *
  60.     * @access    public
  61.     * @param    string        cache key
  62.     * @param    array        templates to store
  63.     */
  64.     function write$key$templates )
  65.     {
  66.         return true;
  67.     }
  68.  
  69.    /**
  70.     * get the cache key for the input
  71.     *
  72.     * @param    mixed    input to read from.
  73.     *                     This can be a string, a filename, a resource or whatever the derived class needs to read from
  74.     * @param    array    options
  75.     * @return    string    key
  76.     */
  77.     function getKey$input$options array() )
  78.     {
  79.         return    md5$input serialize$options ) );
  80.     }
  81. }
  82. ?>

Documentation generated on Mon, 05 Mar 2007 21:29:14 +0000 by phpDocumentor 1.3.1