Yaffs site version 1.1
[yaffs-website] / vendor / symfony / polyfill-apcu / bootstrap.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 if (!extension_loaded('apc') && !extension_loaded('apcu')) {
13     return;
14 }
15
16 if (!function_exists('apcu_add')) {
17     function apcu_add($key, $var = null, $ttl = 0) { return apc_add($key, $var, $ttl); }
18     function apcu_cache_info($limited = false) { return apc_cache_info('user', $limited); }
19     function apcu_cas($key, $old, $new) { return apc_cas($key, $old, $new); }
20     function apcu_clear_cache() { return apc_clear_cache('user'); }
21     function apcu_dec($key, $step = 1, &$success = false) { return apc_dec($key, $step, $success); }
22     function apcu_delete($key) { return apc_delete($key); }
23     function apcu_exists($keys) { return apc_exists($keys); }
24     function apcu_fetch($key, &$success = false) { return apc_fetch($key, $success); }
25     function apcu_inc($key, $step = 1, &$success = false) { return apc_inc($key, $step, $success); }
26     function apcu_sma_info($limited = false) { return apc_sma_info($limited); }
27     function apcu_store($key, $var = null, $ttl = 0) { return apc_store($key, $var, $ttl); }
28 }
29
30 if (!class_exists('APCUIterator', false) && class_exists('APCIterator', false)) {
31     class APCUIterator extends APCIterator
32     {
33         public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE)
34         {
35             parent::__construct('user', $search, $format, $chunk_size, $list);
36         }
37     }
38 }