Initial commit

This commit is contained in:
2020-10-07 10:37:15 +02:00
commit ce5f440392
28157 changed files with 4429172 additions and 0 deletions

106
vendor/symfony/polyfill-apcu/Apcu.php vendored Normal file
View File

@@ -0,0 +1,106 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Polyfill\Apcu;
/**
* Apcu for Zend Server Data Cache.
*
* @author Kate Gray <opensource@codebykate.com>
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
final class Apcu
{
public static function apcu_add($key, $var = null, $ttl = 0)
{
if (!\is_array($key)) {
return apc_add($key, $var, $ttl);
}
$errors = array();
foreach ($key as $k => $v) {
if (!apc_add($k, $v, $ttl)) {
$errors[$k] = -1;
}
}
return $errors;
}
public static function apcu_store($key, $var = null, $ttl = 0)
{
if (!\is_array($key)) {
return apc_store($key, $var, $ttl);
}
$errors = array();
foreach ($key as $k => $v) {
if (!apc_store($k, $v, $ttl)) {
$errors[$k] = -1;
}
}
return $errors;
}
public static function apcu_exists($keys)
{
if (!\is_array($keys)) {
return apc_exists($keys);
}
$existing = array();
foreach ($keys as $k) {
if (apc_exists($k)) {
$existing[$k] = true;
}
}
return $existing;
}
public static function apcu_fetch($key, &$success = null)
{
if (!\is_array($key)) {
return apc_fetch($key, $success);
}
$succeeded = true;
$values = array();
foreach ($key as $k) {
$v = apc_fetch($k, $success);
if ($success) {
$values[$k] = $v;
} else {
$succeeded = false;
}
}
$success = $succeeded;
return $values;
}
public static function apcu_delete($key)
{
if (!\is_array($key)) {
return apc_delete($key);
}
$success = true;
foreach ($key as $k) {
$success = apc_delete($k) && $success;
}
return $success;
}
}

19
vendor/symfony/polyfill-apcu/LICENSE vendored Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2015-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,48 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Polyfill\Apcu as p;
if (!extension_loaded('apc') && !extension_loaded('apcu')) {
return;
}
if (!function_exists('apcu_add')) {
if (extension_loaded('Zend Data Cache')) {
function apcu_add($key, $var = null, $ttl = 0) { return p\Apcu::apcu_add($key, $var, $ttl); }
function apcu_delete($key) { return p\Apcu::apcu_delete($key); }
function apcu_exists($keys) { return p\Apcu::apcu_exists($keys); }
function apcu_fetch($key, &$success = null) { return p\Apcu::apcu_fetch($key, $success); }
function apcu_store($key, $var = null, $ttl = 0) { return p\Apcu::apcu_store($key, $var, $ttl); }
} else {
function apcu_add($key, $var = null, $ttl = 0) { return apc_add($key, $var, $ttl); }
function apcu_delete($key) { return apc_delete($key); }
function apcu_exists($keys) { return apc_exists($keys); }
function apcu_fetch($key, &$success = null) { return apc_fetch($key, $success); }
function apcu_store($key, $var = null, $ttl = 0) { return apc_store($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_inc($key, $step = 1, &$success = false) { return apc_inc($key, $step, $success); }
function apcu_sma_info($limited = false) { return apc_sma_info($limited); }
}
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);
}
}
}