first commit
This commit is contained in:
106
modules/inpostshipping/vendor/symfony/polyfill-apcu/Apcu.php
vendored
Normal file
106
modules/inpostshipping/vendor/symfony/polyfill-apcu/Apcu.php
vendored
Normal 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
modules/inpostshipping/vendor/symfony/polyfill-apcu/LICENSE
vendored
Normal file
19
modules/inpostshipping/vendor/symfony/polyfill-apcu/LICENSE
vendored
Normal 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.
|
||||
12
modules/inpostshipping/vendor/symfony/polyfill-apcu/README.md
vendored
Normal file
12
modules/inpostshipping/vendor/symfony/polyfill-apcu/README.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Symfony Polyfill / APCu
|
||||
========================
|
||||
|
||||
This component provides `apcu_*` functions and the `APCuIterator` class to users of the legacy APC extension.
|
||||
|
||||
More information can be found in the
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
This library is released under the [MIT license](LICENSE).
|
||||
79
modules/inpostshipping/vendor/symfony/polyfill-apcu/bootstrap.php
vendored
Normal file
79
modules/inpostshipping/vendor/symfony/polyfill-apcu/bootstrap.php
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
<?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 (extension_loaded('Zend Data Cache')) {
|
||||
if (!function_exists('apcu_add')) {
|
||||
function apcu_add($key, $var = null, $ttl = 0) { return p\Apcu::apcu_add($key, $var, $ttl); }
|
||||
}
|
||||
if (!function_exists('apcu_delete')) {
|
||||
function apcu_delete($key) { return p\Apcu::apcu_delete($key); }
|
||||
}
|
||||
if (!function_exists('apcu_exists')) {
|
||||
function apcu_exists($keys) { return p\Apcu::apcu_exists($keys); }
|
||||
}
|
||||
if (!function_exists('apcu_fetch')) {
|
||||
function apcu_fetch($key, &$success = null) { return p\Apcu::apcu_fetch($key, $success); }
|
||||
}
|
||||
if (!function_exists('apcu_store')) {
|
||||
function apcu_store($key, $var = null, $ttl = 0) { return p\Apcu::apcu_store($key, $var, $ttl); }
|
||||
}
|
||||
} else {
|
||||
if (!function_exists('apcu_add')) {
|
||||
function apcu_add($key, $var = null, $ttl = 0) { return apc_add($key, $var, $ttl); }
|
||||
}
|
||||
if (!function_exists('apcu_delete')) {
|
||||
function apcu_delete($key) { return apc_delete($key); }
|
||||
}
|
||||
if (!function_exists('apcu_exists')) {
|
||||
function apcu_exists($keys) { return apc_exists($keys); }
|
||||
}
|
||||
if (!function_exists('apcu_fetch')) {
|
||||
function apcu_fetch($key, &$success = null) { return apc_fetch($key, $success); }
|
||||
}
|
||||
if (!function_exists('apcu_store')) {
|
||||
function apcu_store($key, $var = null, $ttl = 0) { return apc_store($key, $var, $ttl); }
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('apcu_cache_info')) {
|
||||
function apcu_cache_info($limited = false) { return apc_cache_info('user', $limited); }
|
||||
}
|
||||
if (!function_exists('apcu_cas')) {
|
||||
function apcu_cas($key, $old, $new) { return apc_cas($key, $old, $new); }
|
||||
}
|
||||
if (!function_exists('apcu_clear_cache')) {
|
||||
function apcu_clear_cache() { return apc_clear_cache('user'); }
|
||||
}
|
||||
if (!function_exists('apcu_dec')) {
|
||||
function apcu_dec($key, $step = 1, &$success = false) { return apc_dec($key, $step, $success); }
|
||||
}
|
||||
if (!function_exists('apcu_inc')) {
|
||||
function apcu_inc($key, $step = 1, &$success = false) { return apc_inc($key, $step, $success); }
|
||||
}
|
||||
if (!function_exists('apcu_sma_info')) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
35
modules/inpostshipping/vendor/symfony/polyfill-apcu/composer.json
vendored
Normal file
35
modules/inpostshipping/vendor/symfony/polyfill-apcu/composer.json
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "symfony/polyfill-apcu",
|
||||
"type": "library",
|
||||
"description": "Symfony polyfill backporting apcu_* functions to lower PHP versions",
|
||||
"keywords": ["polyfill", "shim", "compatibility", "portable", "apcu"],
|
||||
"homepage": "https://symfony.com",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Polyfill\\Apcu\\": "" },
|
||||
"files": [ "bootstrap.php" ]
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.19-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
}
|
||||
}
|
||||
11
modules/inpostshipping/vendor/symfony/polyfill-apcu/index.php
vendored
Normal file
11
modules/inpostshipping/vendor/symfony/polyfill-apcu/index.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
||||
Reference in New Issue
Block a user