X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fsymfony%2Fpolyfill-apcu%2Fbootstrap.php;fp=vendor%2Fsymfony%2Fpolyfill-apcu%2Fbootstrap.php;h=a5682af55ddf0fdd85d798c007606e210ad888be;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/symfony/polyfill-apcu/bootstrap.php b/vendor/symfony/polyfill-apcu/bootstrap.php new file mode 100644 index 000000000..a5682af55 --- /dev/null +++ b/vendor/symfony/polyfill-apcu/bootstrap.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (!extension_loaded('apc')) { + return; +} + +if (!function_exists('apcu_add')) { + function apcu_add($key, $var = null, $ttl = 0) { return apc_add($key, $var, $ttl); } + function apcu_cache_info($limited = false) { return apc_cache_info('user', $limited); } + function apcu_cas($key, $old, $new) { return apc_cas($key, $old, $new); } + function apcu_clear_cache() { return apc_clear_cache('user'); } + function apcu_dec($key, $step = 1, &$success = false) { return apc_dec($key, $step, $success); } + function apcu_delete($key) { return apc_delete($key); } + function apcu_exists($keys) { return apc_exists($keys); } + function apcu_fetch($key, &$success = false) { return apc_fetch($key, $success); } + function apcu_inc($key, $step = 1, &$success = false) { return apc_inc($key, $step, $success); } + function apcu_sma_info($limited = false) { return apc_sma_info($limited); } + function apcu_store($key, $var = null, $ttl = 0) { return apc_store($key, $var, $ttl); } +} + +if (!class_exists('APCUIterator', false) && class_exists('APCIterator', false)) { + class APCUIterator extends APCIterator + { + public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE) + { + parent::__construct('user', $search, $format, $chunk_size, $list); + } + } +}