[ Index ]
 

Code source de Joomla 1.0.13

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/includes/ -> joomla.cache.php (source)

   1  <?php
   2  /**

   3  * @version $Id: joomla.php 4097 2006-06-21 18:58:22Z stingrey $

   4  * @package Joomla

   5  * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.

   6  * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php

   7  * Joomla! is free software. This version may have been modified pursuant

   8  * to the GNU General Public License, and as distributed it includes or

   9  * is derivative of works licensed under the GNU General Public License or

  10  * other free or open source software licenses.

  11  * See COPYRIGHT.php for copyright notices and details.

  12  */
  13  
  14  // no direct access

  15  defined( '_VALID_MOS' ) or die( 'Restricted access' );
  16  define( '_JOS_CACHE_INCLUDED', 1 );
  17  
  18  require_once ( $mosConfig_absolute_path . '/includes/Cache/Lite/Function.php' );
  19  
  20  /**

  21   * Joomla! Cache Lite wrapper for adding special parameters

  22   * The class uses an aggregation for the reference to the Cache_Lite_Function 

  23   * in order to be able of calling the methods generically.

  24   * 

  25   * @package Joomla

  26   * @since 1.0.10

  27   * @access public

  28   */
  29  class JCache_Lite_Function {
  30      /** @var object internal aggregation to the Cache */

  31      var $_cache=null;
  32      
  33      /** Special constructor which is creating all required references

  34      * @param array $options options

  35      * @access public

  36      */
  37  	function JCache_Lite_Function($options = array(NULL)) {
  38          $this->_cache = new Cache_Lite_Function( $options );
  39      }
  40  
  41      /**

  42      * Calls a cacheable function or method (or not if there is already a cache for it)

  43      *

  44      * This overwritten method addes automatically special arguments to the call

  45      * Those arguments are e.g. the language if multilingual support is activated

  46      *

  47      * @return mixed result of the function/method

  48      * @access public

  49      */
  50  	function call() {
  51          $arguments = func_get_args();    
  52          
  53          // Add language to all arguments, if not already added and multilingual support is activated

  54          if( array_key_exists( 'mosConfig_multilingual_support', $GLOBALS ) && $GLOBALS['mosConfig_multilingual_support'] == 1 ) {
  55              $arguments[] = $GLOBALS['mosConfig_lang'];
  56          }
  57          
  58          $ret = call_user_func_array(array($this->_cache, 'call'), $arguments);
  59          return $ret;
  60      }
  61      
  62      /**

  63      * Clean the cache

  64      *

  65      * if no group is specified all cache files will be destroyed

  66      * else only cache files of the specified group will be destroyed

  67      *

  68      * @param string $group name of the cache group

  69      * @return boolean true if no problem

  70      * @access public

  71      */
  72  	function clean($group = false) {
  73          return  $this->_cache->clean( $group );
  74      }
  75  }
  76  ?>


Généré le : Wed Nov 21 14:43:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics