[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/session/src/Handler/ -> WincacheHandler.php (source)

   1  <?php
   2  /**
   3   * Part of the Joomla Framework Session Package
   4   *
   5   * @copyright  Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
   6   * @license    GNU General Public License version 2 or later; see LICENSE
   7   */
   8  
   9  namespace Joomla\Session\Handler;
  10  
  11  use Joomla\Session\HandlerInterface;
  12  
  13  /**
  14   * Wincache session storage handler
  15   *
  16   * @since  2.0.0
  17   */
  18  class WincacheHandler extends \SessionHandler implements HandlerInterface
  19  {
  20      /**
  21       * Constructor
  22       *
  23       * @since   2.0.0
  24       */
  25  	public function __construct()
  26      {
  27          if (!headers_sent())
  28          {
  29              ini_set('session.save_handler', 'wincache');
  30          }
  31      }
  32  
  33      /**
  34       * Test to see if the HandlerInterface is available
  35       *
  36       * @return  boolean  True on success, false otherwise
  37       *
  38       * @since   2.0.0
  39       */
  40  	public static function isSupported(): bool
  41      {
  42          return \extension_loaded('wincache') && \function_exists('wincache_ucache_get') && !strcmp(ini_get('wincache.ucenabled'), '1');
  43      }
  44  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer