[ Index ]

PHP Cross Reference of Joomla 3.3.0

title

Body

[close]

/cli/ -> garbagecron.php (source)

   1  <?php
   2  /**
   3   * @package    Joomla.Cli
   4   *
   5   * @copyright  Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
   6   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   7   */
   8  
   9  // Initialize Joomla framework
  10  const _JEXEC = 1;
  11  
  12  // Load system defines
  13  if (file_exists(dirname(__DIR__) . '/defines.php'))
  14  {
  15      require_once dirname(__DIR__) . '/defines.php';
  16  }
  17  
  18  if (!defined('_JDEFINES'))
  19  {
  20      define('JPATH_BASE', dirname(__DIR__));
  21      require_once  JPATH_BASE . '/includes/defines.php';
  22  }
  23  
  24  // Get the framework.
  25  require_once JPATH_LIBRARIES . '/import.legacy.php';
  26  
  27  // Bootstrap the CMS libraries.
  28  require_once JPATH_LIBRARIES . '/cms.php';
  29  
  30  /**
  31   * Cron job to trash expired cache data
  32   *
  33   * @package  Joomla.Cli
  34   * @since    2.5
  35   */
  36  class GarbageCron extends JApplicationCli
  37  {
  38      /**
  39       * Entry point for the script
  40       *
  41       * @return  void
  42       *
  43       * @since   2.5
  44       */
  45  	public function doExecute()
  46      {
  47          $cache = JFactory::getCache();
  48          $cache->gc();
  49      }
  50  }
  51  
  52  JApplicationCli::getInstance('GarbageCron')->execute();


Generated: Fri May 2 13:54:24 2014 Cross-referenced by PHPXref 0.7.1