first commit
This commit is contained in:
10
modules/ps_metrics/vendor/.htaccess
vendored
Normal file
10
modules/ps_metrics/vendor/.htaccess
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Apache 2.2
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</IfModule>
|
||||
|
||||
# Apache 2.4
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
12
modules/ps_metrics/vendor/autoload.php
vendored
Normal file
12
modules/ps_metrics/vendor/autoload.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
// autoload.php @generated by Composer
|
||||
|
||||
if (PHP_VERSION_ID < 50600) {
|
||||
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8::getLoader();
|
||||
120
modules/ps_metrics/vendor/bin/analytics
vendored
Normal file
120
modules/ps_metrics/vendor/bin/analytics
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../segmentio/analytics-php/bin/analytics)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|
||||
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
|
||||
) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/segmentio/analytics-php/bin/analytics');
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
include __DIR__ . '/..'.'/segmentio/analytics-php/bin/analytics';
|
||||
11
modules/ps_metrics/vendor/bin/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/bin/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;
|
||||
572
modules/ps_metrics/vendor/composer/ClassLoader.php
vendored
Normal file
572
modules/ps_metrics/vendor/composer/ClassLoader.php
vendored
Normal file
@@ -0,0 +1,572 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
/**
|
||||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
||||
*
|
||||
* $loader = new \Composer\Autoload\ClassLoader();
|
||||
*
|
||||
* // register classes with namespaces
|
||||
* $loader->add('Symfony\Component', __DIR__.'/component');
|
||||
* $loader->add('Symfony', __DIR__.'/framework');
|
||||
*
|
||||
* // activate the autoloader
|
||||
* $loader->register();
|
||||
*
|
||||
* // to enable searching the include path (eg. for PEAR packages)
|
||||
* $loader->setUseIncludePath(true);
|
||||
*
|
||||
* In this example, if you try to use a class in the Symfony\Component
|
||||
* namespace or one of its children (Symfony\Component\Console for instance),
|
||||
* the autoloader will first look for the class under the component/
|
||||
* directory, and it will then fallback to the framework/ directory if not
|
||||
* found before giving up.
|
||||
*
|
||||
* This class is loosely based on the Symfony UniversalClassLoader.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Jordi Boggiano <j.boggiano@seld.be>
|
||||
* @see https://www.php-fig.org/psr/psr-0/
|
||||
* @see https://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
/** @var ?string */
|
||||
private $vendorDir;
|
||||
|
||||
// PSR-4
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<string, int>>
|
||||
*/
|
||||
private $prefixLengthsPsr4 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<int, string>>
|
||||
*/
|
||||
private $prefixDirsPsr4 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array<string, string[]>>
|
||||
*/
|
||||
private $prefixesPsr0 = array();
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
/** @var bool */
|
||||
private $useIncludePath = false;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
* @psalm-var array<string, string>
|
||||
*/
|
||||
private $classMap = array();
|
||||
|
||||
/** @var bool */
|
||||
private $classMapAuthoritative = false;
|
||||
|
||||
/**
|
||||
* @var bool[]
|
||||
* @psalm-var array<string, bool>
|
||||
*/
|
||||
private $missingClasses = array();
|
||||
|
||||
/** @var ?string */
|
||||
private $apcuPrefix;
|
||||
|
||||
/**
|
||||
* @var self[]
|
||||
*/
|
||||
private static $registeredLoaders = array();
|
||||
|
||||
/**
|
||||
* @param ?string $vendorDir
|
||||
*/
|
||||
public function __construct($vendorDir = null)
|
||||
{
|
||||
$this->vendorDir = $vendorDir;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, array<int, string>>
|
||||
*/
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, string>
|
||||
*/
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return array<string, string>
|
||||
*/
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string[] Array of classname => path
|
||||
* @psalm-return array<string, string>
|
||||
*/
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $classMap Class to filename map
|
||||
* @psalm-param array<string, string> $classMap
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addClassMap(array $classMap)
|
||||
{
|
||||
if ($this->classMap) {
|
||||
$this->classMap = array_merge($this->classMap, $classMap);
|
||||
} else {
|
||||
$this->classMap = $classMap;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix, either
|
||||
* appending or prepending to the ones previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function add($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr0
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr0 = array_merge(
|
||||
$this->fallbackDirsPsr0,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$first = $prefix[0];
|
||||
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
||||
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
||||
|
||||
return;
|
||||
}
|
||||
if ($prepend) {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixesPsr0[$first][$prefix]
|
||||
);
|
||||
} else {
|
||||
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
||||
$this->prefixesPsr0[$first][$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace, either
|
||||
* appending or prepending to the ones previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addPsr4($prefix, $paths, $prepend = false)
|
||||
{
|
||||
if (!$prefix) {
|
||||
// Register directories for the root namespace.
|
||||
if ($prepend) {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
(array) $paths,
|
||||
$this->fallbackDirsPsr4
|
||||
);
|
||||
} else {
|
||||
$this->fallbackDirsPsr4 = array_merge(
|
||||
$this->fallbackDirsPsr4,
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||
// Register directories for a new namespace.
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
} elseif ($prepend) {
|
||||
// Prepend directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
(array) $paths,
|
||||
$this->prefixDirsPsr4[$prefix]
|
||||
);
|
||||
} else {
|
||||
// Append directories for an already registered namespace.
|
||||
$this->prefixDirsPsr4[$prefix] = array_merge(
|
||||
$this->prefixDirsPsr4[$prefix],
|
||||
(array) $paths
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-0 directories for a given prefix,
|
||||
* replacing any others previously set for this prefix.
|
||||
*
|
||||
* @param string $prefix The prefix
|
||||
* @param string[]|string $paths The PSR-0 base directories
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr0 = (array) $paths;
|
||||
} else {
|
||||
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a set of PSR-4 directories for a given namespace,
|
||||
* replacing any others previously set for this namespace.
|
||||
*
|
||||
* @param string $prefix The prefix/namespace, with trailing '\\'
|
||||
* @param string[]|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPsr4($prefix, $paths)
|
||||
{
|
||||
if (!$prefix) {
|
||||
$this->fallbackDirsPsr4 = (array) $paths;
|
||||
} else {
|
||||
$length = strlen($prefix);
|
||||
if ('\\' !== $prefix[$length - 1]) {
|
||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||
}
|
||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on searching the include path for class files.
|
||||
*
|
||||
* @param bool $useIncludePath
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setUseIncludePath($useIncludePath)
|
||||
{
|
||||
$this->useIncludePath = $useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to check if the autoloader uses the include path to check
|
||||
* for classes.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUseIncludePath()
|
||||
{
|
||||
return $this->useIncludePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off searching the prefix and fallback directories for classes
|
||||
* that have not been registered with the class map.
|
||||
*
|
||||
* @param bool $classMapAuthoritative
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setClassMapAuthoritative($classMapAuthoritative)
|
||||
{
|
||||
$this->classMapAuthoritative = $classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* Should class lookup fail if not found in the current class map?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isClassMapAuthoritative()
|
||||
{
|
||||
return $this->classMapAuthoritative;
|
||||
}
|
||||
|
||||
/**
|
||||
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
||||
*
|
||||
* @param string|null $apcuPrefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The APCu prefix in use, or null if APCu caching is not enabled.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getApcuPrefix()
|
||||
{
|
||||
return $this->apcuPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers this instance as an autoloader.
|
||||
*
|
||||
* @param bool $prepend Whether to prepend the autoloader or not
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
|
||||
if (null === $this->vendorDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($prepend) {
|
||||
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
||||
} else {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
self::$registeredLoaders[$this->vendorDir] = $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
|
||||
if (null !== $this->vendorDir) {
|
||||
unset(self::$registeredLoaders[$this->vendorDir]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return true|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the path to the file where the class is defined.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
*
|
||||
* @return string|false The path if found, false otherwise
|
||||
*/
|
||||
public function findFile($class)
|
||||
{
|
||||
// class map lookup
|
||||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
if (null !== $this->apcuPrefix) {
|
||||
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
||||
if ($hit) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if (null !== $this->apcuPrefix) {
|
||||
apcu_add($this->apcuPrefix.$class, $file);
|
||||
}
|
||||
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
||||
*
|
||||
* @return self[]
|
||||
*/
|
||||
public static function getRegisteredLoaders()
|
||||
{
|
||||
return self::$registeredLoaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
* @param string $ext
|
||||
* @return string|false
|
||||
*/
|
||||
private function findFileWithExtension($class, $ext)
|
||||
{
|
||||
// PSR-4 lookup
|
||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||
|
||||
$first = $class[0];
|
||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath . '\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
if (file_exists($file = $dir . $pathEnd)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-4 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr4 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 lookup
|
||||
if (false !== $pos = strrpos($class, '\\')) {
|
||||
// namespaced class name
|
||||
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
||||
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
||||
} else {
|
||||
// PEAR-like class name
|
||||
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
||||
}
|
||||
|
||||
if (isset($this->prefixesPsr0[$first])) {
|
||||
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
||||
if (0 === strpos($class, $prefix)) {
|
||||
foreach ($dirs as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 fallback dirs
|
||||
foreach ($this->fallbackDirsPsr0 as $dir) {
|
||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
// PSR-0 include paths.
|
||||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope isolated include.
|
||||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*
|
||||
* @param string $file
|
||||
* @return void
|
||||
* @private
|
||||
*/
|
||||
function includeFile($file)
|
||||
{
|
||||
include $file;
|
||||
}
|
||||
352
modules/ps_metrics/vendor/composer/InstalledVersions.php
vendored
Normal file
352
modules/ps_metrics/vendor/composer/InstalledVersions.php
vendored
Normal file
@@ -0,0 +1,352 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Composer.
|
||||
*
|
||||
* (c) Nils Adermann <naderman@naderman.de>
|
||||
* Jordi Boggiano <j.boggiano@seld.be>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use Composer\Semver\VersionParser;
|
||||
|
||||
/**
|
||||
* This class is copied in every Composer installed project and available to all
|
||||
*
|
||||
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
||||
*
|
||||
* To require its presence, you can require `composer-runtime-api ^2.0`
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
class InstalledVersions
|
||||
{
|
||||
/**
|
||||
* @var mixed[]|null
|
||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||
*/
|
||||
private static $installed;
|
||||
|
||||
/**
|
||||
* @var bool|null
|
||||
*/
|
||||
private static $canGetVendors;
|
||||
|
||||
/**
|
||||
* @var array[]
|
||||
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static $installedByVendor = array();
|
||||
|
||||
/**
|
||||
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
||||
*
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackages()
|
||||
{
|
||||
$packages = array();
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
$packages[] = array_keys($installed['versions']);
|
||||
}
|
||||
|
||||
if (1 === \count($packages)) {
|
||||
return $packages[0];
|
||||
}
|
||||
|
||||
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all package names with a specific type e.g. 'library'
|
||||
*
|
||||
* @param string $type
|
||||
* @return string[]
|
||||
* @psalm-return list<string>
|
||||
*/
|
||||
public static function getInstalledPackagesByType($type)
|
||||
{
|
||||
$packagesByType = array();
|
||||
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
foreach ($installed['versions'] as $name => $package) {
|
||||
if (isset($package['type']) && $package['type'] === $type) {
|
||||
$packagesByType[] = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $packagesByType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package is installed
|
||||
*
|
||||
* This also returns true if the package name is provided or replaced by another package
|
||||
*
|
||||
* @param string $packageName
|
||||
* @param bool $includeDevRequirements
|
||||
* @return bool
|
||||
*/
|
||||
public static function isInstalled($packageName, $includeDevRequirements = true)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (isset($installed['versions'][$packageName])) {
|
||||
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the given package satisfies a version constraint
|
||||
*
|
||||
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
||||
*
|
||||
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
||||
*
|
||||
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
||||
* @param string $packageName
|
||||
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
|
||||
* @return bool
|
||||
*/
|
||||
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
||||
{
|
||||
$constraint = $parser->parseConstraints($constraint);
|
||||
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
||||
|
||||
return $provided->matches($constraint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a version constraint representing all the range(s) which are installed for a given package
|
||||
*
|
||||
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
||||
* whether a given version of a package is installed, and not just whether it exists
|
||||
*
|
||||
* @param string $packageName
|
||||
* @return string Version constraint usable with composer/semver
|
||||
*/
|
||||
public static function getVersionRanges($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ranges = array();
|
||||
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
||||
}
|
||||
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
||||
}
|
||||
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
||||
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
||||
}
|
||||
|
||||
return implode(' || ', $ranges);
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
|
||||
*/
|
||||
public static function getPrettyVersion($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['pretty_version'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
||||
*/
|
||||
public static function getReference($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($installed['versions'][$packageName]['reference'])) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $installed['versions'][$packageName]['reference'];
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $packageName
|
||||
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
|
||||
*/
|
||||
public static function getInstallPath($packageName)
|
||||
{
|
||||
foreach (self::getInstalled() as $installed) {
|
||||
if (!isset($installed['versions'][$packageName])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
||||
}
|
||||
|
||||
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
|
||||
*/
|
||||
public static function getRootPackage()
|
||||
{
|
||||
$installed = self::getInstalled();
|
||||
|
||||
return $installed[0]['root'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw installed.php data for custom implementations
|
||||
*
|
||||
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
|
||||
* @return array[]
|
||||
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
|
||||
*/
|
||||
public static function getRawData()
|
||||
{
|
||||
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
|
||||
return self::$installed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
||||
*
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
public static function getAllRawData()
|
||||
{
|
||||
return self::getInstalled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets you reload the static array from another file
|
||||
*
|
||||
* This is only useful for complex integrations in which a project needs to use
|
||||
* this class but then also needs to execute another project's autoloader in process,
|
||||
* and wants to ensure both projects have access to their version of installed.php.
|
||||
*
|
||||
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
||||
* the data it needs from this class, then call reload() with
|
||||
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
||||
* the project in which it runs can then also use this class safely, without
|
||||
* interference between PHPUnit's dependencies and the project's dependencies.
|
||||
*
|
||||
* @param array[] $data A vendor/composer/installed.php data set
|
||||
* @return void
|
||||
*
|
||||
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
|
||||
*/
|
||||
public static function reload($data)
|
||||
{
|
||||
self::$installed = $data;
|
||||
self::$installedByVendor = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array[]
|
||||
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
|
||||
*/
|
||||
private static function getInstalled()
|
||||
{
|
||||
if (null === self::$canGetVendors) {
|
||||
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
||||
}
|
||||
|
||||
$installed = array();
|
||||
|
||||
if (self::$canGetVendors) {
|
||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir];
|
||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
||||
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
||||
self::$installed = $installed[count($installed) - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
self::$installed = require __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
}
|
||||
}
|
||||
$installed[] = self::$installed;
|
||||
|
||||
return $installed;
|
||||
}
|
||||
}
|
||||
21
modules/ps_metrics/vendor/composer/LICENSE
vendored
Normal file
21
modules/ps_metrics/vendor/composer/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
Copyright (c) Nils Adermann, Jordi Boggiano
|
||||
|
||||
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.
|
||||
|
||||
283
modules/ps_metrics/vendor/composer/autoload_classmap.php
vendored
Normal file
283
modules/ps_metrics/vendor/composer/autoload_classmap.php
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||
'Dotenv\\Dotenv' => $vendorDir . '/vlucas/phpdotenv/src/Dotenv.php',
|
||||
'Dotenv\\Environment\\AbstractVariables' => $vendorDir . '/vlucas/phpdotenv/src/Environment/AbstractVariables.php',
|
||||
'Dotenv\\Environment\\Adapter\\AdapterInterface' => $vendorDir . '/vlucas/phpdotenv/src/Environment/Adapter/AdapterInterface.php',
|
||||
'Dotenv\\Environment\\Adapter\\ApacheAdapter' => $vendorDir . '/vlucas/phpdotenv/src/Environment/Adapter/ApacheAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\ArrayAdapter' => $vendorDir . '/vlucas/phpdotenv/src/Environment/Adapter/ArrayAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\EnvConstAdapter' => $vendorDir . '/vlucas/phpdotenv/src/Environment/Adapter/EnvConstAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\PutenvAdapter' => $vendorDir . '/vlucas/phpdotenv/src/Environment/Adapter/PutenvAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\ServerConstAdapter' => $vendorDir . '/vlucas/phpdotenv/src/Environment/Adapter/ServerConstAdapter.php',
|
||||
'Dotenv\\Environment\\DotenvFactory' => $vendorDir . '/vlucas/phpdotenv/src/Environment/DotenvFactory.php',
|
||||
'Dotenv\\Environment\\DotenvVariables' => $vendorDir . '/vlucas/phpdotenv/src/Environment/DotenvVariables.php',
|
||||
'Dotenv\\Environment\\FactoryInterface' => $vendorDir . '/vlucas/phpdotenv/src/Environment/FactoryInterface.php',
|
||||
'Dotenv\\Environment\\VariablesInterface' => $vendorDir . '/vlucas/phpdotenv/src/Environment/VariablesInterface.php',
|
||||
'Dotenv\\Exception\\ExceptionInterface' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php',
|
||||
'Dotenv\\Exception\\InvalidFileException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidFileException.php',
|
||||
'Dotenv\\Exception\\InvalidPathException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php',
|
||||
'Dotenv\\Exception\\ValidationException' => $vendorDir . '/vlucas/phpdotenv/src/Exception/ValidationException.php',
|
||||
'Dotenv\\Lines' => $vendorDir . '/vlucas/phpdotenv/src/Lines.php',
|
||||
'Dotenv\\Loader' => $vendorDir . '/vlucas/phpdotenv/src/Loader.php',
|
||||
'Dotenv\\Parser' => $vendorDir . '/vlucas/phpdotenv/src/Parser.php',
|
||||
'Dotenv\\Regex\\Error' => $vendorDir . '/vlucas/phpdotenv/src/Regex/Error.php',
|
||||
'Dotenv\\Regex\\Regex' => $vendorDir . '/vlucas/phpdotenv/src/Regex/Regex.php',
|
||||
'Dotenv\\Regex\\Result' => $vendorDir . '/vlucas/phpdotenv/src/Regex/Result.php',
|
||||
'Dotenv\\Regex\\Success' => $vendorDir . '/vlucas/phpdotenv/src/Regex/Success.php',
|
||||
'Dotenv\\Validator' => $vendorDir . '/vlucas/phpdotenv/src/Validator.php',
|
||||
'GuzzleHttp\\BatchResults' => $vendorDir . '/guzzlehttp/guzzle/src/BatchResults.php',
|
||||
'GuzzleHttp\\Client' => $vendorDir . '/guzzlehttp/guzzle/src/Client.php',
|
||||
'GuzzleHttp\\ClientInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ClientInterface.php',
|
||||
'GuzzleHttp\\Collection' => $vendorDir . '/guzzlehttp/guzzle/src/Collection.php',
|
||||
'GuzzleHttp\\Cookie\\CookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
|
||||
'GuzzleHttp\\Cookie\\CookieJarInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
|
||||
'GuzzleHttp\\Cookie\\FileCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
|
||||
'GuzzleHttp\\Cookie\\SessionCookieJar' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
|
||||
'GuzzleHttp\\Cookie\\SetCookie' => $vendorDir . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php',
|
||||
'GuzzleHttp\\Event\\AbstractEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/AbstractEvent.php',
|
||||
'GuzzleHttp\\Event\\AbstractRequestEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php',
|
||||
'GuzzleHttp\\Event\\AbstractRetryableEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php',
|
||||
'GuzzleHttp\\Event\\AbstractTransferEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php',
|
||||
'GuzzleHttp\\Event\\BeforeEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/BeforeEvent.php',
|
||||
'GuzzleHttp\\Event\\CompleteEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/CompleteEvent.php',
|
||||
'GuzzleHttp\\Event\\Emitter' => $vendorDir . '/guzzlehttp/guzzle/src/Event/Emitter.php',
|
||||
'GuzzleHttp\\Event\\EmitterInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Event/EmitterInterface.php',
|
||||
'GuzzleHttp\\Event\\EndEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/EndEvent.php',
|
||||
'GuzzleHttp\\Event\\ErrorEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/ErrorEvent.php',
|
||||
'GuzzleHttp\\Event\\EventInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Event/EventInterface.php',
|
||||
'GuzzleHttp\\Event\\HasEmitterInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Event/HasEmitterInterface.php',
|
||||
'GuzzleHttp\\Event\\HasEmitterTrait' => $vendorDir . '/guzzlehttp/guzzle/src/Event/HasEmitterTrait.php',
|
||||
'GuzzleHttp\\Event\\ListenerAttacherTrait' => $vendorDir . '/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php',
|
||||
'GuzzleHttp\\Event\\ProgressEvent' => $vendorDir . '/guzzlehttp/guzzle/src/Event/ProgressEvent.php',
|
||||
'GuzzleHttp\\Event\\RequestEvents' => $vendorDir . '/guzzlehttp/guzzle/src/Event/RequestEvents.php',
|
||||
'GuzzleHttp\\Event\\SubscriberInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Event/SubscriberInterface.php',
|
||||
'GuzzleHttp\\Exception\\BadResponseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php',
|
||||
'GuzzleHttp\\Exception\\ClientException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
||||
'GuzzleHttp\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
||||
'GuzzleHttp\\Exception\\CouldNotRewindStreamException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/CouldNotRewindStreamException.php',
|
||||
'GuzzleHttp\\Exception\\ParseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ParseException.php',
|
||||
'GuzzleHttp\\Exception\\RequestException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
||||
'GuzzleHttp\\Exception\\ServerException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
||||
'GuzzleHttp\\Exception\\StateException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/StateException.php',
|
||||
'GuzzleHttp\\Exception\\TooManyRedirectsException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
|
||||
'GuzzleHttp\\Exception\\TransferException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
|
||||
'GuzzleHttp\\Exception\\XmlParseException' => $vendorDir . '/guzzlehttp/guzzle/src/Exception/XmlParseException.php',
|
||||
'GuzzleHttp\\HasDataTrait' => $vendorDir . '/guzzlehttp/guzzle/src/HasDataTrait.php',
|
||||
'GuzzleHttp\\Message\\AbstractMessage' => $vendorDir . '/guzzlehttp/guzzle/src/Message/AbstractMessage.php',
|
||||
'GuzzleHttp\\Message\\AppliesHeadersInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php',
|
||||
'GuzzleHttp\\Message\\FutureResponse' => $vendorDir . '/guzzlehttp/guzzle/src/Message/FutureResponse.php',
|
||||
'GuzzleHttp\\Message\\MessageFactory' => $vendorDir . '/guzzlehttp/guzzle/src/Message/MessageFactory.php',
|
||||
'GuzzleHttp\\Message\\MessageFactoryInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php',
|
||||
'GuzzleHttp\\Message\\MessageInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Message/MessageInterface.php',
|
||||
'GuzzleHttp\\Message\\MessageParser' => $vendorDir . '/guzzlehttp/guzzle/src/Message/MessageParser.php',
|
||||
'GuzzleHttp\\Message\\Request' => $vendorDir . '/guzzlehttp/guzzle/src/Message/Request.php',
|
||||
'GuzzleHttp\\Message\\RequestInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Message/RequestInterface.php',
|
||||
'GuzzleHttp\\Message\\Response' => $vendorDir . '/guzzlehttp/guzzle/src/Message/Response.php',
|
||||
'GuzzleHttp\\Message\\ResponseInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Message/ResponseInterface.php',
|
||||
'GuzzleHttp\\Mimetypes' => $vendorDir . '/guzzlehttp/guzzle/src/Mimetypes.php',
|
||||
'GuzzleHttp\\Pool' => $vendorDir . '/guzzlehttp/guzzle/src/Pool.php',
|
||||
'GuzzleHttp\\Post\\MultipartBody' => $vendorDir . '/guzzlehttp/guzzle/src/Post/MultipartBody.php',
|
||||
'GuzzleHttp\\Post\\PostBody' => $vendorDir . '/guzzlehttp/guzzle/src/Post/PostBody.php',
|
||||
'GuzzleHttp\\Post\\PostBodyInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Post/PostBodyInterface.php',
|
||||
'GuzzleHttp\\Post\\PostFile' => $vendorDir . '/guzzlehttp/guzzle/src/Post/PostFile.php',
|
||||
'GuzzleHttp\\Post\\PostFileInterface' => $vendorDir . '/guzzlehttp/guzzle/src/Post/PostFileInterface.php',
|
||||
'GuzzleHttp\\Query' => $vendorDir . '/guzzlehttp/guzzle/src/Query.php',
|
||||
'GuzzleHttp\\QueryParser' => $vendorDir . '/guzzlehttp/guzzle/src/QueryParser.php',
|
||||
'GuzzleHttp\\RequestFsm' => $vendorDir . '/guzzlehttp/guzzle/src/RequestFsm.php',
|
||||
'GuzzleHttp\\RingBridge' => $vendorDir . '/guzzlehttp/guzzle/src/RingBridge.php',
|
||||
'GuzzleHttp\\Ring\\Client\\ClientUtils' => $vendorDir . '/guzzlehttp/ringphp/src/Client/ClientUtils.php',
|
||||
'GuzzleHttp\\Ring\\Client\\CurlFactory' => $vendorDir . '/guzzlehttp/ringphp/src/Client/CurlFactory.php',
|
||||
'GuzzleHttp\\Ring\\Client\\CurlHandler' => $vendorDir . '/guzzlehttp/ringphp/src/Client/CurlHandler.php',
|
||||
'GuzzleHttp\\Ring\\Client\\CurlMultiHandler' => $vendorDir . '/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php',
|
||||
'GuzzleHttp\\Ring\\Client\\Middleware' => $vendorDir . '/guzzlehttp/ringphp/src/Client/Middleware.php',
|
||||
'GuzzleHttp\\Ring\\Client\\MockHandler' => $vendorDir . '/guzzlehttp/ringphp/src/Client/MockHandler.php',
|
||||
'GuzzleHttp\\Ring\\Client\\StreamHandler' => $vendorDir . '/guzzlehttp/ringphp/src/Client/StreamHandler.php',
|
||||
'GuzzleHttp\\Ring\\Core' => $vendorDir . '/guzzlehttp/ringphp/src/Core.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\CancelledException' => $vendorDir . '/guzzlehttp/ringphp/src/Exception/CancelledException.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\CancelledFutureAccessException' => $vendorDir . '/guzzlehttp/ringphp/src/Exception/CancelledFutureAccessException.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\ConnectException' => $vendorDir . '/guzzlehttp/ringphp/src/Exception/ConnectException.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\RingException' => $vendorDir . '/guzzlehttp/ringphp/src/Exception/RingException.php',
|
||||
'GuzzleHttp\\Ring\\Future\\BaseFutureTrait' => $vendorDir . '/guzzlehttp/ringphp/src/Future/BaseFutureTrait.php',
|
||||
'GuzzleHttp\\Ring\\Future\\CompletedFutureArray' => $vendorDir . '/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php',
|
||||
'GuzzleHttp\\Ring\\Future\\CompletedFutureValue' => $vendorDir . '/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureArray' => $vendorDir . '/guzzlehttp/ringphp/src/Future/FutureArray.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureArrayInterface' => $vendorDir . '/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureInterface' => $vendorDir . '/guzzlehttp/ringphp/src/Future/FutureInterface.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureValue' => $vendorDir . '/guzzlehttp/ringphp/src/Future/FutureValue.php',
|
||||
'GuzzleHttp\\Ring\\Future\\MagicFutureTrait' => $vendorDir . '/guzzlehttp/ringphp/src/Future/MagicFutureTrait.php',
|
||||
'GuzzleHttp\\Stream\\AppendStream' => $vendorDir . '/guzzlehttp/streams/src/AppendStream.php',
|
||||
'GuzzleHttp\\Stream\\AsyncReadStream' => $vendorDir . '/guzzlehttp/streams/src/AsyncReadStream.php',
|
||||
'GuzzleHttp\\Stream\\BufferStream' => $vendorDir . '/guzzlehttp/streams/src/BufferStream.php',
|
||||
'GuzzleHttp\\Stream\\CachingStream' => $vendorDir . '/guzzlehttp/streams/src/CachingStream.php',
|
||||
'GuzzleHttp\\Stream\\DroppingStream' => $vendorDir . '/guzzlehttp/streams/src/DroppingStream.php',
|
||||
'GuzzleHttp\\Stream\\Exception\\CannotAttachException' => $vendorDir . '/guzzlehttp/streams/src/Exception/CannotAttachException.php',
|
||||
'GuzzleHttp\\Stream\\Exception\\SeekException' => $vendorDir . '/guzzlehttp/streams/src/Exception/SeekException.php',
|
||||
'GuzzleHttp\\Stream\\FnStream' => $vendorDir . '/guzzlehttp/streams/src/FnStream.php',
|
||||
'GuzzleHttp\\Stream\\GuzzleStreamWrapper' => $vendorDir . '/guzzlehttp/streams/src/GuzzleStreamWrapper.php',
|
||||
'GuzzleHttp\\Stream\\InflateStream' => $vendorDir . '/guzzlehttp/streams/src/InflateStream.php',
|
||||
'GuzzleHttp\\Stream\\LazyOpenStream' => $vendorDir . '/guzzlehttp/streams/src/LazyOpenStream.php',
|
||||
'GuzzleHttp\\Stream\\LimitStream' => $vendorDir . '/guzzlehttp/streams/src/LimitStream.php',
|
||||
'GuzzleHttp\\Stream\\MetadataStreamInterface' => $vendorDir . '/guzzlehttp/streams/src/MetadataStreamInterface.php',
|
||||
'GuzzleHttp\\Stream\\NoSeekStream' => $vendorDir . '/guzzlehttp/streams/src/NoSeekStream.php',
|
||||
'GuzzleHttp\\Stream\\NullStream' => $vendorDir . '/guzzlehttp/streams/src/NullStream.php',
|
||||
'GuzzleHttp\\Stream\\PumpStream' => $vendorDir . '/guzzlehttp/streams/src/PumpStream.php',
|
||||
'GuzzleHttp\\Stream\\Stream' => $vendorDir . '/guzzlehttp/streams/src/Stream.php',
|
||||
'GuzzleHttp\\Stream\\StreamDecoratorTrait' => $vendorDir . '/guzzlehttp/streams/src/StreamDecoratorTrait.php',
|
||||
'GuzzleHttp\\Stream\\StreamInterface' => $vendorDir . '/guzzlehttp/streams/src/StreamInterface.php',
|
||||
'GuzzleHttp\\Stream\\Utils' => $vendorDir . '/guzzlehttp/streams/src/Utils.php',
|
||||
'GuzzleHttp\\Subscriber\\Cookie' => $vendorDir . '/guzzlehttp/guzzle/src/Subscriber/Cookie.php',
|
||||
'GuzzleHttp\\Subscriber\\History' => $vendorDir . '/guzzlehttp/guzzle/src/Subscriber/History.php',
|
||||
'GuzzleHttp\\Subscriber\\HttpError' => $vendorDir . '/guzzlehttp/guzzle/src/Subscriber/HttpError.php',
|
||||
'GuzzleHttp\\Subscriber\\Mock' => $vendorDir . '/guzzlehttp/guzzle/src/Subscriber/Mock.php',
|
||||
'GuzzleHttp\\Subscriber\\Prepare' => $vendorDir . '/guzzlehttp/guzzle/src/Subscriber/Prepare.php',
|
||||
'GuzzleHttp\\Subscriber\\Redirect' => $vendorDir . '/guzzlehttp/guzzle/src/Subscriber/Redirect.php',
|
||||
'GuzzleHttp\\ToArrayInterface' => $vendorDir . '/guzzlehttp/guzzle/src/ToArrayInterface.php',
|
||||
'GuzzleHttp\\Transaction' => $vendorDir . '/guzzlehttp/guzzle/src/Transaction.php',
|
||||
'GuzzleHttp\\UriTemplate' => $vendorDir . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
||||
'GuzzleHttp\\Url' => $vendorDir . '/guzzlehttp/guzzle/src/Url.php',
|
||||
'GuzzleHttp\\Utils' => $vendorDir . '/guzzlehttp/guzzle/src/Utils.php',
|
||||
'PhpOption\\LazyOption' => $vendorDir . '/phpoption/phpoption/src/PhpOption/LazyOption.php',
|
||||
'PhpOption\\None' => $vendorDir . '/phpoption/phpoption/src/PhpOption/None.php',
|
||||
'PhpOption\\Option' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Option.php',
|
||||
'PhpOption\\Some' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Some.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Adapter\\LoggerAdapter' => $baseDir . '/src/Adapter/LoggerAdapter.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\AnalyticsApi' => $baseDir . '/src/Api/AnalyticsApi.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\Client\\AnalyticsClient' => $baseDir . '/src/Api/Client/AnalyticsClient.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\Client\\ClientFactory' => $baseDir . '/src/Api/Client/ClientFactory.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\Client\\HttpClient' => $baseDir . '/src/Api/Client/HttpClient.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\HttpApi' => $baseDir . '/src/Api/HttpApi.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Config\\Env' => $baseDir . '/src/Config/Env.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsController' => $baseDir . '/src/Controller/Admin/MetricsController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsLegacyStatsController' => $baseDir . '/src/Controller/Admin/MetricsLegacyStatsController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsOauthController' => $baseDir . '/src/Controller/Admin/MetricsOauthController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsResolverController' => $baseDir . '/src/Controller/Admin/MetricsResolverController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Handler\\GuzzleApiResponseExceptionHandler' => $baseDir . '/src/Handler/GuzzleApiResponseExceptionHandler.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Handler\\NativeStatsHandler' => $baseDir . '/src/Handler/NativeStatsHandler.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ApiHelper' => $baseDir . '/src/Helper/ApiHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ConfigHelper' => $baseDir . '/src/Helper/ConfigHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\DbHelper' => $baseDir . '/src/Helper/DbHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\JsonHelper' => $baseDir . '/src/Helper/JsonHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ModuleHelper' => $baseDir . '/src/Helper/ModuleHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\MultishopHelper' => $baseDir . '/src/Helper/MultishopHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\NumberHelper' => $baseDir . '/src/Helper/NumberHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\PrestaShopHelper' => $baseDir . '/src/Helper/PrestaShopHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\SegmentHelper' => $baseDir . '/src/Helper/SegmentHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ShopHelper' => $baseDir . '/src/Helper/ShopHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ToolsHelper' => $baseDir . '/src/Helper/ToolsHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\LegacyModuleInstaller' => $baseDir . '/src/LegacyModuleInstaller.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\CheckResponseMiddleware' => $baseDir . '/src/Middleware/CheckResponseMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\LogMiddleware' => $baseDir . '/src/Middleware/LogMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\Middleware' => $baseDir . '/src/Middleware/Middleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\ResponseMiddleware' => $baseDir . '/src/Middleware/ResponseMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\SentryMiddleware' => $baseDir . '/src/Middleware/SentryMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\GAInstaller' => $baseDir . '/src/Module/GAInstaller.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\Install' => $baseDir . '/src/Module/Install.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\Uninstall' => $baseDir . '/src/Module/Uninstall.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\Upgrade' => $baseDir . '/src/Module/Upgrade.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Presenter\\FaqPresenter' => $baseDir . '/src/Presenter/FaqPresenter.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Presenter\\ShopDataPresenter' => $baseDir . '/src/Presenter/ShopDataPresenter.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Provider\\AnalyticsAccountsListProvider' => $baseDir . '/src/Provider/AnalyticsAccountsListProvider.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Provider\\GoogleTagProvider' => $baseDir . '/src/Provider/GoogleTagProvider.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Repository\\ConfigurationRepository' => $baseDir . '/src/Repository/ConfigurationRepository.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Repository\\HookModuleRepository' => $baseDir . '/src/Repository/HookModuleRepository.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Repository\\OrderRepository' => $baseDir . '/src/Repository/OrderRepository.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\StatsTabManager' => $baseDir . '/src/StatsTabManager.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Tracker\\Segment' => $baseDir . '/src/Tracker/Segment.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Tracker\\TrackerInterface' => $baseDir . '/src/Tracker/TrackerInterface.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Validation\\SelectAccountAnalytics' => $baseDir . '/src/Validation/SelectAccountAnalytics.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\InstallerException' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/InstallerException.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleNotInstalledException' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleNotInstalledException.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleVersionException' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleVersionException.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Facade\\PsAccounts' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Facade/PsAccounts.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Installer' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Installer.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Presenter\\InstallerPresenter' => $vendorDir . '/prestashop/prestashop-accounts-installer/src/Installer/Presenter/InstallerPresenter.php',
|
||||
'Ps_metrics' => $baseDir . '/ps_metrics.php',
|
||||
'React\\Promise\\CancellablePromiseInterface' => $vendorDir . '/react/promise/src/CancellablePromiseInterface.php',
|
||||
'React\\Promise\\CancellationQueue' => $vendorDir . '/react/promise/src/CancellationQueue.php',
|
||||
'React\\Promise\\Deferred' => $vendorDir . '/react/promise/src/Deferred.php',
|
||||
'React\\Promise\\Exception\\LengthException' => $vendorDir . '/react/promise/src/Exception/LengthException.php',
|
||||
'React\\Promise\\ExtendedPromiseInterface' => $vendorDir . '/react/promise/src/ExtendedPromiseInterface.php',
|
||||
'React\\Promise\\FulfilledPromise' => $vendorDir . '/react/promise/src/FulfilledPromise.php',
|
||||
'React\\Promise\\LazyPromise' => $vendorDir . '/react/promise/src/LazyPromise.php',
|
||||
'React\\Promise\\Promise' => $vendorDir . '/react/promise/src/Promise.php',
|
||||
'React\\Promise\\PromiseInterface' => $vendorDir . '/react/promise/src/PromiseInterface.php',
|
||||
'React\\Promise\\PromisorInterface' => $vendorDir . '/react/promise/src/PromisorInterface.php',
|
||||
'React\\Promise\\RejectedPromise' => $vendorDir . '/react/promise/src/RejectedPromise.php',
|
||||
'React\\Promise\\UnhandledRejectionException' => $vendorDir . '/react/promise/src/UnhandledRejectionException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => $vendorDir . '/symfony/http-foundation/AcceptHeader.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => $vendorDir . '/symfony/http-foundation/AcceptHeaderItem.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ApacheRequest' => $vendorDir . '/symfony/http-foundation/ApacheRequest.php',
|
||||
'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => $vendorDir . '/symfony/http-foundation/BinaryFileResponse.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Cookie' => $vendorDir . '/symfony/http-foundation/Cookie.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => $vendorDir . '/symfony/http-foundation/Exception/ConflictingHeadersException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => $vendorDir . '/symfony/http-foundation/Exception/RequestExceptionInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => $vendorDir . '/symfony/http-foundation/Exception/SuspiciousOperationException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => $vendorDir . '/symfony/http-foundation/ExpressionRequestMatcher.php',
|
||||
'Symfony\\Component\\HttpFoundation\\FileBag' => $vendorDir . '/symfony/http-foundation/FileBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => $vendorDir . '/symfony/http-foundation/File/Exception/AccessDeniedException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => $vendorDir . '/symfony/http-foundation/File/Exception/FileNotFoundException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => $vendorDir . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => $vendorDir . '/symfony/http-foundation/File/Exception/UploadException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\File' => $vendorDir . '/symfony/http-foundation/File/File.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/ExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => $vendorDir . '/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => $vendorDir . '/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Stream' => $vendorDir . '/symfony/http-foundation/File/Stream.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => $vendorDir . '/symfony/http-foundation/File/UploadedFile.php',
|
||||
'Symfony\\Component\\HttpFoundation\\HeaderBag' => $vendorDir . '/symfony/http-foundation/HeaderBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\IpUtils' => $vendorDir . '/symfony/http-foundation/IpUtils.php',
|
||||
'Symfony\\Component\\HttpFoundation\\JsonResponse' => $vendorDir . '/symfony/http-foundation/JsonResponse.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ParameterBag' => $vendorDir . '/symfony/http-foundation/ParameterBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RedirectResponse' => $vendorDir . '/symfony/http-foundation/RedirectResponse.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Request' => $vendorDir . '/symfony/http-foundation/Request.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RequestMatcher' => $vendorDir . '/symfony/http-foundation/RequestMatcher.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => $vendorDir . '/symfony/http-foundation/RequestMatcherInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RequestStack' => $vendorDir . '/symfony/http-foundation/RequestStack.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Response' => $vendorDir . '/symfony/http-foundation/Response.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => $vendorDir . '/symfony/http-foundation/ResponseHeaderBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ServerBag' => $vendorDir . '/symfony/http-foundation/ServerBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => $vendorDir . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => $vendorDir . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Session' => $vendorDir . '/symfony/http-foundation/Session/Session.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionBagInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionBagProxy' => $vendorDir . '/symfony/http-foundation/Session/SessionBagProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => $vendorDir . '/symfony/http-foundation/Session/SessionInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionUtils' => $vendorDir . '/symfony/http-foundation/Session/SessionUtils.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NativeSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\StrictSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\WriteCheckSessionHandler' => $vendorDir . '/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => $vendorDir . '/symfony/http-foundation/Session/Storage/MetadataBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => $vendorDir . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => $vendorDir . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => $vendorDir . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\StreamedResponse' => $vendorDir . '/symfony/http-foundation/StreamedResponse.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => $vendorDir . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => $vendorDir . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
);
|
||||
13
modules/ps_metrics/vendor/composer/autoload_files.php
vendored
Normal file
13
modules/ps_metrics/vendor/composer/autoload_files.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
// autoload_files.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'2a9afd012ba84c341672875ae49cd5cd' => $vendorDir . '/segmentio/analytics-php/lib/Segment.php',
|
||||
);
|
||||
9
modules/ps_metrics/vendor/composer/autoload_namespaces.php
vendored
Normal file
9
modules/ps_metrics/vendor/composer/autoload_namespaces.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
20
modules/ps_metrics/vendor/composer/autoload_psr4.php
vendored
Normal file
20
modules/ps_metrics/vendor/composer/autoload_psr4.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(__DIR__);
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
|
||||
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
|
||||
'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
|
||||
'React\\Promise\\' => array($vendorDir . '/react/promise/src'),
|
||||
'PrestaShop\\PsAccountsInstaller\\' => array($vendorDir . '/prestashop/prestashop-accounts-installer/src'),
|
||||
'PrestaShop\\Module\\Ps_metrics\\' => array($baseDir . '/src'),
|
||||
'PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'),
|
||||
'GuzzleHttp\\Stream\\' => array($vendorDir . '/guzzlehttp/streams/src'),
|
||||
'GuzzleHttp\\Ring\\' => array($vendorDir . '/guzzlehttp/ringphp/src'),
|
||||
'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'),
|
||||
'Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
|
||||
);
|
||||
58
modules/ps_metrics/vendor/composer/autoload_real.php
vendored
Normal file
58
modules/ps_metrics/vendor/composer/autoload_real.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
public static function loadClassLoader($class)
|
||||
{
|
||||
if ('Composer\Autoload\ClassLoader' === $class) {
|
||||
require __DIR__ . '/ClassLoader.php';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Composer\Autoload\ClassLoader
|
||||
*/
|
||||
public static function getLoader()
|
||||
{
|
||||
if (null !== self::$loader) {
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
require __DIR__ . '/platform_check.php';
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8', 'loadClassLoader'), true, false);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(false);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequirebbbd1fbbd4bf8eb230a5e1cdf40dc7b8($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fileIdentifier
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequirebbbd1fbbd4bf8eb230a5e1cdf40dc7b8($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
378
modules/ps_metrics/vendor/composer/autoload_static.php
vendored
Normal file
378
modules/ps_metrics/vendor/composer/autoload_static.php
vendored
Normal file
@@ -0,0 +1,378 @@
|
||||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
'2a9afd012ba84c341672875ae49cd5cd' => __DIR__ . '/..' . '/segmentio/analytics-php/lib/Segment.php',
|
||||
);
|
||||
|
||||
public static $prefixLengthsPsr4 = array (
|
||||
'S' =>
|
||||
array (
|
||||
'Symfony\\Polyfill\\Mbstring\\' => 26,
|
||||
'Symfony\\Polyfill\\Ctype\\' => 23,
|
||||
'Symfony\\Component\\HttpFoundation\\' => 33,
|
||||
),
|
||||
'R' =>
|
||||
array (
|
||||
'React\\Promise\\' => 14,
|
||||
),
|
||||
'P' =>
|
||||
array (
|
||||
'PrestaShop\\PsAccountsInstaller\\' => 31,
|
||||
'PrestaShop\\Module\\Ps_metrics\\' => 29,
|
||||
'PhpOption\\' => 10,
|
||||
),
|
||||
'G' =>
|
||||
array (
|
||||
'GuzzleHttp\\Stream\\' => 18,
|
||||
'GuzzleHttp\\Ring\\' => 16,
|
||||
'GuzzleHttp\\' => 11,
|
||||
),
|
||||
'D' =>
|
||||
array (
|
||||
'Dotenv\\' => 7,
|
||||
),
|
||||
);
|
||||
|
||||
public static $prefixDirsPsr4 = array (
|
||||
'Symfony\\Polyfill\\Mbstring\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
|
||||
),
|
||||
'Symfony\\Polyfill\\Ctype\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
|
||||
),
|
||||
'Symfony\\Component\\HttpFoundation\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/symfony/http-foundation',
|
||||
),
|
||||
'React\\Promise\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/react/promise/src',
|
||||
),
|
||||
'PrestaShop\\PsAccountsInstaller\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src',
|
||||
),
|
||||
'PrestaShop\\Module\\Ps_metrics\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/../..' . '/src',
|
||||
),
|
||||
'PhpOption\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption',
|
||||
),
|
||||
'GuzzleHttp\\Stream\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/streams/src',
|
||||
),
|
||||
'GuzzleHttp\\Ring\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/ringphp/src',
|
||||
),
|
||||
'GuzzleHttp\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
|
||||
),
|
||||
'Dotenv\\' =>
|
||||
array (
|
||||
0 => __DIR__ . '/..' . '/vlucas/phpdotenv/src',
|
||||
),
|
||||
);
|
||||
|
||||
public static $classMap = array (
|
||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||
'Dotenv\\Dotenv' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Dotenv.php',
|
||||
'Dotenv\\Environment\\AbstractVariables' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/AbstractVariables.php',
|
||||
'Dotenv\\Environment\\Adapter\\AdapterInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/Adapter/AdapterInterface.php',
|
||||
'Dotenv\\Environment\\Adapter\\ApacheAdapter' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/Adapter/ApacheAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\ArrayAdapter' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/Adapter/ArrayAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\EnvConstAdapter' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/Adapter/EnvConstAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\PutenvAdapter' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/Adapter/PutenvAdapter.php',
|
||||
'Dotenv\\Environment\\Adapter\\ServerConstAdapter' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/Adapter/ServerConstAdapter.php',
|
||||
'Dotenv\\Environment\\DotenvFactory' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/DotenvFactory.php',
|
||||
'Dotenv\\Environment\\DotenvVariables' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/DotenvVariables.php',
|
||||
'Dotenv\\Environment\\FactoryInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/FactoryInterface.php',
|
||||
'Dotenv\\Environment\\VariablesInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Environment/VariablesInterface.php',
|
||||
'Dotenv\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ExceptionInterface.php',
|
||||
'Dotenv\\Exception\\InvalidFileException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidFileException.php',
|
||||
'Dotenv\\Exception\\InvalidPathException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/InvalidPathException.php',
|
||||
'Dotenv\\Exception\\ValidationException' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Exception/ValidationException.php',
|
||||
'Dotenv\\Lines' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Lines.php',
|
||||
'Dotenv\\Loader' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Loader.php',
|
||||
'Dotenv\\Parser' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Parser.php',
|
||||
'Dotenv\\Regex\\Error' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Regex/Error.php',
|
||||
'Dotenv\\Regex\\Regex' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Regex/Regex.php',
|
||||
'Dotenv\\Regex\\Result' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Regex/Result.php',
|
||||
'Dotenv\\Regex\\Success' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Regex/Success.php',
|
||||
'Dotenv\\Validator' => __DIR__ . '/..' . '/vlucas/phpdotenv/src/Validator.php',
|
||||
'GuzzleHttp\\BatchResults' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/BatchResults.php',
|
||||
'GuzzleHttp\\Client' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Client.php',
|
||||
'GuzzleHttp\\ClientInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ClientInterface.php',
|
||||
'GuzzleHttp\\Collection' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Collection.php',
|
||||
'GuzzleHttp\\Cookie\\CookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJar.php',
|
||||
'GuzzleHttp\\Cookie\\CookieJarInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php',
|
||||
'GuzzleHttp\\Cookie\\FileCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php',
|
||||
'GuzzleHttp\\Cookie\\SessionCookieJar' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php',
|
||||
'GuzzleHttp\\Cookie\\SetCookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Cookie/SetCookie.php',
|
||||
'GuzzleHttp\\Event\\AbstractEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/AbstractEvent.php',
|
||||
'GuzzleHttp\\Event\\AbstractRequestEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php',
|
||||
'GuzzleHttp\\Event\\AbstractRetryableEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php',
|
||||
'GuzzleHttp\\Event\\AbstractTransferEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php',
|
||||
'GuzzleHttp\\Event\\BeforeEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/BeforeEvent.php',
|
||||
'GuzzleHttp\\Event\\CompleteEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/CompleteEvent.php',
|
||||
'GuzzleHttp\\Event\\Emitter' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/Emitter.php',
|
||||
'GuzzleHttp\\Event\\EmitterInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/EmitterInterface.php',
|
||||
'GuzzleHttp\\Event\\EndEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/EndEvent.php',
|
||||
'GuzzleHttp\\Event\\ErrorEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/ErrorEvent.php',
|
||||
'GuzzleHttp\\Event\\EventInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/EventInterface.php',
|
||||
'GuzzleHttp\\Event\\HasEmitterInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/HasEmitterInterface.php',
|
||||
'GuzzleHttp\\Event\\HasEmitterTrait' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/HasEmitterTrait.php',
|
||||
'GuzzleHttp\\Event\\ListenerAttacherTrait' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php',
|
||||
'GuzzleHttp\\Event\\ProgressEvent' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/ProgressEvent.php',
|
||||
'GuzzleHttp\\Event\\RequestEvents' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/RequestEvents.php',
|
||||
'GuzzleHttp\\Event\\SubscriberInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Event/SubscriberInterface.php',
|
||||
'GuzzleHttp\\Exception\\BadResponseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/BadResponseException.php',
|
||||
'GuzzleHttp\\Exception\\ClientException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ClientException.php',
|
||||
'GuzzleHttp\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ConnectException.php',
|
||||
'GuzzleHttp\\Exception\\CouldNotRewindStreamException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/CouldNotRewindStreamException.php',
|
||||
'GuzzleHttp\\Exception\\ParseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ParseException.php',
|
||||
'GuzzleHttp\\Exception\\RequestException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/RequestException.php',
|
||||
'GuzzleHttp\\Exception\\ServerException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/ServerException.php',
|
||||
'GuzzleHttp\\Exception\\StateException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/StateException.php',
|
||||
'GuzzleHttp\\Exception\\TooManyRedirectsException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php',
|
||||
'GuzzleHttp\\Exception\\TransferException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/TransferException.php',
|
||||
'GuzzleHttp\\Exception\\XmlParseException' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Exception/XmlParseException.php',
|
||||
'GuzzleHttp\\HasDataTrait' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/HasDataTrait.php',
|
||||
'GuzzleHttp\\Message\\AbstractMessage' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/AbstractMessage.php',
|
||||
'GuzzleHttp\\Message\\AppliesHeadersInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php',
|
||||
'GuzzleHttp\\Message\\FutureResponse' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/FutureResponse.php',
|
||||
'GuzzleHttp\\Message\\MessageFactory' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/MessageFactory.php',
|
||||
'GuzzleHttp\\Message\\MessageFactoryInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php',
|
||||
'GuzzleHttp\\Message\\MessageInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/MessageInterface.php',
|
||||
'GuzzleHttp\\Message\\MessageParser' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/MessageParser.php',
|
||||
'GuzzleHttp\\Message\\Request' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/Request.php',
|
||||
'GuzzleHttp\\Message\\RequestInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/RequestInterface.php',
|
||||
'GuzzleHttp\\Message\\Response' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/Response.php',
|
||||
'GuzzleHttp\\Message\\ResponseInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Message/ResponseInterface.php',
|
||||
'GuzzleHttp\\Mimetypes' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Mimetypes.php',
|
||||
'GuzzleHttp\\Pool' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Pool.php',
|
||||
'GuzzleHttp\\Post\\MultipartBody' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Post/MultipartBody.php',
|
||||
'GuzzleHttp\\Post\\PostBody' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Post/PostBody.php',
|
||||
'GuzzleHttp\\Post\\PostBodyInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Post/PostBodyInterface.php',
|
||||
'GuzzleHttp\\Post\\PostFile' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Post/PostFile.php',
|
||||
'GuzzleHttp\\Post\\PostFileInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Post/PostFileInterface.php',
|
||||
'GuzzleHttp\\Query' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Query.php',
|
||||
'GuzzleHttp\\QueryParser' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/QueryParser.php',
|
||||
'GuzzleHttp\\RequestFsm' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RequestFsm.php',
|
||||
'GuzzleHttp\\RingBridge' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/RingBridge.php',
|
||||
'GuzzleHttp\\Ring\\Client\\ClientUtils' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/ClientUtils.php',
|
||||
'GuzzleHttp\\Ring\\Client\\CurlFactory' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/CurlFactory.php',
|
||||
'GuzzleHttp\\Ring\\Client\\CurlHandler' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/CurlHandler.php',
|
||||
'GuzzleHttp\\Ring\\Client\\CurlMultiHandler' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php',
|
||||
'GuzzleHttp\\Ring\\Client\\Middleware' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/Middleware.php',
|
||||
'GuzzleHttp\\Ring\\Client\\MockHandler' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/MockHandler.php',
|
||||
'GuzzleHttp\\Ring\\Client\\StreamHandler' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Client/StreamHandler.php',
|
||||
'GuzzleHttp\\Ring\\Core' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Core.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\CancelledException' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Exception/CancelledException.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\CancelledFutureAccessException' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Exception/CancelledFutureAccessException.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\ConnectException' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Exception/ConnectException.php',
|
||||
'GuzzleHttp\\Ring\\Exception\\RingException' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Exception/RingException.php',
|
||||
'GuzzleHttp\\Ring\\Future\\BaseFutureTrait' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/BaseFutureTrait.php',
|
||||
'GuzzleHttp\\Ring\\Future\\CompletedFutureArray' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/CompletedFutureArray.php',
|
||||
'GuzzleHttp\\Ring\\Future\\CompletedFutureValue' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureArray' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/FutureArray.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureArrayInterface' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureInterface' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/FutureInterface.php',
|
||||
'GuzzleHttp\\Ring\\Future\\FutureValue' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/FutureValue.php',
|
||||
'GuzzleHttp\\Ring\\Future\\MagicFutureTrait' => __DIR__ . '/..' . '/guzzlehttp/ringphp/src/Future/MagicFutureTrait.php',
|
||||
'GuzzleHttp\\Stream\\AppendStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/AppendStream.php',
|
||||
'GuzzleHttp\\Stream\\AsyncReadStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/AsyncReadStream.php',
|
||||
'GuzzleHttp\\Stream\\BufferStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/BufferStream.php',
|
||||
'GuzzleHttp\\Stream\\CachingStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/CachingStream.php',
|
||||
'GuzzleHttp\\Stream\\DroppingStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/DroppingStream.php',
|
||||
'GuzzleHttp\\Stream\\Exception\\CannotAttachException' => __DIR__ . '/..' . '/guzzlehttp/streams/src/Exception/CannotAttachException.php',
|
||||
'GuzzleHttp\\Stream\\Exception\\SeekException' => __DIR__ . '/..' . '/guzzlehttp/streams/src/Exception/SeekException.php',
|
||||
'GuzzleHttp\\Stream\\FnStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/FnStream.php',
|
||||
'GuzzleHttp\\Stream\\GuzzleStreamWrapper' => __DIR__ . '/..' . '/guzzlehttp/streams/src/GuzzleStreamWrapper.php',
|
||||
'GuzzleHttp\\Stream\\InflateStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/InflateStream.php',
|
||||
'GuzzleHttp\\Stream\\LazyOpenStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/LazyOpenStream.php',
|
||||
'GuzzleHttp\\Stream\\LimitStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/LimitStream.php',
|
||||
'GuzzleHttp\\Stream\\MetadataStreamInterface' => __DIR__ . '/..' . '/guzzlehttp/streams/src/MetadataStreamInterface.php',
|
||||
'GuzzleHttp\\Stream\\NoSeekStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/NoSeekStream.php',
|
||||
'GuzzleHttp\\Stream\\NullStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/NullStream.php',
|
||||
'GuzzleHttp\\Stream\\PumpStream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/PumpStream.php',
|
||||
'GuzzleHttp\\Stream\\Stream' => __DIR__ . '/..' . '/guzzlehttp/streams/src/Stream.php',
|
||||
'GuzzleHttp\\Stream\\StreamDecoratorTrait' => __DIR__ . '/..' . '/guzzlehttp/streams/src/StreamDecoratorTrait.php',
|
||||
'GuzzleHttp\\Stream\\StreamInterface' => __DIR__ . '/..' . '/guzzlehttp/streams/src/StreamInterface.php',
|
||||
'GuzzleHttp\\Stream\\Utils' => __DIR__ . '/..' . '/guzzlehttp/streams/src/Utils.php',
|
||||
'GuzzleHttp\\Subscriber\\Cookie' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Subscriber/Cookie.php',
|
||||
'GuzzleHttp\\Subscriber\\History' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Subscriber/History.php',
|
||||
'GuzzleHttp\\Subscriber\\HttpError' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Subscriber/HttpError.php',
|
||||
'GuzzleHttp\\Subscriber\\Mock' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Subscriber/Mock.php',
|
||||
'GuzzleHttp\\Subscriber\\Prepare' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Subscriber/Prepare.php',
|
||||
'GuzzleHttp\\Subscriber\\Redirect' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Subscriber/Redirect.php',
|
||||
'GuzzleHttp\\ToArrayInterface' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/ToArrayInterface.php',
|
||||
'GuzzleHttp\\Transaction' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Transaction.php',
|
||||
'GuzzleHttp\\UriTemplate' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/UriTemplate.php',
|
||||
'GuzzleHttp\\Url' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Url.php',
|
||||
'GuzzleHttp\\Utils' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/Utils.php',
|
||||
'PhpOption\\LazyOption' => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption/LazyOption.php',
|
||||
'PhpOption\\None' => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption/None.php',
|
||||
'PhpOption\\Option' => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption/Option.php',
|
||||
'PhpOption\\Some' => __DIR__ . '/..' . '/phpoption/phpoption/src/PhpOption/Some.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Adapter\\LoggerAdapter' => __DIR__ . '/../..' . '/src/Adapter/LoggerAdapter.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\AnalyticsApi' => __DIR__ . '/../..' . '/src/Api/AnalyticsApi.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\Client\\AnalyticsClient' => __DIR__ . '/../..' . '/src/Api/Client/AnalyticsClient.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\Client\\ClientFactory' => __DIR__ . '/../..' . '/src/Api/Client/ClientFactory.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\Client\\HttpClient' => __DIR__ . '/../..' . '/src/Api/Client/HttpClient.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Api\\HttpApi' => __DIR__ . '/../..' . '/src/Api/HttpApi.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Config\\Env' => __DIR__ . '/../..' . '/src/Config/Env.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsController' => __DIR__ . '/../..' . '/src/Controller/Admin/MetricsController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsLegacyStatsController' => __DIR__ . '/../..' . '/src/Controller/Admin/MetricsLegacyStatsController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsOauthController' => __DIR__ . '/../..' . '/src/Controller/Admin/MetricsOauthController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Controller\\Admin\\MetricsResolverController' => __DIR__ . '/../..' . '/src/Controller/Admin/MetricsResolverController.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Handler\\GuzzleApiResponseExceptionHandler' => __DIR__ . '/../..' . '/src/Handler/GuzzleApiResponseExceptionHandler.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Handler\\NativeStatsHandler' => __DIR__ . '/../..' . '/src/Handler/NativeStatsHandler.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ApiHelper' => __DIR__ . '/../..' . '/src/Helper/ApiHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ConfigHelper' => __DIR__ . '/../..' . '/src/Helper/ConfigHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\DbHelper' => __DIR__ . '/../..' . '/src/Helper/DbHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\JsonHelper' => __DIR__ . '/../..' . '/src/Helper/JsonHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ModuleHelper' => __DIR__ . '/../..' . '/src/Helper/ModuleHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\MultishopHelper' => __DIR__ . '/../..' . '/src/Helper/MultishopHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\NumberHelper' => __DIR__ . '/../..' . '/src/Helper/NumberHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\PrestaShopHelper' => __DIR__ . '/../..' . '/src/Helper/PrestaShopHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\SegmentHelper' => __DIR__ . '/../..' . '/src/Helper/SegmentHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ShopHelper' => __DIR__ . '/../..' . '/src/Helper/ShopHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Helper\\ToolsHelper' => __DIR__ . '/../..' . '/src/Helper/ToolsHelper.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\LegacyModuleInstaller' => __DIR__ . '/../..' . '/src/LegacyModuleInstaller.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\CheckResponseMiddleware' => __DIR__ . '/../..' . '/src/Middleware/CheckResponseMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\LogMiddleware' => __DIR__ . '/../..' . '/src/Middleware/LogMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\Middleware' => __DIR__ . '/../..' . '/src/Middleware/Middleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\ResponseMiddleware' => __DIR__ . '/../..' . '/src/Middleware/ResponseMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Middleware\\SentryMiddleware' => __DIR__ . '/../..' . '/src/Middleware/SentryMiddleware.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\GAInstaller' => __DIR__ . '/../..' . '/src/Module/GAInstaller.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\Install' => __DIR__ . '/../..' . '/src/Module/Install.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\Uninstall' => __DIR__ . '/../..' . '/src/Module/Uninstall.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Module\\Upgrade' => __DIR__ . '/../..' . '/src/Module/Upgrade.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Presenter\\FaqPresenter' => __DIR__ . '/../..' . '/src/Presenter/FaqPresenter.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Presenter\\ShopDataPresenter' => __DIR__ . '/../..' . '/src/Presenter/ShopDataPresenter.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Provider\\AnalyticsAccountsListProvider' => __DIR__ . '/../..' . '/src/Provider/AnalyticsAccountsListProvider.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Provider\\GoogleTagProvider' => __DIR__ . '/../..' . '/src/Provider/GoogleTagProvider.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Repository\\ConfigurationRepository' => __DIR__ . '/../..' . '/src/Repository/ConfigurationRepository.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Repository\\HookModuleRepository' => __DIR__ . '/../..' . '/src/Repository/HookModuleRepository.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Repository\\OrderRepository' => __DIR__ . '/../..' . '/src/Repository/OrderRepository.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\StatsTabManager' => __DIR__ . '/../..' . '/src/StatsTabManager.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Tracker\\Segment' => __DIR__ . '/../..' . '/src/Tracker/Segment.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Tracker\\TrackerInterface' => __DIR__ . '/../..' . '/src/Tracker/TrackerInterface.php',
|
||||
'PrestaShop\\Module\\Ps_metrics\\Validation\\SelectAccountAnalytics' => __DIR__ . '/../..' . '/src/Validation/SelectAccountAnalytics.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\InstallerException' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/InstallerException.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleNotInstalledException' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleNotInstalledException.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Exception\\ModuleVersionException' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Exception/ModuleVersionException.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Facade\\PsAccounts' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Facade/PsAccounts.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Installer' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Installer.php',
|
||||
'PrestaShop\\PsAccountsInstaller\\Installer\\Presenter\\InstallerPresenter' => __DIR__ . '/..' . '/prestashop/prestashop-accounts-installer/src/Installer/Presenter/InstallerPresenter.php',
|
||||
'Ps_metrics' => __DIR__ . '/../..' . '/ps_metrics.php',
|
||||
'React\\Promise\\CancellablePromiseInterface' => __DIR__ . '/..' . '/react/promise/src/CancellablePromiseInterface.php',
|
||||
'React\\Promise\\CancellationQueue' => __DIR__ . '/..' . '/react/promise/src/CancellationQueue.php',
|
||||
'React\\Promise\\Deferred' => __DIR__ . '/..' . '/react/promise/src/Deferred.php',
|
||||
'React\\Promise\\Exception\\LengthException' => __DIR__ . '/..' . '/react/promise/src/Exception/LengthException.php',
|
||||
'React\\Promise\\ExtendedPromiseInterface' => __DIR__ . '/..' . '/react/promise/src/ExtendedPromiseInterface.php',
|
||||
'React\\Promise\\FulfilledPromise' => __DIR__ . '/..' . '/react/promise/src/FulfilledPromise.php',
|
||||
'React\\Promise\\LazyPromise' => __DIR__ . '/..' . '/react/promise/src/LazyPromise.php',
|
||||
'React\\Promise\\Promise' => __DIR__ . '/..' . '/react/promise/src/Promise.php',
|
||||
'React\\Promise\\PromiseInterface' => __DIR__ . '/..' . '/react/promise/src/PromiseInterface.php',
|
||||
'React\\Promise\\PromisorInterface' => __DIR__ . '/..' . '/react/promise/src/PromisorInterface.php',
|
||||
'React\\Promise\\RejectedPromise' => __DIR__ . '/..' . '/react/promise/src/RejectedPromise.php',
|
||||
'React\\Promise\\UnhandledRejectionException' => __DIR__ . '/..' . '/react/promise/src/UnhandledRejectionException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeader' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeader.php',
|
||||
'Symfony\\Component\\HttpFoundation\\AcceptHeaderItem' => __DIR__ . '/..' . '/symfony/http-foundation/AcceptHeaderItem.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ApacheRequest' => __DIR__ . '/..' . '/symfony/http-foundation/ApacheRequest.php',
|
||||
'Symfony\\Component\\HttpFoundation\\BinaryFileResponse' => __DIR__ . '/..' . '/symfony/http-foundation/BinaryFileResponse.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Cookie' => __DIR__ . '/..' . '/symfony/http-foundation/Cookie.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Exception\\ConflictingHeadersException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/ConflictingHeadersException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Exception\\RequestExceptionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/RequestExceptionInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Exception\\SuspiciousOperationException' => __DIR__ . '/..' . '/symfony/http-foundation/Exception/SuspiciousOperationException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ExpressionRequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/ExpressionRequestMatcher.php',
|
||||
'Symfony\\Component\\HttpFoundation\\FileBag' => __DIR__ . '/..' . '/symfony/http-foundation/FileBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\AccessDeniedException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/AccessDeniedException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/FileNotFoundException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\UnexpectedTypeException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UnexpectedTypeException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Exception\\UploadException' => __DIR__ . '/..' . '/symfony/http-foundation/File/Exception/UploadException.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\File' => __DIR__ . '/..' . '/symfony/http-foundation/File/File.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/ExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\ExtensionGuesserInterface' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/ExtensionGuesserInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileBinaryMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/FileBinaryMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\FileinfoMimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeExtensionGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeExtensionGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesser' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeGuesser.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\MimeType\\MimeTypeGuesserInterface' => __DIR__ . '/..' . '/symfony/http-foundation/File/MimeType/MimeTypeGuesserInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\Stream' => __DIR__ . '/..' . '/symfony/http-foundation/File/Stream.php',
|
||||
'Symfony\\Component\\HttpFoundation\\File\\UploadedFile' => __DIR__ . '/..' . '/symfony/http-foundation/File/UploadedFile.php',
|
||||
'Symfony\\Component\\HttpFoundation\\HeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/HeaderBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\IpUtils' => __DIR__ . '/..' . '/symfony/http-foundation/IpUtils.php',
|
||||
'Symfony\\Component\\HttpFoundation\\JsonResponse' => __DIR__ . '/..' . '/symfony/http-foundation/JsonResponse.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ParameterBag' => __DIR__ . '/..' . '/symfony/http-foundation/ParameterBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RedirectResponse' => __DIR__ . '/..' . '/symfony/http-foundation/RedirectResponse.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Request' => __DIR__ . '/..' . '/symfony/http-foundation/Request.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RequestMatcher' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcher.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RequestMatcherInterface' => __DIR__ . '/..' . '/symfony/http-foundation/RequestMatcherInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\RequestStack' => __DIR__ . '/..' . '/symfony/http-foundation/RequestStack.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Response' => __DIR__ . '/..' . '/symfony/http-foundation/Response.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ResponseHeaderBag' => __DIR__ . '/..' . '/symfony/http-foundation/ResponseHeaderBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\ServerBag' => __DIR__ . '/..' . '/symfony/http-foundation/ServerBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Attribute\\NamespacedAttributeBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Flash/FlashBagInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Session' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Session.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionBagProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionBagProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\SessionUtils' => __DIR__ . '/..' . '/symfony/http-foundation/Session/SessionUtils.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\AbstractSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcacheSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MemcachedSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\MongoDbSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeFileSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NativeSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NativeSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\NullSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\PdoSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\StrictSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Handler\\WriteCheckSessionHandler' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Handler/WriteCheckSessionHandler.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MetadataBag' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MetadataBag.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockArraySessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\MockFileSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\NativeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/NativeSessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\PhpBridgeSessionStorage' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\AbstractProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/NativeProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\SessionHandlerProxy' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php',
|
||||
'Symfony\\Component\\HttpFoundation\\Session\\Storage\\SessionStorageInterface' => __DIR__ . '/..' . '/symfony/http-foundation/Session/Storage/SessionStorageInterface.php',
|
||||
'Symfony\\Component\\HttpFoundation\\StreamedResponse' => __DIR__ . '/..' . '/symfony/http-foundation/StreamedResponse.php',
|
||||
'Symfony\\Polyfill\\Ctype\\Ctype' => __DIR__ . '/..' . '/symfony/polyfill-ctype/Ctype.php',
|
||||
'Symfony\\Polyfill\\Mbstring\\Mbstring' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/Mbstring.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitbbbd1fbbd4bf8eb230a5e1cdf40dc7b8::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
11
modules/ps_metrics/vendor/composer/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/composer/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;
|
||||
827
modules/ps_metrics/vendor/composer/installed.json
vendored
Normal file
827
modules/ps_metrics/vendor/composer/installed.json
vendored
Normal file
@@ -0,0 +1,827 @@
|
||||
{
|
||||
"packages": [
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "5.3.4",
|
||||
"version_normalized": "5.3.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "b87eda7a7162f95574032da17e9323c9899cb6b2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/b87eda7a7162f95574032da17e9323c9899cb6b2",
|
||||
"reference": "b87eda7a7162f95574032da17e9323c9899cb6b2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/ringphp": "^1.1",
|
||||
"php": ">=5.4.0",
|
||||
"react/promise": "^2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.0"
|
||||
},
|
||||
"time": "2019-10-30T09:32:00+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"keywords": [
|
||||
"client",
|
||||
"curl",
|
||||
"framework",
|
||||
"http",
|
||||
"http client",
|
||||
"rest",
|
||||
"web service"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/5.3"
|
||||
},
|
||||
"install-path": "../guzzlehttp/guzzle"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/ringphp",
|
||||
"version": "1.1.1",
|
||||
"version_normalized": "1.1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/RingPHP.git",
|
||||
"reference": "5e2a174052995663dd68e6b5ad838afd47dd615b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/RingPHP/zipball/5e2a174052995663dd68e6b5ad838afd47dd615b",
|
||||
"reference": "5e2a174052995663dd68e6b5ad838afd47dd615b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"guzzlehttp/streams": "~3.0",
|
||||
"php": ">=5.4.0",
|
||||
"react/promise": "~2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "Guzzle will use specific adapters if cURL is present"
|
||||
},
|
||||
"time": "2018-07-31T13:22:33+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Ring\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/RingPHP/issues",
|
||||
"source": "https://github.com/guzzle/RingPHP/tree/1.1.1"
|
||||
},
|
||||
"abandoned": true,
|
||||
"install-path": "../guzzlehttp/ringphp"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/streams",
|
||||
"version": "3.0.0",
|
||||
"version_normalized": "3.0.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/streams.git",
|
||||
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
|
||||
"reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.0"
|
||||
},
|
||||
"time": "2014-10-12T19:18:40+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Stream\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Provides a simple abstraction over streams of data",
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"keywords": [
|
||||
"Guzzle",
|
||||
"stream"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/streams/issues",
|
||||
"source": "https://github.com/guzzle/streams/tree/master"
|
||||
},
|
||||
"abandoned": true,
|
||||
"install-path": "../guzzlehttp/streams"
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
"version": "1.8.1",
|
||||
"version_normalized": "1.8.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/php-option.git",
|
||||
"reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15",
|
||||
"reference": "eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.0 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||
"phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8"
|
||||
},
|
||||
"time": "2021-12-04T23:24:31+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.8-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpOption\\": "src/PhpOption/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Johannes M. Schmitt",
|
||||
"email": "schmittjoh@gmail.com",
|
||||
"homepage": "https://github.com/schmittjoh"
|
||||
},
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
}
|
||||
],
|
||||
"description": "Option Type for PHP",
|
||||
"keywords": [
|
||||
"language",
|
||||
"option",
|
||||
"php",
|
||||
"type"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/schmittjoh/php-option/issues",
|
||||
"source": "https://github.com/schmittjoh/php-option/tree/1.8.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../phpoption/phpoption"
|
||||
},
|
||||
{
|
||||
"name": "prestashop/prestashop-accounts-installer",
|
||||
"version": "v1.0.1",
|
||||
"version_normalized": "1.0.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PrestaShopCorp/prestashop-accounts-installer.git",
|
||||
"reference": "f038af2408968d1045330b32aa1fed65fcaf4c9b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PrestaShopCorp/prestashop-accounts-installer/zipball/f038af2408968d1045330b32aa1fed65fcaf4c9b",
|
||||
"reference": "f038af2408968d1045330b32aa1fed65fcaf4c9b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.16",
|
||||
"fzaninotto/faker": "^1.9",
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"prestashop/php-dev-tools": "3.*"
|
||||
},
|
||||
"time": "2021-07-23T15:40:36+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PrestaShop\\PsAccountsInstaller\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"description": "Utility package to install `ps_accounts` module or present data to trigger manual install from psx configuration page.",
|
||||
"support": {
|
||||
"issues": "https://github.com/PrestaShopCorp/prestashop-accounts-installer/issues",
|
||||
"source": "https://github.com/PrestaShopCorp/prestashop-accounts-installer/tree/v1.0.1"
|
||||
},
|
||||
"install-path": "../prestashop/prestashop-accounts-installer"
|
||||
},
|
||||
{
|
||||
"name": "react/promise",
|
||||
"version": "v2.9.0",
|
||||
"version_normalized": "2.9.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/reactphp/promise.git",
|
||||
"reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/reactphp/promise/zipball/234f8fd1023c9158e2314fa9d7d0e6a83db42910",
|
||||
"reference": "234f8fd1023c9158e2314fa9d7d0e6a83db42910",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.36"
|
||||
},
|
||||
"time": "2022-02-11T10:27:51+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/functions_include.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"React\\Promise\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Jan Sorgalla",
|
||||
"email": "jsorgalla@gmail.com",
|
||||
"homepage": "https://sorgalla.com/"
|
||||
},
|
||||
{
|
||||
"name": "Christian Lück",
|
||||
"email": "christian@clue.engineering",
|
||||
"homepage": "https://clue.engineering/"
|
||||
},
|
||||
{
|
||||
"name": "Cees-Jan Kiewiet",
|
||||
"email": "reactphp@ceesjankiewiet.nl",
|
||||
"homepage": "https://wyrihaximus.net/"
|
||||
},
|
||||
{
|
||||
"name": "Chris Boden",
|
||||
"email": "cboden@gmail.com",
|
||||
"homepage": "https://cboden.dev/"
|
||||
}
|
||||
],
|
||||
"description": "A lightweight implementation of CommonJS Promises/A for PHP",
|
||||
"keywords": [
|
||||
"promise",
|
||||
"promises"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/reactphp/promise/issues",
|
||||
"source": "https://github.com/reactphp/promise/tree/v2.9.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/WyriHaximus",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/clue",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"install-path": "../react/promise"
|
||||
},
|
||||
{
|
||||
"name": "segmentio/analytics-php",
|
||||
"version": "1.8.0",
|
||||
"version_normalized": "1.8.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/segmentio/analytics-php.git",
|
||||
"reference": "7e25b2f6094632bbfb79e33ca024d533899a2ffe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/segmentio/analytics-php/zipball/7e25b2f6094632bbfb79e33ca024d533899a2ffe",
|
||||
"reference": "7e25b2f6094632bbfb79e33ca024d533899a2ffe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"overtrue/phplint": "^1.1",
|
||||
"phpunit/phpunit": "~4.0",
|
||||
"squizlabs/php_codesniffer": "^3.3"
|
||||
},
|
||||
"time": "2021-05-31T22:44:22+00:00",
|
||||
"bin": [
|
||||
"bin/analytics"
|
||||
],
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/Segment.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Segment.io <friends@segment.com>",
|
||||
"homepage": "https://segment.com/"
|
||||
}
|
||||
],
|
||||
"description": "Segment Analytics PHP Library",
|
||||
"homepage": "https://segment.com/libraries/php",
|
||||
"keywords": [
|
||||
"analytics",
|
||||
"analytics.js",
|
||||
"segment",
|
||||
"segmentio"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/segmentio/analytics-php/issues",
|
||||
"source": "https://github.com/segmentio/analytics-php/tree/1.8.0"
|
||||
},
|
||||
"install-path": "../segmentio/analytics-php"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v3.4.47",
|
||||
"version_normalized": "3.4.47.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/b9885fcce6fe494201da4f70a9309770e9d13dc8",
|
||||
"reference": "b9885fcce6fe494201da4f70a9309770e9d13dc8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8",
|
||||
"symfony/polyfill-mbstring": "~1.1",
|
||||
"symfony/polyfill-php70": "~1.6"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/expression-language": "~2.8|~3.0|~4.0"
|
||||
},
|
||||
"time": "2020-10-24T10:57:07+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\HttpFoundation\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v3.4.47"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../symfony/http-foundation"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.25.0",
|
||||
"version_normalized": "1.25.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "30885182c981ab175d4d034db0f6f469898070ab"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
|
||||
"reference": "30885182c981ab175d4d034db0f6f469898070ab",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"provide": {
|
||||
"ext-ctype": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
},
|
||||
"time": "2021-10-20T20:35:02+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"ctype",
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../symfony/polyfill-ctype"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.25.0",
|
||||
"version_normalized": "1.25.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
|
||||
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"provide": {
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"time": "2021-11-30T18:21:41+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.23-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for the Mbstring extension",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"mbstring",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.25.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../symfony/polyfill-mbstring"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php70",
|
||||
"version": "v1.20.0",
|
||||
"version_normalized": "1.20.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php70.git",
|
||||
"reference": "5f03a781d984aae42cebd18e7912fa80f02ee644"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644",
|
||||
"reference": "5f03a781d984aae42cebd18e7912fa80f02ee644",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"time": "2020-10-23T14:02:19+00:00",
|
||||
"type": "metapackage",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.20-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": null
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v3.6.10",
|
||||
"version_normalized": "3.6.10.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/phpdotenv.git",
|
||||
"reference": "5b547cdb25825f10251370f57ba5d9d924e6f68e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/5b547cdb25825f10251370f57ba5d9d924e6f68e",
|
||||
"reference": "5b547cdb25825f10251370f57ba5d9d924e6f68e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.4 || ^7.0 || ^8.0",
|
||||
"phpoption/phpoption": "^1.5.2",
|
||||
"symfony/polyfill-ctype": "^1.17"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-filter": "*",
|
||||
"ext-pcre": "*",
|
||||
"phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-filter": "Required to use the boolean validator.",
|
||||
"ext-pcre": "Required to use most of the library."
|
||||
},
|
||||
"time": "2021-12-12T23:02:06+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.6-dev"
|
||||
}
|
||||
},
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Dotenv\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Graham Campbell",
|
||||
"email": "hello@gjcampbell.co.uk",
|
||||
"homepage": "https://github.com/GrahamCampbell"
|
||||
},
|
||||
{
|
||||
"name": "Vance Lucas",
|
||||
"email": "vance@vancelucas.com",
|
||||
"homepage": "https://github.com/vlucas"
|
||||
}
|
||||
],
|
||||
"description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.",
|
||||
"keywords": [
|
||||
"dotenv",
|
||||
"env",
|
||||
"environment"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/vlucas/phpdotenv/issues",
|
||||
"source": "https://github.com/vlucas/phpdotenv/tree/v3.6.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/GrahamCampbell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"install-path": "../vlucas/phpdotenv"
|
||||
}
|
||||
],
|
||||
"dev": false,
|
||||
"dev-package-names": []
|
||||
}
|
||||
131
modules/ps_metrics/vendor/composer/installed.php
vendored
Normal file
131
modules/ps_metrics/vendor/composer/installed.php
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'prestashopcorp/ps_metrics',
|
||||
'pretty_version' => 'dev-4dda81d3257eb90581cf1bad2649b1d2fa968a4a',
|
||||
'version' => 'dev-4dda81d3257eb90581cf1bad2649b1d2fa968a4a',
|
||||
'reference' => '4dda81d3257eb90581cf1bad2649b1d2fa968a4a',
|
||||
'type' => 'prestashop-module',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev' => false,
|
||||
),
|
||||
'versions' => array(
|
||||
'guzzlehttp/guzzle' => array(
|
||||
'pretty_version' => '5.3.4',
|
||||
'version' => '5.3.4.0',
|
||||
'reference' => 'b87eda7a7162f95574032da17e9323c9899cb6b2',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/ringphp' => array(
|
||||
'pretty_version' => '1.1.1',
|
||||
'version' => '1.1.1.0',
|
||||
'reference' => '5e2a174052995663dd68e6b5ad838afd47dd615b',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/ringphp',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'guzzlehttp/streams' => array(
|
||||
'pretty_version' => '3.0.0',
|
||||
'version' => '3.0.0.0',
|
||||
'reference' => '47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../guzzlehttp/streams',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'phpoption/phpoption' => array(
|
||||
'pretty_version' => '1.8.1',
|
||||
'version' => '1.8.1.0',
|
||||
'reference' => 'eab7a0df01fe2344d172bff4cd6dbd3f8b84ad15',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpoption/phpoption',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'prestashop/prestashop-accounts-installer' => array(
|
||||
'pretty_version' => 'v1.0.1',
|
||||
'version' => '1.0.1.0',
|
||||
'reference' => 'f038af2408968d1045330b32aa1fed65fcaf4c9b',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../prestashop/prestashop-accounts-installer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'prestashopcorp/ps_metrics' => array(
|
||||
'pretty_version' => 'dev-4dda81d3257eb90581cf1bad2649b1d2fa968a4a',
|
||||
'version' => 'dev-4dda81d3257eb90581cf1bad2649b1d2fa968a4a',
|
||||
'reference' => '4dda81d3257eb90581cf1bad2649b1d2fa968a4a',
|
||||
'type' => 'prestashop-module',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'react/promise' => array(
|
||||
'pretty_version' => 'v2.9.0',
|
||||
'version' => '2.9.0.0',
|
||||
'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../react/promise',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'segmentio/analytics-php' => array(
|
||||
'pretty_version' => '1.8.0',
|
||||
'version' => '1.8.0.0',
|
||||
'reference' => '7e25b2f6094632bbfb79e33ca024d533899a2ffe',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../segmentio/analytics-php',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/http-foundation' => array(
|
||||
'pretty_version' => 'v3.4.47',
|
||||
'version' => '3.4.47.0',
|
||||
'reference' => 'b9885fcce6fe494201da4f70a9309770e9d13dc8',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/http-foundation',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-ctype' => array(
|
||||
'pretty_version' => 'v1.25.0',
|
||||
'version' => '1.25.0.0',
|
||||
'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.25.0',
|
||||
'version' => '1.25.0.0',
|
||||
'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php70' => array(
|
||||
'pretty_version' => 'v1.20.0',
|
||||
'version' => '1.20.0.0',
|
||||
'reference' => '5f03a781d984aae42cebd18e7912fa80f02ee644',
|
||||
'type' => 'metapackage',
|
||||
'install_path' => NULL,
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'vlucas/phpdotenv' => array(
|
||||
'pretty_version' => 'v3.6.10',
|
||||
'version' => '3.6.10.0',
|
||||
'reference' => '5b547cdb25825f10251370f57ba5d9d924e6f68e',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../vlucas/phpdotenv',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
26
modules/ps_metrics/vendor/composer/platform_check.php
vendored
Normal file
26
modules/ps_metrics/vendor/composer/platform_check.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// platform_check.php @generated by Composer
|
||||
|
||||
$issues = array();
|
||||
|
||||
if (!(PHP_VERSION_ID >= 70100)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
|
||||
}
|
||||
|
||||
if ($issues) {
|
||||
if (!headers_sent()) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
}
|
||||
if (!ini_get('display_errors')) {
|
||||
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
||||
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
||||
} elseif (!headers_sent()) {
|
||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||
}
|
||||
}
|
||||
trigger_error(
|
||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
||||
E_USER_ERROR
|
||||
);
|
||||
}
|
||||
11
modules/ps_metrics/vendor/doctrine/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/doctrine/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;
|
||||
11
modules/ps_metrics/vendor/friendsofphp/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/friendsofphp/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;
|
||||
52
modules/ps_metrics/vendor/guzzlehttp/guzzle/.travis.yml
vendored
Normal file
52
modules/ps_metrics/vendor/guzzlehttp/guzzle/.travis.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- hhvm
|
||||
- nightly
|
||||
|
||||
env:
|
||||
global:
|
||||
- TEST_COMMAND="composer test"
|
||||
|
||||
before_script:
|
||||
- curl --version
|
||||
- pear config-set php_ini ~/.phpenv/versions/`php -r 'echo phpversion();'`/etc/php.ini || echo 'Error modifying PEAR'
|
||||
- pecl install uri_template || echo 'Error installing uri_template'
|
||||
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355
|
||||
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi
|
||||
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction
|
||||
- ~/.nvm/nvm.sh install v0.6.14
|
||||
- ~/.nvm/nvm.sh run v0.6.14
|
||||
|
||||
script: $TEST_COMMAND
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.4
|
||||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
|
||||
|
||||
before_deploy:
|
||||
- make package
|
||||
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key:
|
||||
secure: UpypqlYgsU68QT/x40YzhHXvzWjFwCNo9d+G8KAdm7U9+blFfcWhV1aMdzugvPMl6woXgvJj7qHq5tAL4v6oswCORhpSBfLgOQVFaica5LiHsvWlAedOhxGmnJqMTwuepjBCxXhs3+I8Kof1n4oUL9gKytXjOVCX/f7XU1HiinU=
|
||||
file:
|
||||
- build/artifacts/guzzle.phar
|
||||
- build/artifacts/guzzle.zip
|
||||
on:
|
||||
repo: guzzle/guzzle
|
||||
tags: true
|
||||
all_branches: true
|
||||
php: 5.4
|
||||
1075
modules/ps_metrics/vendor/guzzlehttp/guzzle/CHANGELOG.md
vendored
Normal file
1075
modules/ps_metrics/vendor/guzzlehttp/guzzle/CHANGELOG.md
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19
modules/ps_metrics/vendor/guzzlehttp/guzzle/LICENSE
vendored
Normal file
19
modules/ps_metrics/vendor/guzzlehttp/guzzle/LICENSE
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2011-2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com>
|
||||
|
||||
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.
|
||||
70
modules/ps_metrics/vendor/guzzlehttp/guzzle/README.md
vendored
Normal file
70
modules/ps_metrics/vendor/guzzlehttp/guzzle/README.md
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
Guzzle, PHP HTTP client and webservice framework
|
||||
================================================
|
||||
|
||||
[](http://travis-ci.org/guzzle/guzzle)
|
||||
|
||||
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and
|
||||
trivial to integrate with web services.
|
||||
|
||||
- Manages things like persistent connections, represents query strings as
|
||||
collections, simplifies sending streaming POST requests with fields and
|
||||
files, and abstracts away the underlying HTTP transport layer.
|
||||
- Can send both synchronous and asynchronous requests using the same interface
|
||||
without requiring a dependency on a specific event loop.
|
||||
- Pluggable HTTP adapters allows Guzzle to integrate with any method you choose
|
||||
for sending HTTP requests over the wire (e.g., cURL, sockets, PHP's stream
|
||||
wrapper, non-blocking event loops like ReactPHP.
|
||||
- Guzzle makes it so that you no longer need to fool around with cURL options,
|
||||
stream contexts, or sockets.
|
||||
|
||||
```php
|
||||
$client = new GuzzleHttp\Client();
|
||||
$response = $client->get('http://guzzlephp.org');
|
||||
$res = $client->get('https://api.github.com/user', ['auth' => ['user', 'pass']]);
|
||||
echo $res->getStatusCode();
|
||||
// "200"
|
||||
echo $res->getHeader('content-type');
|
||||
// 'application/json; charset=utf8'
|
||||
echo $res->getBody();
|
||||
// {"type":"User"...'
|
||||
var_export($res->json());
|
||||
// Outputs the JSON decoded data
|
||||
|
||||
// Send an asynchronous request.
|
||||
$req = $client->createRequest('GET', 'http://httpbin.org', ['future' => true]);
|
||||
$client->send($req)->then(function ($response) {
|
||||
echo 'I completed! ' . $response;
|
||||
});
|
||||
```
|
||||
|
||||
Get more information and answers with the
|
||||
[Documentation](http://guzzlephp.org/),
|
||||
[Forums](https://groups.google.com/forum/?hl=en#!forum/guzzle),
|
||||
and [Gitter](https://gitter.im/guzzle/guzzle).
|
||||
|
||||
### Installing via Composer
|
||||
|
||||
The recommended way to install Guzzle is through
|
||||
[Composer](http://getcomposer.org).
|
||||
|
||||
```bash
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
```
|
||||
|
||||
Next, run the Composer command to install the latest stable version of Guzzle:
|
||||
|
||||
```bash
|
||||
composer.phar require guzzlehttp/guzzle
|
||||
```
|
||||
|
||||
After installing, you need to require Composer's autoloader:
|
||||
|
||||
```php
|
||||
require 'vendor/autoload.php';
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
More information can be found in the online documentation at
|
||||
http://guzzlephp.org/.
|
||||
1050
modules/ps_metrics/vendor/guzzlehttp/guzzle/UPGRADING.md
vendored
Normal file
1050
modules/ps_metrics/vendor/guzzlehttp/guzzle/UPGRADING.md
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/build/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/build/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;
|
||||
38
modules/ps_metrics/vendor/guzzlehttp/guzzle/composer.json
vendored
Normal file
38
modules/ps_metrics/vendor/guzzlehttp/guzzle/composer.json
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"type": "library",
|
||||
"description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
|
||||
"keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
|
||||
"homepage": "http://guzzlephp.org/",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"guzzlehttp/ringphp": "^1.1",
|
||||
"react/promise": "^2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-curl": "*",
|
||||
"phpunit/phpunit": "^4.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"GuzzleHttp\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "make test",
|
||||
"test-ci": "make coverage"
|
||||
}
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/docs/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/docs/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;
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/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;
|
||||
148
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/BatchResults.php
vendored
Normal file
148
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/BatchResults.php
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
/**
|
||||
* Represents the result of a batch operation. This result container is
|
||||
* iterable, countable, and you can can get a result by value using the
|
||||
* getResult function.
|
||||
*
|
||||
* Successful results are anything other than exceptions. Failure results are
|
||||
* exceptions.
|
||||
*
|
||||
* @package GuzzleHttp
|
||||
*/
|
||||
class BatchResults implements \Countable, \IteratorAggregate, \ArrayAccess
|
||||
{
|
||||
private $hash;
|
||||
|
||||
/**
|
||||
* @param \SplObjectStorage $hash Hash of key objects to result values.
|
||||
*/
|
||||
public function __construct(\SplObjectStorage $hash)
|
||||
{
|
||||
$this->hash = $hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the keys that are available on the batch result.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getKeys()
|
||||
{
|
||||
return iterator_to_array($this->hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a result from the container for the given object. When getting
|
||||
* results for a batch of requests, provide the request object.
|
||||
*
|
||||
* @param object $forObject Object to retrieve the result for.
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function getResult($forObject)
|
||||
{
|
||||
return isset($this->hash[$forObject]) ? $this->hash[$forObject] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of successful results.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSuccessful()
|
||||
{
|
||||
$results = [];
|
||||
foreach ($this->hash as $key) {
|
||||
if (!($this->hash[$key] instanceof \Exception)) {
|
||||
$results[] = $this->hash[$key];
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of failed results.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFailures()
|
||||
{
|
||||
$results = [];
|
||||
foreach ($this->hash as $key) {
|
||||
if ($this->hash[$key] instanceof \Exception) {
|
||||
$results[] = $this->hash[$key];
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows iteration over all batch result values.
|
||||
*
|
||||
* @return \ArrayIterator
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
$results = [];
|
||||
foreach ($this->hash as $key) {
|
||||
$results[] = $this->hash[$key];
|
||||
}
|
||||
|
||||
return new \ArrayIterator($results);
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts the number of elements in the batch result.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the batch contains a specific numerical array index.
|
||||
*
|
||||
* @param int $key Index to access
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function offsetExists($key)
|
||||
{
|
||||
return $key < count($this->hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows access of the batch using a numerical array index.
|
||||
*
|
||||
* @param int $key Index to access.
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function offsetGet($key)
|
||||
{
|
||||
$i = -1;
|
||||
foreach ($this->hash as $obj) {
|
||||
if ($key === ++$i) {
|
||||
return $this->hash[$obj];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
throw new \RuntimeException('Not implemented');
|
||||
}
|
||||
|
||||
public function offsetSet($key, $value)
|
||||
{
|
||||
throw new \RuntimeException('Not implemented');
|
||||
}
|
||||
}
|
||||
362
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Client.php
vendored
Normal file
362
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Client.php
vendored
Normal file
@@ -0,0 +1,362 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Event\HasEmitterTrait;
|
||||
use GuzzleHttp\Message\MessageFactory;
|
||||
use GuzzleHttp\Message\MessageFactoryInterface;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\FutureResponse;
|
||||
use GuzzleHttp\Ring\Core;
|
||||
use GuzzleHttp\Ring\Future\FutureInterface;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use React\Promise\FulfilledPromise;
|
||||
use React\Promise\RejectedPromise;
|
||||
|
||||
/**
|
||||
* HTTP client
|
||||
*/
|
||||
class Client implements ClientInterface
|
||||
{
|
||||
use HasEmitterTrait;
|
||||
|
||||
/** @var MessageFactoryInterface Request factory used by the client */
|
||||
private $messageFactory;
|
||||
|
||||
/** @var Url Base URL of the client */
|
||||
private $baseUrl;
|
||||
|
||||
/** @var array Default request options */
|
||||
private $defaults;
|
||||
|
||||
/** @var callable Request state machine */
|
||||
private $fsm;
|
||||
|
||||
/**
|
||||
* Clients accept an array of constructor parameters.
|
||||
*
|
||||
* Here's an example of creating a client using an URI template for the
|
||||
* client's base_url and an array of default request options to apply
|
||||
* to each request:
|
||||
*
|
||||
* $client = new Client([
|
||||
* 'base_url' => [
|
||||
* 'http://www.foo.com/{version}/',
|
||||
* ['version' => '123']
|
||||
* ],
|
||||
* 'defaults' => [
|
||||
* 'timeout' => 10,
|
||||
* 'allow_redirects' => false,
|
||||
* 'proxy' => '192.168.16.1:10'
|
||||
* ]
|
||||
* ]);
|
||||
*
|
||||
* @param array $config Client configuration settings
|
||||
* - base_url: Base URL of the client that is merged into relative URLs.
|
||||
* Can be a string or an array that contains a URI template followed
|
||||
* by an associative array of expansion variables to inject into the
|
||||
* URI template.
|
||||
* - handler: callable RingPHP handler used to transfer requests
|
||||
* - message_factory: Factory used to create request and response object
|
||||
* - defaults: Default request options to apply to each request
|
||||
* - emitter: Event emitter used for request events
|
||||
* - fsm: (internal use only) The request finite state machine. A
|
||||
* function that accepts a transaction and optional final state. The
|
||||
* function is responsible for transitioning a request through its
|
||||
* lifecycle events.
|
||||
*/
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
$this->configureBaseUrl($config);
|
||||
$this->configureDefaults($config);
|
||||
|
||||
if (isset($config['emitter'])) {
|
||||
$this->emitter = $config['emitter'];
|
||||
}
|
||||
|
||||
$this->messageFactory = isset($config['message_factory'])
|
||||
? $config['message_factory']
|
||||
: new MessageFactory();
|
||||
|
||||
if (isset($config['fsm'])) {
|
||||
$this->fsm = $config['fsm'];
|
||||
} else {
|
||||
if (isset($config['handler'])) {
|
||||
$handler = $config['handler'];
|
||||
} elseif (isset($config['adapter'])) {
|
||||
$handler = $config['adapter'];
|
||||
} else {
|
||||
$handler = Utils::getDefaultHandler();
|
||||
}
|
||||
$this->fsm = new RequestFsm($handler, $this->messageFactory);
|
||||
}
|
||||
}
|
||||
|
||||
public function getDefaultOption($keyOrPath = null)
|
||||
{
|
||||
return $keyOrPath === null
|
||||
? $this->defaults
|
||||
: Utils::getPath($this->defaults, $keyOrPath);
|
||||
}
|
||||
|
||||
public function setDefaultOption($keyOrPath, $value)
|
||||
{
|
||||
Utils::setPath($this->defaults, $keyOrPath, $value);
|
||||
}
|
||||
|
||||
public function getBaseUrl()
|
||||
{
|
||||
return (string) $this->baseUrl;
|
||||
}
|
||||
|
||||
public function createRequest($method, $url = null, array $options = [])
|
||||
{
|
||||
$options = $this->mergeDefaults($options);
|
||||
// Use a clone of the client's emitter
|
||||
$options['config']['emitter'] = clone $this->getEmitter();
|
||||
$url = $url || (is_string($url) && strlen($url))
|
||||
? $this->buildUrl($url)
|
||||
: (string) $this->baseUrl;
|
||||
|
||||
return $this->messageFactory->createRequest($method, $url, $options);
|
||||
}
|
||||
|
||||
public function get($url = null, $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('GET', $url, $options));
|
||||
}
|
||||
|
||||
public function head($url = null, array $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('HEAD', $url, $options));
|
||||
}
|
||||
|
||||
public function delete($url = null, array $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('DELETE', $url, $options));
|
||||
}
|
||||
|
||||
public function put($url = null, array $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('PUT', $url, $options));
|
||||
}
|
||||
|
||||
public function patch($url = null, array $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('PATCH', $url, $options));
|
||||
}
|
||||
|
||||
public function post($url = null, array $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('POST', $url, $options));
|
||||
}
|
||||
|
||||
public function options($url = null, array $options = [])
|
||||
{
|
||||
return $this->send($this->createRequest('OPTIONS', $url, $options));
|
||||
}
|
||||
|
||||
public function send(RequestInterface $request)
|
||||
{
|
||||
$isFuture = $request->getConfig()->get('future');
|
||||
$trans = new Transaction($this, $request, $isFuture);
|
||||
$fn = $this->fsm;
|
||||
|
||||
try {
|
||||
$fn($trans);
|
||||
if ($isFuture) {
|
||||
// Turn the normal response into a future if needed.
|
||||
return $trans->response instanceof FutureInterface
|
||||
? $trans->response
|
||||
: new FutureResponse(new FulfilledPromise($trans->response));
|
||||
}
|
||||
// Resolve deep futures if this is not a future
|
||||
// transaction. This accounts for things like retries
|
||||
// that do not have an immediate side-effect.
|
||||
while ($trans->response instanceof FutureInterface) {
|
||||
$trans->response = $trans->response->wait();
|
||||
}
|
||||
return $trans->response;
|
||||
} catch (\Exception $e) {
|
||||
if ($isFuture) {
|
||||
// Wrap the exception in a promise
|
||||
return new FutureResponse(new RejectedPromise($e));
|
||||
}
|
||||
throw RequestException::wrapException($trans->request, $e);
|
||||
} catch (\TypeError $error) {
|
||||
$exception = new \Exception($error->getMessage(), $error->getCode(), $error);
|
||||
if ($isFuture) {
|
||||
// Wrap the exception in a promise
|
||||
return new FutureResponse(new RejectedPromise($exception));
|
||||
}
|
||||
throw RequestException::wrapException($trans->request, $exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an array of default options to apply to the client
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getDefaultOptions()
|
||||
{
|
||||
$settings = [
|
||||
'allow_redirects' => true,
|
||||
'exceptions' => true,
|
||||
'decode_content' => true,
|
||||
'verify' => true
|
||||
];
|
||||
|
||||
// Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set.
|
||||
// We can only trust the HTTP_PROXY environment variable in a CLI
|
||||
// process due to the fact that PHP has no reliable mechanism to
|
||||
// get environment variables that start with "HTTP_".
|
||||
if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) {
|
||||
$settings['proxy']['http'] = getenv('HTTP_PROXY');
|
||||
}
|
||||
|
||||
if ($proxy = getenv('HTTPS_PROXY')) {
|
||||
$settings['proxy']['https'] = $proxy;
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand a URI template and inherit from the base URL if it's relative
|
||||
*
|
||||
* @param string|array $url URL or an array of the URI template to expand
|
||||
* followed by a hash of template varnames.
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
private function buildUrl($url)
|
||||
{
|
||||
// URI template (absolute or relative)
|
||||
if (!is_array($url)) {
|
||||
return strpos($url, '://')
|
||||
? (string) $url
|
||||
: (string) $this->baseUrl->combine($url);
|
||||
}
|
||||
|
||||
if (!isset($url[1])) {
|
||||
throw new \InvalidArgumentException('You must provide a hash of '
|
||||
. 'varname options in the second element of a URL array.');
|
||||
}
|
||||
|
||||
// Absolute URL
|
||||
if (strpos($url[0], '://')) {
|
||||
return Utils::uriTemplate($url[0], $url[1]);
|
||||
}
|
||||
|
||||
// Combine the relative URL with the base URL
|
||||
return (string) $this->baseUrl->combine(
|
||||
Utils::uriTemplate($url[0], $url[1])
|
||||
);
|
||||
}
|
||||
|
||||
private function configureBaseUrl(&$config)
|
||||
{
|
||||
if (!isset($config['base_url'])) {
|
||||
$this->baseUrl = new Url('', '');
|
||||
} elseif (!is_array($config['base_url'])) {
|
||||
$this->baseUrl = Url::fromString($config['base_url']);
|
||||
} elseif (count($config['base_url']) < 2) {
|
||||
throw new \InvalidArgumentException('You must provide a hash of '
|
||||
. 'varname options in the second element of a base_url array.');
|
||||
} else {
|
||||
$this->baseUrl = Url::fromString(
|
||||
Utils::uriTemplate(
|
||||
$config['base_url'][0],
|
||||
$config['base_url'][1]
|
||||
)
|
||||
);
|
||||
$config['base_url'] = (string) $this->baseUrl;
|
||||
}
|
||||
}
|
||||
|
||||
private function configureDefaults($config)
|
||||
{
|
||||
if (!isset($config['defaults'])) {
|
||||
$this->defaults = $this->getDefaultOptions();
|
||||
} else {
|
||||
$this->defaults = array_replace(
|
||||
$this->getDefaultOptions(),
|
||||
$config['defaults']
|
||||
);
|
||||
}
|
||||
|
||||
// Add the default user-agent header
|
||||
if (!isset($this->defaults['headers'])) {
|
||||
$this->defaults['headers'] = [
|
||||
'User-Agent' => Utils::getDefaultUserAgent()
|
||||
];
|
||||
} elseif (!Core::hasHeader($this->defaults, 'User-Agent')) {
|
||||
// Add the User-Agent header if one was not already set
|
||||
$this->defaults['headers']['User-Agent'] = Utils::getDefaultUserAgent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges default options into the array passed by reference.
|
||||
*
|
||||
* @param array $options Options to modify by reference
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function mergeDefaults($options)
|
||||
{
|
||||
$defaults = $this->defaults;
|
||||
|
||||
// Case-insensitively merge in default headers if both defaults and
|
||||
// options have headers specified.
|
||||
if (!empty($defaults['headers']) && !empty($options['headers'])) {
|
||||
// Create a set of lowercased keys that are present.
|
||||
$lkeys = [];
|
||||
foreach (array_keys($options['headers']) as $k) {
|
||||
$lkeys[strtolower($k)] = true;
|
||||
}
|
||||
// Merge in lowercase default keys when not present in above set.
|
||||
foreach ($defaults['headers'] as $key => $value) {
|
||||
if (!isset($lkeys[strtolower($key)])) {
|
||||
$options['headers'][$key] = $value;
|
||||
}
|
||||
}
|
||||
// No longer need to merge in headers.
|
||||
unset($defaults['headers']);
|
||||
}
|
||||
|
||||
$result = array_replace_recursive($defaults, $options);
|
||||
foreach ($options as $k => $v) {
|
||||
if ($v === null) {
|
||||
unset($result[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@see GuzzleHttp\Pool} instead.
|
||||
* @see GuzzleHttp\Pool
|
||||
*/
|
||||
public function sendAll($requests, array $options = [])
|
||||
{
|
||||
Pool::send($this, $requests, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use GuzzleHttp\Utils::getDefaultHandler
|
||||
*/
|
||||
public static function getDefaultHandler()
|
||||
{
|
||||
return Utils::getDefaultHandler();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use GuzzleHttp\Utils::getDefaultUserAgent
|
||||
*/
|
||||
public static function getDefaultUserAgent()
|
||||
{
|
||||
return Utils::getDefaultUserAgent();
|
||||
}
|
||||
}
|
||||
150
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/ClientInterface.php
vendored
Normal file
150
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/ClientInterface.php
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Event\HasEmitterInterface;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Client interface for sending HTTP requests
|
||||
*/
|
||||
interface ClientInterface extends HasEmitterInterface
|
||||
{
|
||||
const VERSION = '5.3.1';
|
||||
|
||||
/**
|
||||
* Create and return a new {@see RequestInterface} object.
|
||||
*
|
||||
* Use an absolute path to override the base path of the client, or a
|
||||
* relative path to append to the base path of the client. The URL can
|
||||
* contain the query string as well. Use an array to provide a URL
|
||||
* template and additional variables to use in the URL template expansion.
|
||||
*
|
||||
* @param string $method HTTP method
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function createRequest($method, $url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Send a GET request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function get($url = null, $options = []);
|
||||
|
||||
/**
|
||||
* Send a HEAD request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function head($url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Send a DELETE request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function delete($url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Send a PUT request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function put($url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Send a PATCH request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function patch($url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Send a POST request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function post($url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Send an OPTIONS request
|
||||
*
|
||||
* @param string|array|Url $url URL or URI template
|
||||
* @param array $options Array of request options to apply.
|
||||
*
|
||||
* @return ResponseInterface
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function options($url = null, array $options = []);
|
||||
|
||||
/**
|
||||
* Sends a single request
|
||||
*
|
||||
* @param RequestInterface $request Request to send
|
||||
*
|
||||
* @return \GuzzleHttp\Message\ResponseInterface
|
||||
* @throws \LogicException When the handler does not populate a response
|
||||
* @throws RequestException When an error is encountered
|
||||
*/
|
||||
public function send(RequestInterface $request);
|
||||
|
||||
/**
|
||||
* Get default request options of the client.
|
||||
*
|
||||
* @param string|null $keyOrPath The Path to a particular default request
|
||||
* option to retrieve or pass null to retrieve all default request
|
||||
* options. The syntax uses "/" to denote a path through nested PHP
|
||||
* arrays. For example, "headers/content-type".
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDefaultOption($keyOrPath = null);
|
||||
|
||||
/**
|
||||
* Set a default request option on the client so that any request created
|
||||
* by the client will use the provided default value unless overridden
|
||||
* explicitly when creating a request.
|
||||
*
|
||||
* @param string|null $keyOrPath The Path to a particular configuration
|
||||
* value to set. The syntax uses a path notation that allows you to
|
||||
* specify nested configuration values (e.g., 'headers/content-type').
|
||||
* @param mixed $value Default request option value to set
|
||||
*/
|
||||
public function setDefaultOption($keyOrPath, $value);
|
||||
|
||||
/**
|
||||
* Get the base URL of the client.
|
||||
*
|
||||
* @return string Returns the base URL if present
|
||||
*/
|
||||
public function getBaseUrl();
|
||||
}
|
||||
236
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Collection.php
vendored
Normal file
236
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Collection.php
vendored
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
/**
|
||||
* Key value pair collection object
|
||||
*/
|
||||
class Collection implements
|
||||
\ArrayAccess,
|
||||
\IteratorAggregate,
|
||||
\Countable,
|
||||
ToArrayInterface
|
||||
{
|
||||
use HasDataTrait;
|
||||
|
||||
/**
|
||||
* @param array $data Associative array of data to set
|
||||
*/
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new collection from an array, validate the keys, and add default
|
||||
* values where missing
|
||||
*
|
||||
* @param array $config Configuration values to apply.
|
||||
* @param array $defaults Default parameters
|
||||
* @param array $required Required parameter names
|
||||
*
|
||||
* @return self
|
||||
* @throws \InvalidArgumentException if a parameter is missing
|
||||
*/
|
||||
public static function fromConfig(
|
||||
array $config = [],
|
||||
array $defaults = [],
|
||||
array $required = []
|
||||
) {
|
||||
$data = $config + $defaults;
|
||||
|
||||
if ($missing = array_diff($required, array_keys($data))) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Config is missing the following keys: ' .
|
||||
implode(', ', $missing));
|
||||
}
|
||||
|
||||
return new self($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all key value pairs
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->data = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a specific key value.
|
||||
*
|
||||
* @param string $key Key to retrieve.
|
||||
*
|
||||
* @return mixed|null Value of the key or NULL
|
||||
*/
|
||||
public function get($key)
|
||||
{
|
||||
return isset($this->data[$key]) ? $this->data[$key] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a key value pair
|
||||
*
|
||||
* @param string $key Key to set
|
||||
* @param mixed $value Value to set
|
||||
*/
|
||||
public function set($key, $value)
|
||||
{
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a value to a key. If a key of the same name has already been added,
|
||||
* the key value will be converted into an array and the new value will be
|
||||
* pushed to the end of the array.
|
||||
*
|
||||
* @param string $key Key to add
|
||||
* @param mixed $value Value to add to the key
|
||||
*/
|
||||
public function add($key, $value)
|
||||
{
|
||||
if (!array_key_exists($key, $this->data)) {
|
||||
$this->data[$key] = $value;
|
||||
} elseif (is_array($this->data[$key])) {
|
||||
$this->data[$key][] = $value;
|
||||
} else {
|
||||
$this->data[$key] = array($this->data[$key], $value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a specific key value pair
|
||||
*
|
||||
* @param string $key A key to remove
|
||||
*/
|
||||
public function remove($key)
|
||||
{
|
||||
unset($this->data[$key]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all keys in the collection
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getKeys()
|
||||
{
|
||||
return array_keys($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the specified key is present.
|
||||
*
|
||||
* @param string $key The key for which to check the existence.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasKey($key)
|
||||
{
|
||||
return array_key_exists($key, $this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if any keys contains a certain value
|
||||
*
|
||||
* @param string $value Value to search for
|
||||
*
|
||||
* @return mixed Returns the key if the value was found FALSE if the value
|
||||
* was not found.
|
||||
*/
|
||||
public function hasValue($value)
|
||||
{
|
||||
return array_search($value, $this->data, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace the data of the object with the value of an array
|
||||
*
|
||||
* @param array $data Associative array of data
|
||||
*/
|
||||
public function replace(array $data)
|
||||
{
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add and merge in a Collection or array of key value pair data.
|
||||
*
|
||||
* @param Collection|array $data Associative array of key value pair data
|
||||
*/
|
||||
public function merge($data)
|
||||
{
|
||||
foreach ($data as $key => $value) {
|
||||
$this->add($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwrite key value pairs in this collection with all of the data from
|
||||
* an array or collection.
|
||||
*
|
||||
* @param array|\Traversable $data Values to override over this config
|
||||
*/
|
||||
public function overwriteWith($data)
|
||||
{
|
||||
if (is_array($data)) {
|
||||
$this->data = $data + $this->data;
|
||||
} elseif ($data instanceof Collection) {
|
||||
$this->data = $data->toArray() + $this->data;
|
||||
} else {
|
||||
foreach ($data as $key => $value) {
|
||||
$this->data[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a Collection containing all the elements of the collection after
|
||||
* applying the callback function to each one.
|
||||
*
|
||||
* The callable should accept three arguments:
|
||||
* - (string) $key
|
||||
* - (string) $value
|
||||
* - (array) $context
|
||||
*
|
||||
* The callable must return a the altered or unaltered value.
|
||||
*
|
||||
* @param callable $closure Map function to apply
|
||||
* @param array $context Context to pass to the callable
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function map(callable $closure, array $context = [])
|
||||
{
|
||||
$collection = new static();
|
||||
foreach ($this as $key => $value) {
|
||||
$collection[$key] = $closure($key, $value, $context);
|
||||
}
|
||||
|
||||
return $collection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterates over each key value pair in the collection passing them to the
|
||||
* callable. If the callable returns true, the current value from input is
|
||||
* returned into the result Collection.
|
||||
*
|
||||
* The callable must accept two arguments:
|
||||
* - (string) $key
|
||||
* - (string) $value
|
||||
*
|
||||
* @param callable $closure Evaluation function
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function filter(callable $closure)
|
||||
{
|
||||
$collection = new static();
|
||||
foreach ($this->data as $key => $value) {
|
||||
if ($closure($key, $value)) {
|
||||
$collection[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $collection;
|
||||
}
|
||||
}
|
||||
248
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
vendored
Normal file
248
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
vendored
Normal file
@@ -0,0 +1,248 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\ToArrayInterface;
|
||||
|
||||
/**
|
||||
* Cookie jar that stores cookies an an array
|
||||
*/
|
||||
class CookieJar implements CookieJarInterface, ToArrayInterface
|
||||
{
|
||||
/** @var SetCookie[] Loaded cookie data */
|
||||
private $cookies = [];
|
||||
|
||||
/** @var bool */
|
||||
private $strictMode;
|
||||
|
||||
/**
|
||||
* @param bool $strictMode Set to true to throw exceptions when invalid
|
||||
* cookies are added to the cookie jar.
|
||||
* @param array $cookieArray Array of SetCookie objects or a hash of arrays
|
||||
* that can be used with the SetCookie constructor
|
||||
*/
|
||||
public function __construct($strictMode = false, $cookieArray = [])
|
||||
{
|
||||
$this->strictMode = $strictMode;
|
||||
|
||||
foreach ($cookieArray as $cookie) {
|
||||
if (!($cookie instanceof SetCookie)) {
|
||||
$cookie = new SetCookie($cookie);
|
||||
}
|
||||
$this->setCookie($cookie);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Cookie jar from an associative array and domain.
|
||||
*
|
||||
* @param array $cookies Cookies to create the jar from
|
||||
* @param string $domain Domain to set the cookies to
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function fromArray(array $cookies, $domain)
|
||||
{
|
||||
$cookieJar = new self();
|
||||
foreach ($cookies as $name => $value) {
|
||||
$cookieJar->setCookie(new SetCookie([
|
||||
'Domain' => $domain,
|
||||
'Name' => $name,
|
||||
'Value' => $value,
|
||||
'Discard' => true
|
||||
]));
|
||||
}
|
||||
|
||||
return $cookieJar;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quote the cookie value if it is not already quoted and it contains
|
||||
* problematic characters.
|
||||
*
|
||||
* @param string $value Value that may or may not need to be quoted
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getCookieValue($value)
|
||||
{
|
||||
if (substr($value, 0, 1) !== '"' &&
|
||||
substr($value, -1, 1) !== '"' &&
|
||||
strpbrk($value, ';,')
|
||||
) {
|
||||
$value = '"' . $value . '"';
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return array_map(function (SetCookie $cookie) {
|
||||
return $cookie->toArray();
|
||||
}, $this->getIterator()->getArrayCopy());
|
||||
}
|
||||
|
||||
public function clear($domain = null, $path = null, $name = null)
|
||||
{
|
||||
if (!$domain) {
|
||||
$this->cookies = [];
|
||||
return;
|
||||
} elseif (!$path) {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain) {
|
||||
return !$cookie->matchesDomain($domain);
|
||||
}
|
||||
);
|
||||
} elseif (!$name) {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain) {
|
||||
return !($cookie->matchesPath($path) &&
|
||||
$cookie->matchesDomain($domain));
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) use ($path, $domain, $name) {
|
||||
return !($cookie->getName() == $name &&
|
||||
$cookie->matchesPath($path) &&
|
||||
$cookie->matchesDomain($domain));
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function clearSessionCookies()
|
||||
{
|
||||
$this->cookies = array_filter(
|
||||
$this->cookies,
|
||||
function (SetCookie $cookie) {
|
||||
return !$cookie->getDiscard() && $cookie->getExpires();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function setCookie(SetCookie $cookie)
|
||||
{
|
||||
// Only allow cookies with set and valid domain, name, value
|
||||
$result = $cookie->validate();
|
||||
if ($result !== true) {
|
||||
if ($this->strictMode) {
|
||||
throw new \RuntimeException('Invalid cookie: ' . $result);
|
||||
} else {
|
||||
$this->removeCookieIfEmpty($cookie);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve conflicts with previously set cookies
|
||||
foreach ($this->cookies as $i => $c) {
|
||||
|
||||
// Two cookies are identical, when their path, and domain are
|
||||
// identical.
|
||||
if ($c->getPath() != $cookie->getPath() ||
|
||||
$c->getDomain() != $cookie->getDomain() ||
|
||||
$c->getName() != $cookie->getName()
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// The previously set cookie is a discard cookie and this one is
|
||||
// not so allow the new cookie to be set
|
||||
if (!$cookie->getDiscard() && $c->getDiscard()) {
|
||||
unset($this->cookies[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the new cookie's expiration is further into the future, then
|
||||
// replace the old cookie
|
||||
if ($cookie->getExpires() > $c->getExpires()) {
|
||||
unset($this->cookies[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// If the value has changed, we better change it
|
||||
if ($cookie->getValue() !== $c->getValue()) {
|
||||
unset($this->cookies[$i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// The cookie exists, so no need to continue
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->cookies[] = $cookie;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->cookies);
|
||||
}
|
||||
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator(array_values($this->cookies));
|
||||
}
|
||||
|
||||
public function extractCookies(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response
|
||||
) {
|
||||
if ($cookieHeader = $response->getHeaderAsArray('Set-Cookie')) {
|
||||
foreach ($cookieHeader as $cookie) {
|
||||
$sc = SetCookie::fromString($cookie);
|
||||
if (!$sc->getDomain()) {
|
||||
$sc->setDomain($request->getHost());
|
||||
}
|
||||
$this->setCookie($sc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function addCookieHeader(RequestInterface $request)
|
||||
{
|
||||
$values = [];
|
||||
$scheme = $request->getScheme();
|
||||
$host = $request->getHost();
|
||||
$path = $request->getPath();
|
||||
|
||||
foreach ($this->cookies as $cookie) {
|
||||
if ($cookie->matchesPath($path) &&
|
||||
$cookie->matchesDomain($host) &&
|
||||
!$cookie->isExpired() &&
|
||||
(!$cookie->getSecure() || $scheme == 'https')
|
||||
) {
|
||||
$values[] = $cookie->getName() . '='
|
||||
. self::getCookieValue($cookie->getValue());
|
||||
}
|
||||
}
|
||||
|
||||
if ($values) {
|
||||
$request->setHeader('Cookie', implode('; ', $values));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If a cookie already exists and the server asks to set it again with a
|
||||
* null value, the cookie must be deleted.
|
||||
*
|
||||
* @param SetCookie $cookie
|
||||
*/
|
||||
private function removeCookieIfEmpty(SetCookie $cookie)
|
||||
{
|
||||
$cookieValue = $cookie->getValue();
|
||||
if ($cookieValue === null || $cookieValue === '') {
|
||||
$this->clear(
|
||||
$cookie->getDomain(),
|
||||
$cookie->getPath(),
|
||||
$cookie->getName()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
75
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
vendored
Normal file
75
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Stores HTTP cookies.
|
||||
*
|
||||
* It extracts cookies from HTTP requests, and returns them in HTTP responses.
|
||||
* CookieJarInterface instances automatically expire contained cookies when
|
||||
* necessary. Subclasses are also responsible for storing and retrieving
|
||||
* cookies from a file, database, etc.
|
||||
*
|
||||
* @link http://docs.python.org/2/library/cookielib.html Inspiration
|
||||
*/
|
||||
interface CookieJarInterface extends \Countable, \IteratorAggregate
|
||||
{
|
||||
/**
|
||||
* Add a Cookie header to a request.
|
||||
*
|
||||
* If no matching cookies are found in the cookie jar, then no Cookie
|
||||
* header is added to the request.
|
||||
*
|
||||
* @param RequestInterface $request Request object to update
|
||||
*/
|
||||
public function addCookieHeader(RequestInterface $request);
|
||||
|
||||
/**
|
||||
* Extract cookies from an HTTP response and store them in the CookieJar.
|
||||
*
|
||||
* @param RequestInterface $request Request that was sent
|
||||
* @param ResponseInterface $response Response that was received
|
||||
*/
|
||||
public function extractCookies(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response
|
||||
);
|
||||
|
||||
/**
|
||||
* Sets a cookie in the cookie jar.
|
||||
*
|
||||
* @param SetCookie $cookie Cookie to set.
|
||||
*
|
||||
* @return bool Returns true on success or false on failure
|
||||
*/
|
||||
public function setCookie(SetCookie $cookie);
|
||||
|
||||
/**
|
||||
* Remove cookies currently held in the cookie jar.
|
||||
*
|
||||
* Invoking this method without arguments will empty the whole cookie jar.
|
||||
* If given a $domain argument only cookies belonging to that domain will
|
||||
* be removed. If given a $domain and $path argument, cookies belonging to
|
||||
* the specified path within that domain are removed. If given all three
|
||||
* arguments, then the cookie with the specified name, path and domain is
|
||||
* removed.
|
||||
*
|
||||
* @param string $domain Clears cookies matching a domain
|
||||
* @param string $path Clears cookies matching a domain and path
|
||||
* @param string $name Clears cookies matching a domain, path, and name
|
||||
*
|
||||
* @return CookieJarInterface
|
||||
*/
|
||||
public function clear($domain = null, $path = null, $name = null);
|
||||
|
||||
/**
|
||||
* Discard all sessions cookies.
|
||||
*
|
||||
* Removes cookies that don't have an expire field or a have a discard
|
||||
* field set to true. To be called when the user agent shuts down according
|
||||
* to RFC 2965.
|
||||
*/
|
||||
public function clearSessionCookies();
|
||||
}
|
||||
86
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
vendored
Normal file
86
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use GuzzleHttp\Utils;
|
||||
|
||||
/**
|
||||
* Persists non-session cookies using a JSON formatted file
|
||||
*/
|
||||
class FileCookieJar extends CookieJar
|
||||
{
|
||||
/** @var string filename */
|
||||
private $filename;
|
||||
|
||||
/**
|
||||
* Create a new FileCookieJar object
|
||||
*
|
||||
* @param string $cookieFile File to store the cookie data
|
||||
*
|
||||
* @throws \RuntimeException if the file cannot be found or created
|
||||
*/
|
||||
public function __construct($cookieFile)
|
||||
{
|
||||
$this->filename = $cookieFile;
|
||||
|
||||
if (file_exists($cookieFile)) {
|
||||
$this->load($cookieFile);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the file when shutting down
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
$this->save($this->filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the cookies to a file.
|
||||
*
|
||||
* @param string $filename File to save
|
||||
* @throws \RuntimeException if the file cannot be found or created
|
||||
*/
|
||||
public function save($filename)
|
||||
{
|
||||
$json = [];
|
||||
foreach ($this as $cookie) {
|
||||
if ($cookie->getExpires() && !$cookie->getDiscard()) {
|
||||
$json[] = $cookie->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
if (false === file_put_contents($filename, json_encode($json), LOCK_EX)) {
|
||||
// @codeCoverageIgnoreStart
|
||||
throw new \RuntimeException("Unable to save file {$filename}");
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load cookies from a JSON formatted file.
|
||||
*
|
||||
* Old cookies are kept unless overwritten by newly loaded ones.
|
||||
*
|
||||
* @param string $filename Cookie file to load.
|
||||
* @throws \RuntimeException if the file cannot be loaded.
|
||||
*/
|
||||
public function load($filename)
|
||||
{
|
||||
$json = file_get_contents($filename);
|
||||
if (false === $json) {
|
||||
// @codeCoverageIgnoreStart
|
||||
throw new \RuntimeException("Unable to load file {$filename}");
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
$data = Utils::jsonDecode($json, true);
|
||||
if (is_array($data)) {
|
||||
foreach (Utils::jsonDecode($json, true) as $cookie) {
|
||||
$this->setCookie(new SetCookie($cookie));
|
||||
}
|
||||
} elseif (strlen($data)) {
|
||||
throw new \RuntimeException("Invalid cookie file: {$filename}");
|
||||
}
|
||||
}
|
||||
}
|
||||
66
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
vendored
Normal file
66
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use GuzzleHttp\Utils;
|
||||
|
||||
/**
|
||||
* Persists cookies in the client session
|
||||
*/
|
||||
class SessionCookieJar extends CookieJar
|
||||
{
|
||||
/** @var string session key */
|
||||
private $sessionKey;
|
||||
|
||||
/**
|
||||
* Create a new SessionCookieJar object
|
||||
*
|
||||
* @param string $sessionKey Session key name to store the cookie data in session
|
||||
*/
|
||||
public function __construct($sessionKey)
|
||||
{
|
||||
$this->sessionKey = $sessionKey;
|
||||
$this->load();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves cookies to session when shutting down
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save cookies to the client session
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$json = [];
|
||||
foreach ($this as $cookie) {
|
||||
if ($cookie->getExpires() && !$cookie->getDiscard()) {
|
||||
$json[] = $cookie->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION[$this->sessionKey] = json_encode($json);
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the contents of the client session into the data array
|
||||
*/
|
||||
protected function load()
|
||||
{
|
||||
$cookieJar = isset($_SESSION[$this->sessionKey])
|
||||
? $_SESSION[$this->sessionKey]
|
||||
: null;
|
||||
|
||||
$data = Utils::jsonDecode($cookieJar, true);
|
||||
if (is_array($data)) {
|
||||
foreach ($data as $cookie) {
|
||||
$this->setCookie(new SetCookie($cookie));
|
||||
}
|
||||
} elseif (strlen($data)) {
|
||||
throw new \RuntimeException("Invalid cookie data");
|
||||
}
|
||||
}
|
||||
}
|
||||
373
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
vendored
Normal file
373
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php
vendored
Normal file
@@ -0,0 +1,373 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Cookie;
|
||||
|
||||
use GuzzleHttp\ToArrayInterface;
|
||||
|
||||
/**
|
||||
* Set-Cookie object
|
||||
*/
|
||||
class SetCookie implements ToArrayInterface
|
||||
{
|
||||
/** @var array */
|
||||
private static $defaults = [
|
||||
'Name' => null,
|
||||
'Value' => null,
|
||||
'Domain' => null,
|
||||
'Path' => '/',
|
||||
'Max-Age' => null,
|
||||
'Expires' => null,
|
||||
'Secure' => false,
|
||||
'Discard' => false,
|
||||
'HttpOnly' => false
|
||||
];
|
||||
|
||||
/** @var array Cookie data */
|
||||
private $data;
|
||||
|
||||
/**
|
||||
* Create a new SetCookie object from a string
|
||||
*
|
||||
* @param string $cookie Set-Cookie header string
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function fromString($cookie)
|
||||
{
|
||||
// Create the default return array
|
||||
$data = self::$defaults;
|
||||
// Explode the cookie string using a series of semicolons
|
||||
$pieces = array_filter(array_map('trim', explode(';', $cookie)));
|
||||
// The name of the cookie (first kvp) must include an equal sign.
|
||||
if (empty($pieces) || !strpos($pieces[0], '=')) {
|
||||
return new self($data);
|
||||
}
|
||||
|
||||
// Add the cookie pieces into the parsed data array
|
||||
foreach ($pieces as $part) {
|
||||
|
||||
$cookieParts = explode('=', $part, 2);
|
||||
$key = trim($cookieParts[0]);
|
||||
$value = isset($cookieParts[1])
|
||||
? trim($cookieParts[1], " \n\r\t\0\x0B\"")
|
||||
: true;
|
||||
|
||||
// Only check for non-cookies when cookies have been found
|
||||
if (empty($data['Name'])) {
|
||||
$data['Name'] = $key;
|
||||
$data['Value'] = $value;
|
||||
} else {
|
||||
foreach (array_keys(self::$defaults) as $search) {
|
||||
if (!strcasecmp($search, $key)) {
|
||||
$data[$search] = $value;
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
$data[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return new self($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data Array of cookie data provided by a Cookie parser
|
||||
*/
|
||||
public function __construct(array $data = [])
|
||||
{
|
||||
$this->data = array_replace(self::$defaults, $data);
|
||||
// Extract the Expires value and turn it into a UNIX timestamp if needed
|
||||
if (!$this->getExpires() && $this->getMaxAge()) {
|
||||
// Calculate the Expires date
|
||||
$this->setExpires(time() + $this->getMaxAge());
|
||||
} elseif ($this->getExpires() && !is_numeric($this->getExpires())) {
|
||||
$this->setExpires($this->getExpires());
|
||||
}
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
$str = $this->data['Name'] . '=' . $this->data['Value'] . '; ';
|
||||
foreach ($this->data as $k => $v) {
|
||||
if ($k != 'Name' && $k != 'Value' && $v !== null && $v !== false) {
|
||||
if ($k == 'Expires') {
|
||||
$str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; ';
|
||||
} else {
|
||||
$str .= ($v === true ? $k : "{$k}={$v}") . '; ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rtrim($str, '; ');
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cookie name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->data['Name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cookie name
|
||||
*
|
||||
* @param string $name Cookie name
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
$this->data['Name'] = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cookie value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->data['Value'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the cookie value
|
||||
*
|
||||
* @param string $value Cookie value
|
||||
*/
|
||||
public function setValue($value)
|
||||
{
|
||||
$this->data['Value'] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the domain
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getDomain()
|
||||
{
|
||||
return $this->data['Domain'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the domain of the cookie
|
||||
*
|
||||
* @param string $domain
|
||||
*/
|
||||
public function setDomain($domain)
|
||||
{
|
||||
$this->data['Domain'] = $domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath()
|
||||
{
|
||||
return $this->data['Path'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the path of the cookie
|
||||
*
|
||||
* @param string $path Path of the cookie
|
||||
*/
|
||||
public function setPath($path)
|
||||
{
|
||||
$this->data['Path'] = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Maximum lifetime of the cookie in seconds
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getMaxAge()
|
||||
{
|
||||
return $this->data['Max-Age'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the max-age of the cookie
|
||||
*
|
||||
* @param int $maxAge Max age of the cookie in seconds
|
||||
*/
|
||||
public function setMaxAge($maxAge)
|
||||
{
|
||||
$this->data['Max-Age'] = $maxAge;
|
||||
}
|
||||
|
||||
/**
|
||||
* The UNIX timestamp when the cookie Expires
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getExpires()
|
||||
{
|
||||
return $this->data['Expires'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the unix timestamp for which the cookie will expire
|
||||
*
|
||||
* @param int $timestamp Unix timestamp
|
||||
*/
|
||||
public function setExpires($timestamp)
|
||||
{
|
||||
$this->data['Expires'] = is_numeric($timestamp)
|
||||
? (int) $timestamp
|
||||
: strtotime($timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not this is a secure cookie
|
||||
*
|
||||
* @return null|bool
|
||||
*/
|
||||
public function getSecure()
|
||||
{
|
||||
return $this->data['Secure'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not the cookie is secure
|
||||
*
|
||||
* @param bool $secure Set to true or false if secure
|
||||
*/
|
||||
public function setSecure($secure)
|
||||
{
|
||||
$this->data['Secure'] = $secure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not this is a session cookie
|
||||
*
|
||||
* @return null|bool
|
||||
*/
|
||||
public function getDiscard()
|
||||
{
|
||||
return $this->data['Discard'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not this is a session cookie
|
||||
*
|
||||
* @param bool $discard Set to true or false if this is a session cookie
|
||||
*/
|
||||
public function setDiscard($discard)
|
||||
{
|
||||
$this->data['Discard'] = $discard;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether or not this is an HTTP only cookie
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getHttpOnly()
|
||||
{
|
||||
return $this->data['HttpOnly'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether or not this is an HTTP only cookie
|
||||
*
|
||||
* @param bool $httpOnly Set to true or false if this is HTTP only
|
||||
*/
|
||||
public function setHttpOnly($httpOnly)
|
||||
{
|
||||
$this->data['HttpOnly'] = $httpOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie matches a path value
|
||||
*
|
||||
* @param string $path Path to check against
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matchesPath($path)
|
||||
{
|
||||
return !$this->getPath() || 0 === stripos($path, $this->getPath());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie matches a domain value
|
||||
*
|
||||
* @param string $domain Domain to check against
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function matchesDomain($domain)
|
||||
{
|
||||
// Remove the leading '.' as per spec in RFC 6265.
|
||||
// http://tools.ietf.org/html/rfc6265#section-5.2.3
|
||||
$cookieDomain = ltrim($this->getDomain(), '.');
|
||||
|
||||
// Domain not set or exact match.
|
||||
if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Matching the subdomain according to RFC 6265.
|
||||
// http://tools.ietf.org/html/rfc6265#section-5.1.3
|
||||
if (filter_var($domain, FILTER_VALIDATE_IP)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool) preg_match('/\.' . preg_quote($cookieDomain) . '$/i', $domain);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie is expired
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isExpired()
|
||||
{
|
||||
return $this->getExpires() !== null && time() > $this->getExpires();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the cookie is valid according to RFC 6265
|
||||
*
|
||||
* @return bool|string Returns true if valid or an error message if invalid
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
// Names must not be empty, but can be 0
|
||||
$name = $this->getName();
|
||||
if (empty($name) && !is_numeric($name)) {
|
||||
return 'The cookie name must not be empty';
|
||||
}
|
||||
|
||||
// Check if any of the invalid characters are present in the cookie name
|
||||
if (preg_match("/[=,; \t\r\n\013\014]/", $name)) {
|
||||
return "Cookie name must not cannot invalid characters: =,; \\t\\r\\n\\013\\014";
|
||||
}
|
||||
|
||||
// Value must not be empty, but can be 0
|
||||
$value = $this->getValue();
|
||||
if (empty($value) && !is_numeric($value)) {
|
||||
return 'The cookie value must not be empty';
|
||||
}
|
||||
|
||||
// Domains must not be empty, but can be 0
|
||||
// A "0" is not a valid internet domain, but may be used as server name
|
||||
// in a private network.
|
||||
$domain = $this->getDomain();
|
||||
if (empty($domain) && !is_numeric($domain)) {
|
||||
return 'The cookie domain must not be empty';
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Cookie/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;
|
||||
20
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractEvent.php
vendored
Normal file
20
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractEvent.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Basic event class that can be extended.
|
||||
*/
|
||||
abstract class AbstractEvent implements EventInterface
|
||||
{
|
||||
private $propagationStopped = false;
|
||||
|
||||
public function isPropagationStopped()
|
||||
{
|
||||
return $this->propagationStopped;
|
||||
}
|
||||
|
||||
public function stopPropagation()
|
||||
{
|
||||
$this->propagationStopped = true;
|
||||
}
|
||||
}
|
||||
61
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php
vendored
Normal file
61
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
use GuzzleHttp\Transaction;
|
||||
use GuzzleHttp\ClientInterface;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
|
||||
/**
|
||||
* Base class for request events, providing a request and client getter.
|
||||
*/
|
||||
abstract class AbstractRequestEvent extends AbstractEvent
|
||||
{
|
||||
/** @var Transaction */
|
||||
protected $transaction;
|
||||
|
||||
/**
|
||||
* @param Transaction $transaction
|
||||
*/
|
||||
public function __construct(Transaction $transaction)
|
||||
{
|
||||
$this->transaction = $transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the HTTP client associated with the event.
|
||||
*
|
||||
* @return ClientInterface
|
||||
*/
|
||||
public function getClient()
|
||||
{
|
||||
return $this->transaction->client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request object
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function getRequest()
|
||||
{
|
||||
return $this->transaction->request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of transaction retries.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getRetryCount()
|
||||
{
|
||||
return $this->transaction->retries;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Transaction
|
||||
*/
|
||||
public function getTransaction()
|
||||
{
|
||||
return $this->transaction;
|
||||
}
|
||||
}
|
||||
40
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php
vendored
Normal file
40
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Abstract request event that can be retried.
|
||||
*/
|
||||
class AbstractRetryableEvent extends AbstractTransferEvent
|
||||
{
|
||||
/**
|
||||
* Mark the request as needing a retry and stop event propagation.
|
||||
*
|
||||
* This action allows you to retry a request without emitting the "end"
|
||||
* event multiple times for a given request. When retried, the request
|
||||
* emits a before event and is then sent again using the client that sent
|
||||
* the original request.
|
||||
*
|
||||
* When retrying, it is important to limit the number of retries you allow
|
||||
* to prevent infinite loops.
|
||||
*
|
||||
* This action can only be taken during the "complete" and "error" events.
|
||||
*
|
||||
* @param int $afterDelay If specified, the amount of time in milliseconds
|
||||
* to delay before retrying. Note that this must
|
||||
* be supported by the underlying RingPHP handler
|
||||
* to work properly. Set to 0 or provide no value
|
||||
* to retry immediately.
|
||||
*/
|
||||
public function retry($afterDelay = 0)
|
||||
{
|
||||
// Setting the transition state to 'retry' will cause the next state
|
||||
// transition of the transaction to retry the request.
|
||||
$this->transaction->state = 'retry';
|
||||
|
||||
if ($afterDelay) {
|
||||
$this->transaction->request->getConfig()->set('delay', $afterDelay);
|
||||
}
|
||||
|
||||
$this->stopPropagation();
|
||||
}
|
||||
}
|
||||
63
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
vendored
Normal file
63
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\Ring\Future\FutureInterface;
|
||||
|
||||
/**
|
||||
* Event that contains transfer statistics, and can be intercepted.
|
||||
*/
|
||||
abstract class AbstractTransferEvent extends AbstractRequestEvent
|
||||
{
|
||||
/**
|
||||
* Get all transfer information as an associative array if no $name
|
||||
* argument is supplied, or gets a specific transfer statistic if
|
||||
* a $name attribute is supplied (e.g., 'total_time').
|
||||
*
|
||||
* @param string $name Name of the transfer stat to retrieve
|
||||
*
|
||||
* @return mixed|null|array
|
||||
*/
|
||||
public function getTransferInfo($name = null)
|
||||
{
|
||||
if (!$name) {
|
||||
return $this->transaction->transferInfo;
|
||||
}
|
||||
|
||||
return isset($this->transaction->transferInfo[$name])
|
||||
? $this->transaction->transferInfo[$name]
|
||||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true/false if a response is available.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasResponse()
|
||||
{
|
||||
return !($this->transaction->response instanceof FutureInterface);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the response.
|
||||
*
|
||||
* @return ResponseInterface|null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->hasResponse() ? $this->transaction->response : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intercept the request and associate a response
|
||||
*
|
||||
* @param ResponseInterface $response Response to set
|
||||
*/
|
||||
public function intercept(ResponseInterface $response)
|
||||
{
|
||||
$this->transaction->response = $response;
|
||||
$this->transaction->exception = null;
|
||||
$this->stopPropagation();
|
||||
}
|
||||
}
|
||||
26
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/BeforeEvent.php
vendored
Normal file
26
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/BeforeEvent.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Event object emitted before a request is sent.
|
||||
*
|
||||
* This event MAY be emitted multiple times (i.e., if a request is retried).
|
||||
* You MAY change the Response associated with the request using the
|
||||
* intercept() method of the event.
|
||||
*/
|
||||
class BeforeEvent extends AbstractRequestEvent
|
||||
{
|
||||
/**
|
||||
* Intercept the request and associate a response
|
||||
*
|
||||
* @param ResponseInterface $response Response to set
|
||||
*/
|
||||
public function intercept(ResponseInterface $response)
|
||||
{
|
||||
$this->transaction->response = $response;
|
||||
$this->transaction->exception = null;
|
||||
$this->stopPropagation();
|
||||
}
|
||||
}
|
||||
14
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/CompleteEvent.php
vendored
Normal file
14
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/CompleteEvent.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Event object emitted after a request has been completed.
|
||||
*
|
||||
* This event MAY be emitted multiple times for a single request. You MAY
|
||||
* change the Response associated with the request using the intercept()
|
||||
* method of the event.
|
||||
*
|
||||
* This event allows the request to be retried if necessary using the retry()
|
||||
* method of the event.
|
||||
*/
|
||||
class CompleteEvent extends AbstractRetryableEvent {}
|
||||
145
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/Emitter.php
vendored
Normal file
145
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/Emitter.php
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Guzzle event emitter.
|
||||
*
|
||||
* Some of this class is based on the Symfony EventDispatcher component, which
|
||||
* ships with the following license:
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @link https://github.com/symfony/symfony/tree/master/src/Symfony/Component/EventDispatcher
|
||||
*/
|
||||
class Emitter implements EmitterInterface
|
||||
{
|
||||
/** @var array */
|
||||
private $listeners = [];
|
||||
|
||||
/** @var array */
|
||||
private $sorted = [];
|
||||
|
||||
public function on($eventName, callable $listener, $priority = 0)
|
||||
{
|
||||
if ($priority === 'first') {
|
||||
$priority = isset($this->listeners[$eventName])
|
||||
? max(array_keys($this->listeners[$eventName])) + 1
|
||||
: 1;
|
||||
} elseif ($priority === 'last') {
|
||||
$priority = isset($this->listeners[$eventName])
|
||||
? min(array_keys($this->listeners[$eventName])) - 1
|
||||
: -1;
|
||||
}
|
||||
|
||||
$this->listeners[$eventName][$priority][] = $listener;
|
||||
unset($this->sorted[$eventName]);
|
||||
}
|
||||
|
||||
public function once($eventName, callable $listener, $priority = 0)
|
||||
{
|
||||
$onceListener = function (
|
||||
EventInterface $event
|
||||
) use (&$onceListener, $eventName, $listener, $priority) {
|
||||
$this->removeListener($eventName, $onceListener);
|
||||
$listener($event, $eventName);
|
||||
};
|
||||
|
||||
$this->on($eventName, $onceListener, $priority);
|
||||
}
|
||||
|
||||
public function removeListener($eventName, callable $listener)
|
||||
{
|
||||
if (empty($this->listeners[$eventName])) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->listeners[$eventName] as $priority => $listeners) {
|
||||
if (false !== ($key = array_search($listener, $listeners, true))) {
|
||||
unset(
|
||||
$this->listeners[$eventName][$priority][$key],
|
||||
$this->sorted[$eventName]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function listeners($eventName = null)
|
||||
{
|
||||
// Return all events in a sorted priority order
|
||||
if ($eventName === null) {
|
||||
foreach (array_keys($this->listeners) as $eventName) {
|
||||
if (empty($this->sorted[$eventName])) {
|
||||
$this->listeners($eventName);
|
||||
}
|
||||
}
|
||||
return $this->sorted;
|
||||
}
|
||||
|
||||
// Return the listeners for a specific event, sorted in priority order
|
||||
if (empty($this->sorted[$eventName])) {
|
||||
$this->sorted[$eventName] = [];
|
||||
if (isset($this->listeners[$eventName])) {
|
||||
krsort($this->listeners[$eventName], SORT_NUMERIC);
|
||||
foreach ($this->listeners[$eventName] as $listeners) {
|
||||
foreach ($listeners as $listener) {
|
||||
$this->sorted[$eventName][] = $listener;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->sorted[$eventName];
|
||||
}
|
||||
|
||||
public function hasListeners($eventName)
|
||||
{
|
||||
return !empty($this->listeners[$eventName]);
|
||||
}
|
||||
|
||||
public function emit($eventName, EventInterface $event)
|
||||
{
|
||||
if (isset($this->listeners[$eventName])) {
|
||||
foreach ($this->listeners($eventName) as $listener) {
|
||||
$listener($event, $eventName);
|
||||
if ($event->isPropagationStopped()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $event;
|
||||
}
|
||||
|
||||
public function attach(SubscriberInterface $subscriber)
|
||||
{
|
||||
foreach ($subscriber->getEvents() as $eventName => $listeners) {
|
||||
if (is_array($listeners[0])) {
|
||||
foreach ($listeners as $listener) {
|
||||
$this->on(
|
||||
$eventName,
|
||||
[$subscriber, $listener[0]],
|
||||
isset($listener[1]) ? $listener[1] : 0
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$this->on(
|
||||
$eventName,
|
||||
[$subscriber, $listeners[0]],
|
||||
isset($listeners[1]) ? $listeners[1] : 0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function detach(SubscriberInterface $subscriber)
|
||||
{
|
||||
foreach ($subscriber->getEvents() as $eventName => $listener) {
|
||||
$this->removeListener($eventName, [$subscriber, $listener[0]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
96
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/EmitterInterface.php
vendored
Normal file
96
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/EmitterInterface.php
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Guzzle event emitter.
|
||||
*/
|
||||
interface EmitterInterface
|
||||
{
|
||||
/**
|
||||
* Binds a listener to a specific event.
|
||||
*
|
||||
* @param string $eventName Name of the event to bind to.
|
||||
* @param callable $listener Listener to invoke when triggered.
|
||||
* @param int|string $priority The higher this value, the earlier an event
|
||||
* listener will be triggered in the chain (defaults to 0). You can
|
||||
* pass "first" or "last" to dynamically specify the event priority
|
||||
* based on the current event priorities associated with the given
|
||||
* event name in the emitter. Use "first" to set the priority to the
|
||||
* current highest priority plus one. Use "last" to set the priority to
|
||||
* the current lowest event priority minus one.
|
||||
*/
|
||||
public function on($eventName, callable $listener, $priority = 0);
|
||||
|
||||
/**
|
||||
* Binds a listener to a specific event. After the listener is triggered
|
||||
* once, it is removed as a listener.
|
||||
*
|
||||
* @param string $eventName Name of the event to bind to.
|
||||
* @param callable $listener Listener to invoke when triggered.
|
||||
* @param int $priority The higher this value, the earlier an event
|
||||
* listener will be triggered in the chain (defaults to 0)
|
||||
*/
|
||||
public function once($eventName, callable $listener, $priority = 0);
|
||||
|
||||
/**
|
||||
* Removes an event listener from the specified event.
|
||||
*
|
||||
* @param string $eventName The event to remove a listener from
|
||||
* @param callable $listener The listener to remove
|
||||
*/
|
||||
public function removeListener($eventName, callable $listener);
|
||||
|
||||
/**
|
||||
* Gets the listeners of a specific event or all listeners if no event is
|
||||
* specified.
|
||||
*
|
||||
* @param string $eventName The name of the event. Pass null (the default)
|
||||
* to retrieve all listeners.
|
||||
*
|
||||
* @return array The event listeners for the specified event, or all event
|
||||
* listeners by event name. The format of the array when retrieving a
|
||||
* specific event list is an array of callables. The format of the array
|
||||
* when retrieving all listeners is an associative array of arrays of
|
||||
* callables.
|
||||
*/
|
||||
public function listeners($eventName = null);
|
||||
|
||||
/**
|
||||
* Checks if the emitter has listeners by the given name.
|
||||
*
|
||||
* @param string $eventName The name of the event to check.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasListeners($eventName);
|
||||
|
||||
/**
|
||||
* Emits an event to all registered listeners.
|
||||
*
|
||||
* Each event that is bound to the emitted eventName receives a
|
||||
* EventInterface, the name of the event, and the event emitter.
|
||||
*
|
||||
* @param string $eventName The name of the event to dispatch.
|
||||
* @param EventInterface $event The event to pass to the event handlers/listeners.
|
||||
*
|
||||
* @return EventInterface Returns the provided event object
|
||||
*/
|
||||
public function emit($eventName, EventInterface $event);
|
||||
|
||||
/**
|
||||
* Attaches an event subscriber.
|
||||
*
|
||||
* The subscriber is asked for all the events it is interested in and added
|
||||
* as an event listener for each event.
|
||||
*
|
||||
* @param SubscriberInterface $subscriber Subscriber to attach.
|
||||
*/
|
||||
public function attach(SubscriberInterface $subscriber);
|
||||
|
||||
/**
|
||||
* Detaches an event subscriber.
|
||||
*
|
||||
* @param SubscriberInterface $subscriber Subscriber to detach.
|
||||
*/
|
||||
public function detach(SubscriberInterface $subscriber);
|
||||
}
|
||||
28
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/EndEvent.php
vendored
Normal file
28
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/EndEvent.php
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* A terminal event that is emitted when a request transaction has ended.
|
||||
*
|
||||
* This event is emitted for both successful responses and responses that
|
||||
* encountered an exception. You need to check if an exception is present
|
||||
* in your listener to know the difference.
|
||||
*
|
||||
* You MAY intercept the response associated with the event if needed, but keep
|
||||
* in mind that the "complete" event will not be triggered as a result.
|
||||
*/
|
||||
class EndEvent extends AbstractTransferEvent
|
||||
{
|
||||
/**
|
||||
* Get the exception that was encountered (if any).
|
||||
*
|
||||
* This method should be used to check if the request was sent successfully
|
||||
* or if it encountered errors.
|
||||
*
|
||||
* @return \Exception|null
|
||||
*/
|
||||
public function getException()
|
||||
{
|
||||
return $this->transaction->exception;
|
||||
}
|
||||
}
|
||||
27
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/ErrorEvent.php
vendored
Normal file
27
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/ErrorEvent.php
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
|
||||
/**
|
||||
* Event emitted when an error occurs while sending a request.
|
||||
*
|
||||
* This event MAY be emitted multiple times. You MAY intercept the exception
|
||||
* and inject a response into the event to rescue the request using the
|
||||
* intercept() method of the event.
|
||||
*
|
||||
* This event allows the request to be retried using the "retry" method of the
|
||||
* event.
|
||||
*/
|
||||
class ErrorEvent extends AbstractRetryableEvent
|
||||
{
|
||||
/**
|
||||
* Get the exception that was encountered
|
||||
*
|
||||
* @return RequestException
|
||||
*/
|
||||
public function getException()
|
||||
{
|
||||
return $this->transaction->exception;
|
||||
}
|
||||
}
|
||||
23
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/EventInterface.php
vendored
Normal file
23
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/EventInterface.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Base event interface used when dispatching events to listeners using an
|
||||
* event emitter.
|
||||
*/
|
||||
interface EventInterface
|
||||
{
|
||||
/**
|
||||
* Returns whether or not stopPropagation was called on the event.
|
||||
*
|
||||
* @return bool
|
||||
* @see Event::stopPropagation
|
||||
*/
|
||||
public function isPropagationStopped();
|
||||
|
||||
/**
|
||||
* Stops the propagation of the event, preventing subsequent listeners
|
||||
* registered to the same event from being invoked.
|
||||
*/
|
||||
public function stopPropagation();
|
||||
}
|
||||
15
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/HasEmitterInterface.php
vendored
Normal file
15
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/HasEmitterInterface.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Holds an event emitter
|
||||
*/
|
||||
interface HasEmitterInterface
|
||||
{
|
||||
/**
|
||||
* Get the event emitter of the object
|
||||
*
|
||||
* @return EmitterInterface
|
||||
*/
|
||||
public function getEmitter();
|
||||
}
|
||||
20
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/HasEmitterTrait.php
vendored
Normal file
20
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/HasEmitterTrait.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Trait that implements the methods of HasEmitterInterface
|
||||
*/
|
||||
trait HasEmitterTrait
|
||||
{
|
||||
/** @var EmitterInterface */
|
||||
private $emitter;
|
||||
|
||||
public function getEmitter()
|
||||
{
|
||||
if (!$this->emitter) {
|
||||
$this->emitter = new Emitter();
|
||||
}
|
||||
|
||||
return $this->emitter;
|
||||
}
|
||||
}
|
||||
88
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php
vendored
Normal file
88
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/ListenerAttacherTrait.php
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Trait that provides methods for extract event listeners specified in an array
|
||||
* and attaching them to an emitter owned by the object or one of its direct
|
||||
* dependencies.
|
||||
*/
|
||||
trait ListenerAttacherTrait
|
||||
{
|
||||
/**
|
||||
* Attaches event listeners and properly sets their priorities and whether
|
||||
* or not they are are only executed once.
|
||||
*
|
||||
* @param HasEmitterInterface $object Object that has the event emitter.
|
||||
* @param array $listeners Array of hashes representing event
|
||||
* event listeners. Each item contains
|
||||
* "name", "fn", "priority", & "once".
|
||||
*/
|
||||
private function attachListeners(HasEmitterInterface $object, array $listeners)
|
||||
{
|
||||
$emitter = $object->getEmitter();
|
||||
foreach ($listeners as $el) {
|
||||
if ($el['once']) {
|
||||
$emitter->once($el['name'], $el['fn'], $el['priority']);
|
||||
} else {
|
||||
$emitter->on($el['name'], $el['fn'], $el['priority']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the allowed events from the provided array, and ignores anything
|
||||
* else in the array. The event listener must be specified as a callable or
|
||||
* as an array of event listener data ("name", "fn", "priority", "once").
|
||||
*
|
||||
* @param array $source Array containing callables or hashes of data to be
|
||||
* prepared as event listeners.
|
||||
* @param array $events Names of events to look for in the provided $source
|
||||
* array. Other keys are ignored.
|
||||
* @return array
|
||||
*/
|
||||
private function prepareListeners(array $source, array $events)
|
||||
{
|
||||
$listeners = [];
|
||||
foreach ($events as $name) {
|
||||
if (isset($source[$name])) {
|
||||
$this->buildListener($name, $source[$name], $listeners);
|
||||
}
|
||||
}
|
||||
|
||||
return $listeners;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a complete event listener definition from the provided array of
|
||||
* listener data. Also works recursively if more than one listeners are
|
||||
* contained in the provided array.
|
||||
*
|
||||
* @param string $name Name of the event the listener is for.
|
||||
* @param array|callable $data Event listener data to prepare.
|
||||
* @param array $listeners Array of listeners, passed by reference.
|
||||
*
|
||||
* @throws \InvalidArgumentException if the event data is malformed.
|
||||
*/
|
||||
private function buildListener($name, $data, &$listeners)
|
||||
{
|
||||
static $defaults = ['priority' => 0, 'once' => false];
|
||||
|
||||
// If a callable is provided, normalize it to the array format.
|
||||
if (is_callable($data)) {
|
||||
$data = ['fn' => $data];
|
||||
}
|
||||
|
||||
// Prepare the listener and add it to the array, recursively.
|
||||
if (isset($data['fn'])) {
|
||||
$data['name'] = $name;
|
||||
$listeners[] = $data + $defaults;
|
||||
} elseif (is_array($data)) {
|
||||
foreach ($data as $listenerData) {
|
||||
$this->buildListener($name, $listenerData, $listeners);
|
||||
}
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Each event listener must be a '
|
||||
. 'callable or an associative array containing a "fn" key.');
|
||||
}
|
||||
}
|
||||
}
|
||||
51
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/ProgressEvent.php
vendored
Normal file
51
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/ProgressEvent.php
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
use GuzzleHttp\Transaction;
|
||||
|
||||
/**
|
||||
* Event object emitted when upload or download progress is made.
|
||||
*
|
||||
* You can access the progress values using their corresponding public
|
||||
* properties:
|
||||
*
|
||||
* - $downloadSize: The number of bytes that will be downloaded (if known)
|
||||
* - $downloaded: The number of bytes that have been downloaded
|
||||
* - $uploadSize: The number of bytes that will be uploaded (if known)
|
||||
* - $uploaded: The number of bytes that have been uploaded
|
||||
*/
|
||||
class ProgressEvent extends AbstractRequestEvent
|
||||
{
|
||||
/** @var int Amount of data to be downloaded */
|
||||
public $downloadSize;
|
||||
|
||||
/** @var int Amount of data that has been downloaded */
|
||||
public $downloaded;
|
||||
|
||||
/** @var int Amount of data to upload */
|
||||
public $uploadSize;
|
||||
|
||||
/** @var int Amount of data that has been uploaded */
|
||||
public $uploaded;
|
||||
|
||||
/**
|
||||
* @param Transaction $transaction Transaction being sent.
|
||||
* @param int $downloadSize Amount of data to download (if known)
|
||||
* @param int $downloaded Amount of data that has been downloaded
|
||||
* @param int $uploadSize Amount of data to upload (if known)
|
||||
* @param int $uploaded Amount of data that had been uploaded
|
||||
*/
|
||||
public function __construct(
|
||||
Transaction $transaction,
|
||||
$downloadSize,
|
||||
$downloaded,
|
||||
$uploadSize,
|
||||
$uploaded
|
||||
) {
|
||||
parent::__construct($transaction);
|
||||
$this->downloadSize = $downloadSize;
|
||||
$this->downloaded = $downloaded;
|
||||
$this->uploadSize = $uploadSize;
|
||||
$this->uploaded = $uploaded;
|
||||
}
|
||||
}
|
||||
56
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php
vendored
Normal file
56
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* Contains methods used to manage the request event lifecycle.
|
||||
*/
|
||||
final class RequestEvents
|
||||
{
|
||||
// Generic event priorities
|
||||
const EARLY = 10000;
|
||||
const LATE = -10000;
|
||||
|
||||
// "before" priorities
|
||||
const PREPARE_REQUEST = -100;
|
||||
const SIGN_REQUEST = -10000;
|
||||
|
||||
// "complete" and "error" response priorities
|
||||
const VERIFY_RESPONSE = 100;
|
||||
const REDIRECT_RESPONSE = 200;
|
||||
|
||||
/**
|
||||
* Converts an array of event options into a formatted array of valid event
|
||||
* configuration.
|
||||
*
|
||||
* @param array $options Event array to convert
|
||||
* @param array $events Event names to convert in the options array.
|
||||
* @param mixed $handler Event handler to utilize
|
||||
*
|
||||
* @return array
|
||||
* @throws \InvalidArgumentException if the event config is invalid
|
||||
* @internal
|
||||
*/
|
||||
public static function convertEventArray(
|
||||
array $options,
|
||||
array $events,
|
||||
$handler
|
||||
) {
|
||||
foreach ($events as $name) {
|
||||
if (!isset($options[$name])) {
|
||||
$options[$name] = [$handler];
|
||||
} elseif (is_callable($options[$name])) {
|
||||
$options[$name] = [$options[$name], $handler];
|
||||
} elseif (is_array($options[$name])) {
|
||||
if (isset($options[$name]['fn'])) {
|
||||
$options[$name] = [$options[$name], $handler];
|
||||
} else {
|
||||
$options[$name][] = $handler;
|
||||
}
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Invalid event format');
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
34
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/SubscriberInterface.php
vendored
Normal file
34
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/SubscriberInterface.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Event;
|
||||
|
||||
/**
|
||||
* SubscriberInterface provides an array of events to an
|
||||
* EventEmitterInterface when it is registered. The emitter then binds the
|
||||
* listeners specified by the EventSubscriber.
|
||||
*
|
||||
* This interface is based on the SubscriberInterface of the Symfony.
|
||||
* @link https://github.com/symfony/symfony/tree/master/src/Symfony/Component/EventDispatcher
|
||||
*/
|
||||
interface SubscriberInterface
|
||||
{
|
||||
/**
|
||||
* Returns an array of event names this subscriber wants to listen to.
|
||||
*
|
||||
* The returned array keys MUST map to an event name. Each array value
|
||||
* MUST be an array in which the first element is the name of a function
|
||||
* on the EventSubscriber OR an array of arrays in the aforementioned
|
||||
* format. The second element in the array is optional, and if specified,
|
||||
* designates the event priority.
|
||||
*
|
||||
* For example, the following are all valid:
|
||||
*
|
||||
* - ['eventName' => ['methodName']]
|
||||
* - ['eventName' => ['methodName', $priority]]
|
||||
* - ['eventName' => [['methodName'], ['otherMethod']]
|
||||
* - ['eventName' => [['methodName'], ['otherMethod', $priority]]
|
||||
* - ['eventName' => [['methodName', $priority], ['otherMethod', $priority]]
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getEvents();
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Event/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;
|
||||
7
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
vendored
Normal file
7
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* Exception when an HTTP error occurs (4xx or 5xx error)
|
||||
*/
|
||||
class BadResponseException extends RequestException {}
|
||||
7
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php
vendored
Normal file
7
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* Exception when a client error is encountered (4xx codes)
|
||||
*/
|
||||
class ClientException extends BadResponseException {}
|
||||
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
vendored
Normal file
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class ConnectException extends RequestException {}
|
||||
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/CouldNotRewindStreamException.php
vendored
Normal file
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/CouldNotRewindStreamException.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class CouldNotRewindStreamException extends RequestException {}
|
||||
31
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ParseException.php
vendored
Normal file
31
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ParseException.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Exception when a client is unable to parse the response body as XML or JSON
|
||||
*/
|
||||
class ParseException extends TransferException
|
||||
{
|
||||
/** @var ResponseInterface */
|
||||
private $response;
|
||||
|
||||
public function __construct(
|
||||
$message = '',
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
parent::__construct($message, 0, $previous);
|
||||
$this->response = $response;
|
||||
}
|
||||
/**
|
||||
* Get the associated response
|
||||
*
|
||||
* @return ResponseInterface|null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
}
|
||||
121
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
vendored
Normal file
121
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\Ring\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\ConnectException as HttpConnectException;
|
||||
use GuzzleHttp\Ring\Future\FutureInterface;
|
||||
|
||||
/**
|
||||
* HTTP Request exception
|
||||
*/
|
||||
class RequestException extends TransferException
|
||||
{
|
||||
/** @var RequestInterface */
|
||||
private $request;
|
||||
|
||||
/** @var ResponseInterface */
|
||||
private $response;
|
||||
|
||||
public function __construct(
|
||||
$message,
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
// Set the code of the exception if the response is set and not future.
|
||||
$code = $response && !($response instanceof FutureInterface)
|
||||
? $response->getStatusCode()
|
||||
: 0;
|
||||
parent::__construct($message, $code, $previous);
|
||||
$this->request = $request;
|
||||
$this->response = $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap non-RequestExceptions with a RequestException
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param \Exception $e
|
||||
*
|
||||
* @return RequestException
|
||||
*/
|
||||
public static function wrapException(RequestInterface $request, \Exception $e)
|
||||
{
|
||||
if ($e instanceof RequestException) {
|
||||
return $e;
|
||||
} elseif ($e instanceof ConnectException) {
|
||||
return new HttpConnectException($e->getMessage(), $request, null, $e);
|
||||
} else {
|
||||
return new RequestException($e->getMessage(), $request, null, $e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to create a new exception with a normalized error message
|
||||
*
|
||||
* @param RequestInterface $request Request
|
||||
* @param ResponseInterface $response Response received
|
||||
* @param \Exception $previous Previous exception
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function create(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null
|
||||
) {
|
||||
if (!$response) {
|
||||
return new self('Error completing request', $request, null, $previous);
|
||||
}
|
||||
|
||||
$level = floor($response->getStatusCode() / 100);
|
||||
if ($level == '4') {
|
||||
$label = 'Client error response';
|
||||
$className = __NAMESPACE__ . '\\ClientException';
|
||||
} elseif ($level == '5') {
|
||||
$label = 'Server error response';
|
||||
$className = __NAMESPACE__ . '\\ServerException';
|
||||
} else {
|
||||
$label = 'Unsuccessful response';
|
||||
$className = __CLASS__;
|
||||
}
|
||||
|
||||
$message = $label . ' [url] ' . $request->getUrl()
|
||||
. ' [status code] ' . $response->getStatusCode()
|
||||
. ' [reason phrase] ' . $response->getReasonPhrase();
|
||||
|
||||
return new $className($message, $request, $response, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request that caused the exception
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function getRequest()
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the associated response
|
||||
*
|
||||
* @return ResponseInterface|null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a response was received
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasResponse()
|
||||
{
|
||||
return $this->response !== null;
|
||||
}
|
||||
}
|
||||
7
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
vendored
Normal file
7
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
/**
|
||||
* Exception when a server error is encountered (5xx codes)
|
||||
*/
|
||||
class ServerException extends BadResponseException {}
|
||||
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/StateException.php
vendored
Normal file
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/StateException.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class StateException extends TransferException {};
|
||||
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
vendored
Normal file
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TooManyRedirectsException extends RequestException {}
|
||||
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php
vendored
Normal file
4
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
class TransferException extends \RuntimeException {}
|
||||
34
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/XmlParseException.php
vendored
Normal file
34
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/XmlParseException.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Exception;
|
||||
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Exception when a client is unable to parse the response body as XML
|
||||
*/
|
||||
class XmlParseException extends ParseException
|
||||
{
|
||||
/** @var \LibXMLError */
|
||||
protected $error;
|
||||
|
||||
public function __construct(
|
||||
$message = '',
|
||||
ResponseInterface $response = null,
|
||||
\Exception $previous = null,
|
||||
\LibXMLError $error = null
|
||||
) {
|
||||
parent::__construct($message, $response, $previous);
|
||||
$this->error = $error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the associated error
|
||||
*
|
||||
* @return \LibXMLError|null
|
||||
*/
|
||||
public function getError()
|
||||
{
|
||||
return $this->error;
|
||||
}
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Exception/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;
|
||||
75
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/HasDataTrait.php
vendored
Normal file
75
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/HasDataTrait.php
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
/**
|
||||
* Trait implementing ToArrayInterface, \ArrayAccess, \Countable,
|
||||
* \IteratorAggregate, and some path style methods.
|
||||
*/
|
||||
trait HasDataTrait
|
||||
{
|
||||
/** @var array */
|
||||
protected $data = [];
|
||||
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator($this->data);
|
||||
}
|
||||
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return isset($this->data[$offset]) ? $this->data[$offset] : null;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value)
|
||||
{
|
||||
$this->data[$offset] = $value;
|
||||
}
|
||||
|
||||
public function offsetExists($offset)
|
||||
{
|
||||
return isset($this->data[$offset]);
|
||||
}
|
||||
|
||||
public function offsetUnset($offset)
|
||||
{
|
||||
unset($this->data[$offset]);
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a value from the collection using a path syntax to retrieve nested
|
||||
* data.
|
||||
*
|
||||
* @param string $path Path to traverse and retrieve a value from
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
public function getPath($path)
|
||||
{
|
||||
return Utils::getPath($this->data, $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a value into a nested array key. Keys will be created as needed to
|
||||
* set the value.
|
||||
*
|
||||
* @param string $path Path to set
|
||||
* @param mixed $value Value to set at the key
|
||||
*
|
||||
* @throws \RuntimeException when trying to setPath using a nested path
|
||||
* that travels through a scalar value
|
||||
*/
|
||||
public function setPath($path, $value)
|
||||
{
|
||||
Utils::setPath($this->data, $path, $value);
|
||||
}
|
||||
}
|
||||
253
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php
vendored
Normal file
253
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/AbstractMessage.php
vendored
Normal file
@@ -0,0 +1,253 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
abstract class AbstractMessage implements MessageInterface
|
||||
{
|
||||
/** @var array HTTP header collection */
|
||||
private $headers = [];
|
||||
|
||||
/** @var array mapping a lowercase header name to its name over the wire */
|
||||
private $headerNames = [];
|
||||
|
||||
/** @var StreamInterface Message body */
|
||||
private $body;
|
||||
|
||||
/** @var string HTTP protocol version of the message */
|
||||
private $protocolVersion = '1.1';
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return static::getStartLineAndHeaders($this)
|
||||
. "\r\n\r\n" . $this->getBody();
|
||||
}
|
||||
|
||||
public function getProtocolVersion()
|
||||
{
|
||||
return $this->protocolVersion;
|
||||
}
|
||||
|
||||
public function getBody()
|
||||
{
|
||||
return $this->body;
|
||||
}
|
||||
|
||||
public function setBody(StreamInterface $body = null)
|
||||
{
|
||||
if ($body === null) {
|
||||
// Setting a null body will remove the body of the request
|
||||
$this->removeHeader('Content-Length');
|
||||
$this->removeHeader('Transfer-Encoding');
|
||||
}
|
||||
|
||||
$this->body = $body;
|
||||
}
|
||||
|
||||
public function addHeader($header, $value)
|
||||
{
|
||||
if (is_array($value)) {
|
||||
$current = array_merge($this->getHeaderAsArray($header), $value);
|
||||
} else {
|
||||
$current = $this->getHeaderAsArray($header);
|
||||
$current[] = (string) $value;
|
||||
}
|
||||
|
||||
$this->setHeader($header, $current);
|
||||
}
|
||||
|
||||
public function addHeaders(array $headers)
|
||||
{
|
||||
foreach ($headers as $name => $header) {
|
||||
$this->addHeader($name, $header);
|
||||
}
|
||||
}
|
||||
|
||||
public function getHeader($header)
|
||||
{
|
||||
$name = strtolower($header);
|
||||
return isset($this->headers[$name])
|
||||
? implode(', ', $this->headers[$name])
|
||||
: '';
|
||||
}
|
||||
|
||||
public function getHeaderAsArray($header)
|
||||
{
|
||||
$name = strtolower($header);
|
||||
return isset($this->headers[$name]) ? $this->headers[$name] : [];
|
||||
}
|
||||
|
||||
public function getHeaders()
|
||||
{
|
||||
$headers = [];
|
||||
foreach ($this->headers as $name => $values) {
|
||||
$headers[$this->headerNames[$name]] = $values;
|
||||
}
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
public function setHeader($header, $value)
|
||||
{
|
||||
$header = trim($header);
|
||||
$name = strtolower($header);
|
||||
$this->headerNames[$name] = $header;
|
||||
|
||||
if (is_array($value)) {
|
||||
foreach ($value as &$v) {
|
||||
$v = trim($v);
|
||||
}
|
||||
$this->headers[$name] = $value;
|
||||
} else {
|
||||
$this->headers[$name] = [trim($value)];
|
||||
}
|
||||
}
|
||||
|
||||
public function setHeaders(array $headers)
|
||||
{
|
||||
$this->headers = $this->headerNames = [];
|
||||
foreach ($headers as $key => $value) {
|
||||
$this->addHeader($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
public function hasHeader($header)
|
||||
{
|
||||
return isset($this->headers[strtolower($header)]);
|
||||
}
|
||||
|
||||
public function removeHeader($header)
|
||||
{
|
||||
$name = strtolower($header);
|
||||
unset($this->headers[$name], $this->headerNames[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse an array of header values containing ";" separated data into an
|
||||
* array of associative arrays representing the header key value pair
|
||||
* data of the header. When a parameter does not contain a value, but just
|
||||
* contains a key, this function will inject a key with a '' string value.
|
||||
*
|
||||
* @param MessageInterface $message That contains the header
|
||||
* @param string $header Header to retrieve from the message
|
||||
*
|
||||
* @return array Returns the parsed header values.
|
||||
*/
|
||||
public static function parseHeader(MessageInterface $message, $header)
|
||||
{
|
||||
static $trimmed = "\"' \n\t\r";
|
||||
$params = $matches = [];
|
||||
|
||||
foreach (self::normalizeHeader($message, $header) as $val) {
|
||||
$part = [];
|
||||
foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
|
||||
if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
|
||||
$m = $matches[0];
|
||||
if (isset($m[1])) {
|
||||
$part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
|
||||
} else {
|
||||
$part[] = trim($m[0], $trimmed);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($part) {
|
||||
$params[] = $part;
|
||||
}
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an array of header values that may contain comma separated
|
||||
* headers into an array of headers with no comma separated values.
|
||||
*
|
||||
* @param MessageInterface $message That contains the header
|
||||
* @param string $header Header to retrieve from the message
|
||||
*
|
||||
* @return array Returns the normalized header field values.
|
||||
*/
|
||||
public static function normalizeHeader(MessageInterface $message, $header)
|
||||
{
|
||||
$h = $message->getHeaderAsArray($header);
|
||||
for ($i = 0, $total = count($h); $i < $total; $i++) {
|
||||
if (strpos($h[$i], ',') === false) {
|
||||
continue;
|
||||
}
|
||||
foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $h[$i]) as $v) {
|
||||
$h[] = trim($v);
|
||||
}
|
||||
unset($h[$i]);
|
||||
}
|
||||
|
||||
return $h;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the start-line and headers of a message as a string
|
||||
*
|
||||
* @param MessageInterface $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getStartLineAndHeaders(MessageInterface $message)
|
||||
{
|
||||
return static::getStartLine($message)
|
||||
. self::getHeadersAsString($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the headers of a message as a string
|
||||
*
|
||||
* @param MessageInterface $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getHeadersAsString(MessageInterface $message)
|
||||
{
|
||||
$result = '';
|
||||
foreach ($message->getHeaders() as $name => $values) {
|
||||
$result .= "\r\n{$name}: " . implode(', ', $values);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the start line of a message
|
||||
*
|
||||
* @param MessageInterface $message
|
||||
*
|
||||
* @return string
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public static function getStartLine(MessageInterface $message)
|
||||
{
|
||||
if ($message instanceof RequestInterface) {
|
||||
return trim($message->getMethod() . ' '
|
||||
. $message->getResource())
|
||||
. ' HTTP/' . $message->getProtocolVersion();
|
||||
} elseif ($message instanceof ResponseInterface) {
|
||||
return 'HTTP/' . $message->getProtocolVersion() . ' '
|
||||
. $message->getStatusCode() . ' '
|
||||
. $message->getReasonPhrase();
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Unknown message type');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts and modifies the options provided to the message in the
|
||||
* constructor.
|
||||
*
|
||||
* Can be overridden in subclasses as necessary.
|
||||
*
|
||||
* @param array $options Options array passed by reference.
|
||||
*/
|
||||
protected function handleOptions(array &$options)
|
||||
{
|
||||
if (isset($options['protocol_version'])) {
|
||||
$this->protocolVersion = $options['protocol_version'];
|
||||
}
|
||||
}
|
||||
}
|
||||
24
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php
vendored
Normal file
24
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
/**
|
||||
* Applies headers to a request.
|
||||
*
|
||||
* This interface can be used with Guzzle streams to apply body specific
|
||||
* headers to a request during the PREPARE_REQUEST priority of the before event
|
||||
*
|
||||
* NOTE: a body that implements this interface will prevent a default
|
||||
* content-type from being added to a request during the before event. If you
|
||||
* want a default content-type to be added, then it will need to be done
|
||||
* manually (e.g., using {@see GuzzleHttp\Mimetypes}).
|
||||
*/
|
||||
interface AppliesHeadersInterface
|
||||
{
|
||||
/**
|
||||
* Apply headers to a request appropriate for the current state of the
|
||||
* object.
|
||||
*
|
||||
* @param RequestInterface $request Request
|
||||
*/
|
||||
public function applyRequestHeaders(RequestInterface $request);
|
||||
}
|
||||
158
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php
vendored
Normal file
158
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/FutureResponse.php
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Ring\Future\MagicFutureTrait;
|
||||
use GuzzleHttp\Ring\Future\FutureInterface;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Represents a response that has not been fulfilled.
|
||||
*
|
||||
* When created, you must provide a function that is used to dereference the
|
||||
* future result and return it's value. The function has no arguments and MUST
|
||||
* return an instance of a {@see GuzzleHttp\Message\ResponseInterface} object.
|
||||
*
|
||||
* You can optionally provide a function in the constructor that can be used to
|
||||
* cancel the future from completing if possible. This function has no
|
||||
* arguments and returns a boolean value representing whether or not the
|
||||
* response could be cancelled.
|
||||
*
|
||||
* @property ResponseInterface $_value
|
||||
*/
|
||||
class FutureResponse implements ResponseInterface, FutureInterface
|
||||
{
|
||||
use MagicFutureTrait;
|
||||
|
||||
/**
|
||||
* Returns a FutureResponse that wraps another future.
|
||||
*
|
||||
* @param FutureInterface $future Future to wrap with a new future
|
||||
* @param callable $onFulfilled Invoked when the future fulfilled
|
||||
* @param callable $onRejected Invoked when the future rejected
|
||||
* @param callable $onProgress Invoked when the future progresses
|
||||
*
|
||||
* @return FutureResponse
|
||||
*/
|
||||
public static function proxy(
|
||||
FutureInterface $future,
|
||||
callable $onFulfilled = null,
|
||||
callable $onRejected = null,
|
||||
callable $onProgress = null
|
||||
) {
|
||||
return new FutureResponse(
|
||||
$future->then($onFulfilled, $onRejected, $onProgress),
|
||||
[$future, 'wait'],
|
||||
[$future, 'cancel']
|
||||
);
|
||||
}
|
||||
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->_value->getStatusCode();
|
||||
}
|
||||
|
||||
public function setStatusCode($code)
|
||||
{
|
||||
$this->_value->setStatusCode($code);
|
||||
}
|
||||
|
||||
public function getReasonPhrase()
|
||||
{
|
||||
return $this->_value->getReasonPhrase();
|
||||
}
|
||||
|
||||
public function setReasonPhrase($phrase)
|
||||
{
|
||||
$this->_value->setReasonPhrase($phrase);
|
||||
}
|
||||
|
||||
public function getEffectiveUrl()
|
||||
{
|
||||
return $this->_value->getEffectiveUrl();
|
||||
}
|
||||
|
||||
public function setEffectiveUrl($url)
|
||||
{
|
||||
$this->_value->setEffectiveUrl($url);
|
||||
}
|
||||
|
||||
public function json(array $config = [])
|
||||
{
|
||||
return $this->_value->json($config);
|
||||
}
|
||||
|
||||
public function xml(array $config = [])
|
||||
{
|
||||
return $this->_value->xml($config);
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
try {
|
||||
return $this->_value->__toString();
|
||||
} catch (\Exception $e) {
|
||||
trigger_error($e->getMessage(), E_USER_WARNING);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public function getProtocolVersion()
|
||||
{
|
||||
return $this->_value->getProtocolVersion();
|
||||
}
|
||||
|
||||
public function setBody(StreamInterface $body = null)
|
||||
{
|
||||
$this->_value->setBody($body);
|
||||
}
|
||||
|
||||
public function getBody()
|
||||
{
|
||||
return $this->_value->getBody();
|
||||
}
|
||||
|
||||
public function getHeaders()
|
||||
{
|
||||
return $this->_value->getHeaders();
|
||||
}
|
||||
|
||||
public function getHeader($header)
|
||||
{
|
||||
return $this->_value->getHeader($header);
|
||||
}
|
||||
|
||||
public function getHeaderAsArray($header)
|
||||
{
|
||||
return $this->_value->getHeaderAsArray($header);
|
||||
}
|
||||
|
||||
public function hasHeader($header)
|
||||
{
|
||||
return $this->_value->hasHeader($header);
|
||||
}
|
||||
|
||||
public function removeHeader($header)
|
||||
{
|
||||
$this->_value->removeHeader($header);
|
||||
}
|
||||
|
||||
public function addHeader($header, $value)
|
||||
{
|
||||
$this->_value->addHeader($header, $value);
|
||||
}
|
||||
|
||||
public function addHeaders(array $headers)
|
||||
{
|
||||
$this->_value->addHeaders($headers);
|
||||
}
|
||||
|
||||
public function setHeader($header, $value)
|
||||
{
|
||||
$this->_value->setHeader($header, $value);
|
||||
}
|
||||
|
||||
public function setHeaders(array $headers)
|
||||
{
|
||||
$this->_value->setHeaders($headers);
|
||||
}
|
||||
}
|
||||
364
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
vendored
Normal file
364
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
vendored
Normal file
@@ -0,0 +1,364 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Cookie\CookieJarInterface;
|
||||
use GuzzleHttp\Event\ListenerAttacherTrait;
|
||||
use GuzzleHttp\Post\PostBody;
|
||||
use GuzzleHttp\Post\PostFile;
|
||||
use GuzzleHttp\Post\PostFileInterface;
|
||||
use GuzzleHttp\Query;
|
||||
use GuzzleHttp\Stream\Stream;
|
||||
use GuzzleHttp\Subscriber\Cookie;
|
||||
use GuzzleHttp\Subscriber\HttpError;
|
||||
use GuzzleHttp\Subscriber\Redirect;
|
||||
use GuzzleHttp\Url;
|
||||
use \InvalidArgumentException as Iae;
|
||||
|
||||
/**
|
||||
* Default HTTP request factory used to create Request and Response objects.
|
||||
*/
|
||||
class MessageFactory implements MessageFactoryInterface
|
||||
{
|
||||
use ListenerAttacherTrait;
|
||||
|
||||
/** @var HttpError */
|
||||
private $errorPlugin;
|
||||
|
||||
/** @var Redirect */
|
||||
private $redirectPlugin;
|
||||
|
||||
/** @var array */
|
||||
private $customOptions;
|
||||
|
||||
/** @var array Request options passed through to request Config object */
|
||||
private static $configMap = [
|
||||
'connect_timeout' => 1, 'timeout' => 1, 'verify' => 1, 'ssl_key' => 1,
|
||||
'cert' => 1, 'proxy' => 1, 'debug' => 1, 'save_to' => 1, 'stream' => 1,
|
||||
'expect' => 1, 'future' => 1
|
||||
];
|
||||
|
||||
/** @var array Default allow_redirects request option settings */
|
||||
private static $defaultRedirect = [
|
||||
'max' => 5,
|
||||
'strict' => false,
|
||||
'referer' => false,
|
||||
'protocols' => ['http', 'https']
|
||||
];
|
||||
|
||||
/**
|
||||
* @param array $customOptions Associative array of custom request option
|
||||
* names mapping to functions used to apply
|
||||
* the option. The function accepts the request
|
||||
* and the option value to apply.
|
||||
*/
|
||||
public function __construct(array $customOptions = [])
|
||||
{
|
||||
$this->errorPlugin = new HttpError();
|
||||
$this->redirectPlugin = new Redirect();
|
||||
$this->customOptions = $customOptions;
|
||||
}
|
||||
|
||||
public function createResponse(
|
||||
$statusCode,
|
||||
array $headers = [],
|
||||
$body = null,
|
||||
array $options = []
|
||||
) {
|
||||
if (null !== $body) {
|
||||
$body = Stream::factory($body);
|
||||
}
|
||||
|
||||
return new Response($statusCode, $headers, $body, $options);
|
||||
}
|
||||
|
||||
public function createRequest($method, $url, array $options = [])
|
||||
{
|
||||
// Handle the request protocol version option that needs to be
|
||||
// specified in the request constructor.
|
||||
if (isset($options['version'])) {
|
||||
$options['config']['protocol_version'] = $options['version'];
|
||||
unset($options['version']);
|
||||
}
|
||||
|
||||
$request = new Request($method, $url, [], null,
|
||||
isset($options['config']) ? $options['config'] : []);
|
||||
|
||||
unset($options['config']);
|
||||
|
||||
// Use a POST body by default
|
||||
if (strtoupper($method) == 'POST'
|
||||
&& !isset($options['body'])
|
||||
&& !isset($options['json'])
|
||||
) {
|
||||
$options['body'] = [];
|
||||
}
|
||||
|
||||
if ($options) {
|
||||
$this->applyOptions($request, $options);
|
||||
}
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a request or response object from an HTTP message string
|
||||
*
|
||||
* @param string $message Message to parse
|
||||
*
|
||||
* @return RequestInterface|ResponseInterface
|
||||
* @throws \InvalidArgumentException if unable to parse a message
|
||||
*/
|
||||
public function fromMessage($message)
|
||||
{
|
||||
static $parser;
|
||||
if (!$parser) {
|
||||
$parser = new MessageParser();
|
||||
}
|
||||
|
||||
// Parse a response
|
||||
if (strtoupper(substr($message, 0, 4)) == 'HTTP') {
|
||||
$data = $parser->parseResponse($message);
|
||||
return $this->createResponse(
|
||||
$data['code'],
|
||||
$data['headers'],
|
||||
$data['body'] === '' ? null : $data['body'],
|
||||
$data
|
||||
);
|
||||
}
|
||||
|
||||
// Parse a request
|
||||
if (!($data = ($parser->parseRequest($message)))) {
|
||||
throw new \InvalidArgumentException('Unable to parse request');
|
||||
}
|
||||
|
||||
return $this->createRequest(
|
||||
$data['method'],
|
||||
Url::buildUrl($data['request_url']),
|
||||
[
|
||||
'headers' => $data['headers'],
|
||||
'body' => $data['body'] === '' ? null : $data['body'],
|
||||
'config' => [
|
||||
'protocol_version' => $data['protocol_version']
|
||||
]
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply POST fields and files to a request to attempt to give an accurate
|
||||
* representation.
|
||||
*
|
||||
* @param RequestInterface $request Request to update
|
||||
* @param array $body Body to apply
|
||||
*/
|
||||
protected function addPostData(RequestInterface $request, array $body)
|
||||
{
|
||||
static $fields = ['string' => true, 'array' => true, 'NULL' => true,
|
||||
'boolean' => true, 'double' => true, 'integer' => true];
|
||||
|
||||
$post = new PostBody();
|
||||
foreach ($body as $key => $value) {
|
||||
if (isset($fields[gettype($value)])) {
|
||||
$post->setField($key, $value);
|
||||
} elseif ($value instanceof PostFileInterface) {
|
||||
$post->addFile($value);
|
||||
} else {
|
||||
$post->addFile(new PostFile($key, $value));
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->getHeader('Content-Type') == 'multipart/form-data') {
|
||||
$post->forceMultipartUpload(true);
|
||||
}
|
||||
|
||||
$request->setBody($post);
|
||||
}
|
||||
|
||||
protected function applyOptions(
|
||||
RequestInterface $request,
|
||||
array $options = []
|
||||
) {
|
||||
$config = $request->getConfig();
|
||||
$emitter = $request->getEmitter();
|
||||
|
||||
foreach ($options as $key => $value) {
|
||||
|
||||
if (isset(self::$configMap[$key])) {
|
||||
$config[$key] = $value;
|
||||
continue;
|
||||
}
|
||||
|
||||
switch ($key) {
|
||||
|
||||
case 'allow_redirects':
|
||||
|
||||
if ($value === false) {
|
||||
continue 2;
|
||||
}
|
||||
|
||||
if ($value === true) {
|
||||
$value = self::$defaultRedirect;
|
||||
} elseif (!is_array($value)) {
|
||||
throw new Iae('allow_redirects must be true, false, or array');
|
||||
} else {
|
||||
// Merge the default settings with the provided settings
|
||||
$value += self::$defaultRedirect;
|
||||
}
|
||||
|
||||
$config['redirect'] = $value;
|
||||
$emitter->attach($this->redirectPlugin);
|
||||
break;
|
||||
|
||||
case 'decode_content':
|
||||
|
||||
if ($value === false) {
|
||||
continue 2;
|
||||
}
|
||||
|
||||
$config['decode_content'] = true;
|
||||
if ($value !== true) {
|
||||
$request->setHeader('Accept-Encoding', $value);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'headers':
|
||||
|
||||
if (!is_array($value)) {
|
||||
throw new Iae('header value must be an array');
|
||||
}
|
||||
foreach ($value as $k => $v) {
|
||||
$request->setHeader($k, $v);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'exceptions':
|
||||
|
||||
if ($value === true) {
|
||||
$emitter->attach($this->errorPlugin);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'body':
|
||||
|
||||
if (is_array($value)) {
|
||||
$this->addPostData($request, $value);
|
||||
} elseif ($value !== null) {
|
||||
$request->setBody(Stream::factory($value));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'auth':
|
||||
|
||||
if (!$value) {
|
||||
continue 2;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
$type = isset($value[2]) ? strtolower($value[2]) : 'basic';
|
||||
} else {
|
||||
$type = strtolower($value);
|
||||
}
|
||||
|
||||
$config['auth'] = $value;
|
||||
|
||||
if ($type == 'basic') {
|
||||
$request->setHeader(
|
||||
'Authorization',
|
||||
'Basic ' . base64_encode("$value[0]:$value[1]")
|
||||
);
|
||||
} elseif ($type == 'digest') {
|
||||
// @todo: Do not rely on curl
|
||||
$config->setPath('curl/' . CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
|
||||
$config->setPath('curl/' . CURLOPT_USERPWD, "$value[0]:$value[1]");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'query':
|
||||
|
||||
if ($value instanceof Query) {
|
||||
$original = $request->getQuery();
|
||||
// Do not overwrite existing query string variables by
|
||||
// overwriting the object with the query string data passed
|
||||
// in the URL
|
||||
$value->overwriteWith($original->toArray());
|
||||
$request->setQuery($value);
|
||||
} elseif (is_array($value)) {
|
||||
// Do not overwrite existing query string variables
|
||||
$query = $request->getQuery();
|
||||
foreach ($value as $k => $v) {
|
||||
if (!isset($query[$k])) {
|
||||
$query[$k] = $v;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Iae('query must be an array or Query object');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'cookies':
|
||||
|
||||
if ($value === true) {
|
||||
static $cookie = null;
|
||||
if (!$cookie) {
|
||||
$cookie = new Cookie();
|
||||
}
|
||||
$emitter->attach($cookie);
|
||||
} elseif (is_array($value)) {
|
||||
$emitter->attach(
|
||||
new Cookie(CookieJar::fromArray($value, $request->getHost()))
|
||||
);
|
||||
} elseif ($value instanceof CookieJarInterface) {
|
||||
$emitter->attach(new Cookie($value));
|
||||
} elseif ($value !== false) {
|
||||
throw new Iae('cookies must be an array, true, or CookieJarInterface');
|
||||
}
|
||||
break;
|
||||
|
||||
case 'events':
|
||||
|
||||
if (!is_array($value)) {
|
||||
throw new Iae('events must be an array');
|
||||
}
|
||||
|
||||
$this->attachListeners($request,
|
||||
$this->prepareListeners(
|
||||
$value,
|
||||
['before', 'complete', 'error', 'progress', 'end']
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case 'subscribers':
|
||||
|
||||
if (!is_array($value)) {
|
||||
throw new Iae('subscribers must be an array');
|
||||
}
|
||||
|
||||
foreach ($value as $subscribers) {
|
||||
$emitter->attach($subscribers);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'json':
|
||||
|
||||
$request->setBody(Stream::factory(json_encode($value)));
|
||||
if (!$request->hasHeader('Content-Type')) {
|
||||
$request->setHeader('Content-Type', 'application/json');
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
// Check for custom handler functions.
|
||||
if (isset($this->customOptions[$key])) {
|
||||
$fn = $this->customOptions[$key];
|
||||
$fn($request, $value);
|
||||
continue 2;
|
||||
}
|
||||
|
||||
throw new Iae("No method can handle the {$key} config key");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
71
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php
vendored
Normal file
71
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageFactoryInterface.php
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Url;
|
||||
|
||||
/**
|
||||
* Request and response factory
|
||||
*/
|
||||
interface MessageFactoryInterface
|
||||
{
|
||||
/**
|
||||
* Creates a response
|
||||
*
|
||||
* @param string $statusCode HTTP status code
|
||||
* @param array $headers Response headers
|
||||
* @param mixed $body Response body
|
||||
* @param array $options Response options
|
||||
* - protocol_version: HTTP protocol version
|
||||
* - header_factory: Factory used to create headers
|
||||
* - And any other options used by a concrete message implementation
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*/
|
||||
public function createResponse(
|
||||
$statusCode,
|
||||
array $headers = [],
|
||||
$body = null,
|
||||
array $options = []
|
||||
);
|
||||
|
||||
/**
|
||||
* Create a new request based on the HTTP method.
|
||||
*
|
||||
* This method accepts an associative array of request options. Below is a
|
||||
* brief description of each parameter. See
|
||||
* http://docs.guzzlephp.org/en/latest/clients.html#request-options for a much more
|
||||
* in-depth description of each parameter.
|
||||
*
|
||||
* - headers: Associative array of headers to add to the request
|
||||
* - body: string|resource|array|StreamInterface request body to send
|
||||
* - json: mixed Uploads JSON encoded data using an application/json Content-Type header.
|
||||
* - query: Associative array of query string values to add to the request
|
||||
* - auth: array|string HTTP auth settings (user, pass[, type="basic"])
|
||||
* - version: The HTTP protocol version to use with the request
|
||||
* - cookies: true|false|CookieJarInterface To enable or disable cookies
|
||||
* - allow_redirects: true|false|array Controls HTTP redirects
|
||||
* - save_to: string|resource|StreamInterface Where the response is saved
|
||||
* - events: Associative array of event names to callables or arrays
|
||||
* - subscribers: Array of event subscribers to add to the request
|
||||
* - exceptions: Specifies whether or not exceptions are thrown for HTTP protocol errors
|
||||
* - timeout: Timeout of the request in seconds. Use 0 to wait indefinitely
|
||||
* - connect_timeout: Number of seconds to wait while trying to connect. (0 to wait indefinitely)
|
||||
* - verify: SSL validation. True/False or the path to a PEM file
|
||||
* - cert: Path a SSL cert or array of (path, pwd)
|
||||
* - ssl_key: Path to a private SSL key or array of (path, pwd)
|
||||
* - proxy: Specify an HTTP proxy or hash of protocols to proxies
|
||||
* - debug: Set to true or a resource to view handler specific debug info
|
||||
* - stream: Set to true to stream a response body rather than download it all up front
|
||||
* - expect: true/false/integer Controls the "Expect: 100-Continue" header
|
||||
* - config: Associative array of request config collection options
|
||||
* - decode_content: true/false/string to control decoding content-encoding responses
|
||||
*
|
||||
* @param string $method HTTP method (GET, POST, PUT, etc.)
|
||||
* @param string|Url $url HTTP URL to connect to
|
||||
* @param array $options Array of options to apply to the request
|
||||
*
|
||||
* @return RequestInterface
|
||||
* @link http://docs.guzzlephp.org/en/latest/clients.html#request-options
|
||||
*/
|
||||
public function createRequest($method, $url, array $options = []);
|
||||
}
|
||||
136
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageInterface.php
vendored
Normal file
136
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageInterface.php
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Request and response message interface
|
||||
*/
|
||||
interface MessageInterface
|
||||
{
|
||||
/**
|
||||
* Get a string representation of the message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString();
|
||||
|
||||
/**
|
||||
* Get the HTTP protocol version of the message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProtocolVersion();
|
||||
|
||||
/**
|
||||
* Sets the body of the message.
|
||||
*
|
||||
* The body MUST be a StreamInterface object. Setting the body to null MUST
|
||||
* remove the existing body.
|
||||
*
|
||||
* @param StreamInterface|null $body Body.
|
||||
*/
|
||||
public function setBody(StreamInterface $body = null);
|
||||
|
||||
/**
|
||||
* Get the body of the message
|
||||
*
|
||||
* @return StreamInterface|null
|
||||
*/
|
||||
public function getBody();
|
||||
|
||||
/**
|
||||
* Gets all message headers.
|
||||
*
|
||||
* The keys represent the header name as it will be sent over the wire, and
|
||||
* each value is an array of strings associated with the header.
|
||||
*
|
||||
* // Represent the headers as a string
|
||||
* foreach ($message->getHeaders() as $name => $values) {
|
||||
* echo $name . ": " . implode(", ", $values);
|
||||
* }
|
||||
*
|
||||
* @return array Returns an associative array of the message's headers.
|
||||
*/
|
||||
public function getHeaders();
|
||||
|
||||
/**
|
||||
* Retrieve a header by the given case-insensitive name.
|
||||
*
|
||||
* @param string $header Case-insensitive header name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHeader($header);
|
||||
|
||||
/**
|
||||
* Retrieves a header by the given case-insensitive name as an array of strings.
|
||||
*
|
||||
* @param string $header Case-insensitive header name.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getHeaderAsArray($header);
|
||||
|
||||
/**
|
||||
* Checks if a header exists by the given case-insensitive name.
|
||||
*
|
||||
* @param string $header Case-insensitive header name.
|
||||
*
|
||||
* @return bool Returns true if any header names match the given header
|
||||
* name using a case-insensitive string comparison. Returns false if
|
||||
* no matching header name is found in the message.
|
||||
*/
|
||||
public function hasHeader($header);
|
||||
|
||||
/**
|
||||
* Remove a specific header by case-insensitive name.
|
||||
*
|
||||
* @param string $header Case-insensitive header name.
|
||||
*/
|
||||
public function removeHeader($header);
|
||||
|
||||
/**
|
||||
* Appends a header value to any existing values associated with the
|
||||
* given header name.
|
||||
*
|
||||
* @param string $header Header name to add
|
||||
* @param string $value Value of the header
|
||||
*/
|
||||
public function addHeader($header, $value);
|
||||
|
||||
/**
|
||||
* Merges in an associative array of headers.
|
||||
*
|
||||
* Each array key MUST be a string representing the case-insensitive name
|
||||
* of a header. Each value MUST be either a string or an array of strings.
|
||||
* For each value, the value is appended to any existing header of the same
|
||||
* name, or, if a header does not already exist by the given name, then the
|
||||
* header is added.
|
||||
*
|
||||
* @param array $headers Associative array of headers to add to the message
|
||||
*/
|
||||
public function addHeaders(array $headers);
|
||||
|
||||
/**
|
||||
* Sets a header, replacing any existing values of any headers with the
|
||||
* same case-insensitive name.
|
||||
*
|
||||
* The header values MUST be a string or an array of strings.
|
||||
*
|
||||
* @param string $header Header name
|
||||
* @param string|array $value Header value(s)
|
||||
*/
|
||||
public function setHeader($header, $value);
|
||||
|
||||
/**
|
||||
* Sets headers, replacing any headers that have already been set on the
|
||||
* message.
|
||||
*
|
||||
* The array keys MUST be a string. The array values must be either a
|
||||
* string or an array of strings.
|
||||
*
|
||||
* @param array $headers Headers to set.
|
||||
*/
|
||||
public function setHeaders(array $headers);
|
||||
}
|
||||
171
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageParser.php
vendored
Normal file
171
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/MessageParser.php
vendored
Normal file
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
/**
|
||||
* Request and response parser used by Guzzle
|
||||
*/
|
||||
class MessageParser
|
||||
{
|
||||
/**
|
||||
* Parse an HTTP request message into an associative array of parts.
|
||||
*
|
||||
* @param string $message HTTP request to parse
|
||||
*
|
||||
* @return array|bool Returns false if the message is invalid
|
||||
*/
|
||||
public function parseRequest($message)
|
||||
{
|
||||
if (!($parts = $this->parseMessage($message))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Parse the protocol and protocol version
|
||||
if (isset($parts['start_line'][2])) {
|
||||
$startParts = explode('/', $parts['start_line'][2]);
|
||||
$protocol = strtoupper($startParts[0]);
|
||||
$version = isset($startParts[1]) ? $startParts[1] : '1.1';
|
||||
} else {
|
||||
$protocol = 'HTTP';
|
||||
$version = '1.1';
|
||||
}
|
||||
|
||||
$parsed = [
|
||||
'method' => strtoupper($parts['start_line'][0]),
|
||||
'protocol' => $protocol,
|
||||
'protocol_version' => $version,
|
||||
'headers' => $parts['headers'],
|
||||
'body' => $parts['body']
|
||||
];
|
||||
|
||||
$parsed['request_url'] = $this->getUrlPartsFromMessage(
|
||||
(isset($parts['start_line'][1]) ? $parts['start_line'][1] : ''), $parsed);
|
||||
|
||||
return $parsed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse an HTTP response message into an associative array of parts.
|
||||
*
|
||||
* @param string $message HTTP response to parse
|
||||
*
|
||||
* @return array|bool Returns false if the message is invalid
|
||||
*/
|
||||
public function parseResponse($message)
|
||||
{
|
||||
if (!($parts = $this->parseMessage($message))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
list($protocol, $version) = explode('/', trim($parts['start_line'][0]));
|
||||
|
||||
return [
|
||||
'protocol' => $protocol,
|
||||
'protocol_version' => $version,
|
||||
'code' => $parts['start_line'][1],
|
||||
'reason_phrase' => isset($parts['start_line'][2]) ? $parts['start_line'][2] : '',
|
||||
'headers' => $parts['headers'],
|
||||
'body' => $parts['body']
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a message into parts
|
||||
*
|
||||
* @param string $message Message to parse
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
private function parseMessage($message)
|
||||
{
|
||||
if (!$message) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$startLine = null;
|
||||
$headers = [];
|
||||
$body = '';
|
||||
|
||||
// Iterate over each line in the message, accounting for line endings
|
||||
$lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) {
|
||||
|
||||
$line = $lines[$i];
|
||||
|
||||
// If two line breaks were encountered, then this is the end of body
|
||||
if (empty($line)) {
|
||||
if ($i < $totalLines - 1) {
|
||||
$body = implode('', array_slice($lines, $i + 2));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// Parse message headers
|
||||
if (!$startLine) {
|
||||
$startLine = explode(' ', $line, 3);
|
||||
} elseif (strpos($line, ':')) {
|
||||
$parts = explode(':', $line, 2);
|
||||
$key = trim($parts[0]);
|
||||
$value = isset($parts[1]) ? trim($parts[1]) : '';
|
||||
if (!isset($headers[$key])) {
|
||||
$headers[$key] = $value;
|
||||
} elseif (!is_array($headers[$key])) {
|
||||
$headers[$key] = [$headers[$key], $value];
|
||||
} else {
|
||||
$headers[$key][] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'start_line' => $startLine,
|
||||
'headers' => $headers,
|
||||
'body' => $body
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create URL parts from HTTP message parts
|
||||
*
|
||||
* @param string $requestUrl Associated URL
|
||||
* @param array $parts HTTP message parts
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getUrlPartsFromMessage($requestUrl, array $parts)
|
||||
{
|
||||
// Parse the URL information from the message
|
||||
$urlParts = ['path' => $requestUrl, 'scheme' => 'http'];
|
||||
|
||||
// Check for the Host header
|
||||
if (isset($parts['headers']['Host'])) {
|
||||
$urlParts['host'] = $parts['headers']['Host'];
|
||||
} elseif (isset($parts['headers']['host'])) {
|
||||
$urlParts['host'] = $parts['headers']['host'];
|
||||
} else {
|
||||
$urlParts['host'] = null;
|
||||
}
|
||||
|
||||
if (false === strpos($urlParts['host'], ':')) {
|
||||
$urlParts['port'] = '';
|
||||
} else {
|
||||
$hostParts = explode(':', $urlParts['host']);
|
||||
$urlParts['host'] = trim($hostParts[0]);
|
||||
$urlParts['port'] = (int) trim($hostParts[1]);
|
||||
if ($urlParts['port'] == 443) {
|
||||
$urlParts['scheme'] = 'https';
|
||||
}
|
||||
}
|
||||
|
||||
// Check if a query is present
|
||||
$path = $urlParts['path'];
|
||||
$qpos = strpos($path, '?');
|
||||
if ($qpos) {
|
||||
$urlParts['query'] = substr($path, $qpos + 1);
|
||||
$urlParts['path'] = substr($path, 0, $qpos);
|
||||
} else {
|
||||
$urlParts['query'] = '';
|
||||
}
|
||||
|
||||
return $urlParts;
|
||||
}
|
||||
}
|
||||
195
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/Request.php
vendored
Normal file
195
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/Request.php
vendored
Normal file
@@ -0,0 +1,195 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Collection;
|
||||
use GuzzleHttp\Event\HasEmitterTrait;
|
||||
use GuzzleHttp\Subscriber\Prepare;
|
||||
use GuzzleHttp\Url;
|
||||
|
||||
/**
|
||||
* HTTP request class to send requests
|
||||
*/
|
||||
class Request extends AbstractMessage implements RequestInterface
|
||||
{
|
||||
use HasEmitterTrait;
|
||||
|
||||
/** @var Url HTTP Url */
|
||||
private $url;
|
||||
|
||||
/** @var string HTTP method */
|
||||
private $method;
|
||||
|
||||
/** @var Collection Transfer options */
|
||||
private $transferOptions;
|
||||
|
||||
/**
|
||||
* @param string $method HTTP method
|
||||
* @param string|Url $url HTTP URL to connect to. The URI scheme,
|
||||
* host header, and URI are parsed from the full URL. If query string
|
||||
* parameters are present they will be parsed as well.
|
||||
* @param array|Collection $headers HTTP headers
|
||||
* @param mixed $body Body to send with the request
|
||||
* @param array $options Array of options to use with the request
|
||||
* - emitter: Event emitter to use with the request
|
||||
*/
|
||||
public function __construct(
|
||||
$method,
|
||||
$url,
|
||||
$headers = [],
|
||||
$body = null,
|
||||
array $options = []
|
||||
) {
|
||||
$this->setUrl($url);
|
||||
$this->method = strtoupper($method);
|
||||
$this->handleOptions($options);
|
||||
$this->transferOptions = new Collection($options);
|
||||
$this->addPrepareEvent();
|
||||
|
||||
if ($body !== null) {
|
||||
$this->setBody($body);
|
||||
}
|
||||
|
||||
if ($headers) {
|
||||
foreach ($headers as $key => $value) {
|
||||
$this->addHeader($key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function __clone()
|
||||
{
|
||||
if ($this->emitter) {
|
||||
$this->emitter = clone $this->emitter;
|
||||
}
|
||||
$this->transferOptions = clone $this->transferOptions;
|
||||
$this->url = clone $this->url;
|
||||
}
|
||||
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->url = $url instanceof Url ? $url : Url::fromString($url);
|
||||
$this->updateHostHeaderFromUrl();
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
{
|
||||
return (string) $this->url;
|
||||
}
|
||||
|
||||
public function setQuery($query)
|
||||
{
|
||||
$this->url->setQuery($query);
|
||||
}
|
||||
|
||||
public function getQuery()
|
||||
{
|
||||
return $this->url->getQuery();
|
||||
}
|
||||
|
||||
public function setMethod($method)
|
||||
{
|
||||
$this->method = strtoupper($method);
|
||||
}
|
||||
|
||||
public function getMethod()
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
|
||||
public function getScheme()
|
||||
{
|
||||
return $this->url->getScheme();
|
||||
}
|
||||
|
||||
public function setScheme($scheme)
|
||||
{
|
||||
$this->url->setScheme($scheme);
|
||||
}
|
||||
|
||||
public function getPort()
|
||||
{
|
||||
return $this->url->getPort();
|
||||
}
|
||||
|
||||
public function setPort($port)
|
||||
{
|
||||
$this->url->setPort($port);
|
||||
$this->updateHostHeaderFromUrl();
|
||||
}
|
||||
|
||||
public function getHost()
|
||||
{
|
||||
return $this->url->getHost();
|
||||
}
|
||||
|
||||
public function setHost($host)
|
||||
{
|
||||
$this->url->setHost($host);
|
||||
$this->updateHostHeaderFromUrl();
|
||||
}
|
||||
|
||||
public function getPath()
|
||||
{
|
||||
return '/' . ltrim($this->url->getPath(), '/');
|
||||
}
|
||||
|
||||
public function setPath($path)
|
||||
{
|
||||
$this->url->setPath($path);
|
||||
}
|
||||
|
||||
public function getResource()
|
||||
{
|
||||
$resource = $this->getPath();
|
||||
if ($query = (string) $this->url->getQuery()) {
|
||||
$resource .= '?' . $query;
|
||||
}
|
||||
|
||||
return $resource;
|
||||
}
|
||||
|
||||
public function getConfig()
|
||||
{
|
||||
return $this->transferOptions;
|
||||
}
|
||||
|
||||
protected function handleOptions(array &$options)
|
||||
{
|
||||
parent::handleOptions($options);
|
||||
// Use a custom emitter if one is specified, and remove it from
|
||||
// options that are exposed through getConfig()
|
||||
if (isset($options['emitter'])) {
|
||||
$this->emitter = $options['emitter'];
|
||||
unset($options['emitter']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a subscriber that ensures a request's body is prepared before
|
||||
* sending.
|
||||
*/
|
||||
private function addPrepareEvent()
|
||||
{
|
||||
static $subscriber;
|
||||
if (!$subscriber) {
|
||||
$subscriber = new Prepare();
|
||||
}
|
||||
|
||||
$this->getEmitter()->attach($subscriber);
|
||||
}
|
||||
|
||||
private function updateHostHeaderFromUrl()
|
||||
{
|
||||
$port = $this->url->getPort();
|
||||
$scheme = $this->url->getScheme();
|
||||
if ($host = $this->url->getHost()) {
|
||||
if (($port == 80 && $scheme == 'http') ||
|
||||
($port == 443 && $scheme == 'https')
|
||||
) {
|
||||
$this->setHeader('Host', $host);
|
||||
} else {
|
||||
$this->setHeader('Host', "{$host}:{$port}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
136
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php
vendored
Normal file
136
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Event\HasEmitterInterface;
|
||||
use GuzzleHttp\Query;
|
||||
|
||||
/**
|
||||
* Generic HTTP request interface
|
||||
*/
|
||||
interface RequestInterface extends MessageInterface, HasEmitterInterface
|
||||
{
|
||||
/**
|
||||
* Sets the request URL.
|
||||
*
|
||||
* The URL MUST be a string, or an object that implements the
|
||||
* `__toString()` method.
|
||||
*
|
||||
* @param string $url Request URL.
|
||||
*
|
||||
* @throws \InvalidArgumentException If the URL is invalid.
|
||||
*/
|
||||
public function setUrl($url);
|
||||
|
||||
/**
|
||||
* Gets the request URL as a string.
|
||||
*
|
||||
* @return string Returns the URL as a string.
|
||||
*/
|
||||
public function getUrl();
|
||||
|
||||
/**
|
||||
* Get the resource part of the the request, including the path, query
|
||||
* string, and fragment.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getResource();
|
||||
|
||||
/**
|
||||
* Get the collection of key value pairs that will be used as the query
|
||||
* string in the request.
|
||||
*
|
||||
* @return Query
|
||||
*/
|
||||
public function getQuery();
|
||||
|
||||
/**
|
||||
* Set the query string used by the request
|
||||
*
|
||||
* @param array|Query $query Query to set
|
||||
*/
|
||||
public function setQuery($query);
|
||||
|
||||
/**
|
||||
* Get the HTTP method of the request.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod();
|
||||
|
||||
/**
|
||||
* Set the HTTP method of the request.
|
||||
*
|
||||
* @param string $method HTTP method
|
||||
*/
|
||||
public function setMethod($method);
|
||||
|
||||
/**
|
||||
* Get the URI scheme of the request (http, https, etc.).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getScheme();
|
||||
|
||||
/**
|
||||
* Set the URI scheme of the request (http, https, etc.).
|
||||
*
|
||||
* @param string $scheme Scheme to set
|
||||
*/
|
||||
public function setScheme($scheme);
|
||||
|
||||
/**
|
||||
* Get the port scheme of the request (e.g., 80, 443, etc.).
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getPort();
|
||||
|
||||
/**
|
||||
* Set the port of the request.
|
||||
*
|
||||
* Setting a port modifies the Host header of a request as necessary.
|
||||
*
|
||||
* @param int $port Port to set
|
||||
*/
|
||||
public function setPort($port);
|
||||
|
||||
/**
|
||||
* Get the host of the request.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHost();
|
||||
|
||||
/**
|
||||
* Set the host of the request including an optional port.
|
||||
*
|
||||
* Including a port in the host argument will explicitly change the port of
|
||||
* the request. If no port is found, the default port of the current
|
||||
* request scheme will be utilized.
|
||||
*
|
||||
* @param string $host Host to set (e.g. www.yahoo.com, www.yahoo.com:80)
|
||||
*/
|
||||
public function setHost($host);
|
||||
|
||||
/**
|
||||
* Get the path of the request (e.g. '/', '/index.html').
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath();
|
||||
|
||||
/**
|
||||
* Set the path of the request (e.g. '/', '/index.html').
|
||||
*
|
||||
* @param string|array $path Path to set or array of segments to implode
|
||||
*/
|
||||
public function setPath($path);
|
||||
|
||||
/**
|
||||
* Get the request's configuration options.
|
||||
*
|
||||
* @return \GuzzleHttp\Collection
|
||||
*/
|
||||
public function getConfig();
|
||||
}
|
||||
208
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/Response.php
vendored
Normal file
208
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/Response.php
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
use GuzzleHttp\Exception\ParseException;
|
||||
use GuzzleHttp\Exception\XmlParseException;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
use GuzzleHttp\Utils;
|
||||
|
||||
/**
|
||||
* Guzzle HTTP response object
|
||||
*/
|
||||
class Response extends AbstractMessage implements ResponseInterface
|
||||
{
|
||||
/** @var array Mapping of status codes to reason phrases */
|
||||
private static $statusTexts = [
|
||||
100 => 'Continue',
|
||||
101 => 'Switching Protocols',
|
||||
102 => 'Processing',
|
||||
200 => 'OK',
|
||||
201 => 'Created',
|
||||
202 => 'Accepted',
|
||||
203 => 'Non-Authoritative Information',
|
||||
204 => 'No Content',
|
||||
205 => 'Reset Content',
|
||||
206 => 'Partial Content',
|
||||
207 => 'Multi-Status',
|
||||
208 => 'Already Reported',
|
||||
226 => 'IM Used',
|
||||
300 => 'Multiple Choices',
|
||||
301 => 'Moved Permanently',
|
||||
302 => 'Found',
|
||||
303 => 'See Other',
|
||||
304 => 'Not Modified',
|
||||
305 => 'Use Proxy',
|
||||
307 => 'Temporary Redirect',
|
||||
308 => 'Permanent Redirect',
|
||||
400 => 'Bad Request',
|
||||
401 => 'Unauthorized',
|
||||
402 => 'Payment Required',
|
||||
403 => 'Forbidden',
|
||||
404 => 'Not Found',
|
||||
405 => 'Method Not Allowed',
|
||||
406 => 'Not Acceptable',
|
||||
407 => 'Proxy Authentication Required',
|
||||
408 => 'Request Timeout',
|
||||
409 => 'Conflict',
|
||||
410 => 'Gone',
|
||||
411 => 'Length Required',
|
||||
412 => 'Precondition Failed',
|
||||
413 => 'Request Entity Too Large',
|
||||
414 => 'Request-URI Too Long',
|
||||
415 => 'Unsupported Media Type',
|
||||
416 => 'Requested Range Not Satisfiable',
|
||||
417 => 'Expectation Failed',
|
||||
422 => 'Unprocessable Entity',
|
||||
423 => 'Locked',
|
||||
424 => 'Failed Dependency',
|
||||
425 => 'Reserved for WebDAV advanced collections expired proposal',
|
||||
426 => 'Upgrade required',
|
||||
428 => 'Precondition Required',
|
||||
429 => 'Too Many Requests',
|
||||
431 => 'Request Header Fields Too Large',
|
||||
500 => 'Internal Server Error',
|
||||
501 => 'Not Implemented',
|
||||
502 => 'Bad Gateway',
|
||||
503 => 'Service Unavailable',
|
||||
504 => 'Gateway Timeout',
|
||||
505 => 'HTTP Version Not Supported',
|
||||
506 => 'Variant Also Negotiates (Experimental)',
|
||||
507 => 'Insufficient Storage',
|
||||
508 => 'Loop Detected',
|
||||
510 => 'Not Extended',
|
||||
511 => 'Network Authentication Required',
|
||||
];
|
||||
|
||||
/** @var string The reason phrase of the response (human readable code) */
|
||||
private $reasonPhrase;
|
||||
|
||||
/** @var string The status code of the response */
|
||||
private $statusCode;
|
||||
|
||||
/** @var string The effective URL that returned this response */
|
||||
private $effectiveUrl;
|
||||
|
||||
/**
|
||||
* @param int|string $statusCode The response status code (e.g. 200)
|
||||
* @param array $headers The response headers
|
||||
* @param StreamInterface $body The body of the response
|
||||
* @param array $options Response message options
|
||||
* - reason_phrase: Set a custom reason phrase
|
||||
* - protocol_version: Set a custom protocol version
|
||||
*/
|
||||
public function __construct(
|
||||
$statusCode,
|
||||
array $headers = [],
|
||||
StreamInterface $body = null,
|
||||
array $options = []
|
||||
) {
|
||||
$this->statusCode = (int) $statusCode;
|
||||
$this->handleOptions($options);
|
||||
|
||||
// Assume a reason phrase if one was not applied as an option
|
||||
if (!$this->reasonPhrase &&
|
||||
isset(self::$statusTexts[$this->statusCode])
|
||||
) {
|
||||
$this->reasonPhrase = self::$statusTexts[$this->statusCode];
|
||||
}
|
||||
|
||||
if ($headers) {
|
||||
$this->setHeaders($headers);
|
||||
}
|
||||
|
||||
if ($body) {
|
||||
$this->setBody($body);
|
||||
}
|
||||
}
|
||||
|
||||
public function getStatusCode()
|
||||
{
|
||||
return $this->statusCode;
|
||||
}
|
||||
|
||||
public function setStatusCode($code)
|
||||
{
|
||||
return $this->statusCode = (int) $code;
|
||||
}
|
||||
|
||||
public function getReasonPhrase()
|
||||
{
|
||||
return $this->reasonPhrase;
|
||||
}
|
||||
|
||||
public function setReasonPhrase($phrase)
|
||||
{
|
||||
return $this->reasonPhrase = $phrase;
|
||||
}
|
||||
|
||||
public function json(array $config = [])
|
||||
{
|
||||
try {
|
||||
return Utils::jsonDecode(
|
||||
(string) $this->getBody(),
|
||||
isset($config['object']) ? !$config['object'] : true,
|
||||
512,
|
||||
isset($config['big_int_strings']) ? JSON_BIGINT_AS_STRING : 0
|
||||
);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
throw new ParseException(
|
||||
$e->getMessage(),
|
||||
$this
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function xml(array $config = [])
|
||||
{
|
||||
$disableEntities = libxml_disable_entity_loader(true);
|
||||
$internalErrors = libxml_use_internal_errors(true);
|
||||
|
||||
try {
|
||||
// Allow XML to be retrieved even if there is no response body
|
||||
$xml = new \SimpleXMLElement(
|
||||
(string) $this->getBody() ?: '<root />',
|
||||
isset($config['libxml_options']) ? $config['libxml_options'] : LIBXML_NONET,
|
||||
false,
|
||||
isset($config['ns']) ? $config['ns'] : '',
|
||||
isset($config['ns_is_prefix']) ? $config['ns_is_prefix'] : false
|
||||
);
|
||||
libxml_disable_entity_loader($disableEntities);
|
||||
libxml_use_internal_errors($internalErrors);
|
||||
} catch (\Exception $e) {
|
||||
libxml_disable_entity_loader($disableEntities);
|
||||
libxml_use_internal_errors($internalErrors);
|
||||
throw new XmlParseException(
|
||||
'Unable to parse response body into XML: ' . $e->getMessage(),
|
||||
$this,
|
||||
$e,
|
||||
(libxml_get_last_error()) ?: null
|
||||
);
|
||||
}
|
||||
|
||||
return $xml;
|
||||
}
|
||||
|
||||
public function getEffectiveUrl()
|
||||
{
|
||||
return $this->effectiveUrl;
|
||||
}
|
||||
|
||||
public function setEffectiveUrl($url)
|
||||
{
|
||||
$this->effectiveUrl = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts and modifies the options provided to the response in the
|
||||
* constructor.
|
||||
*
|
||||
* @param array $options Options array passed by reference.
|
||||
*/
|
||||
protected function handleOptions(array &$options = [])
|
||||
{
|
||||
parent::handleOptions($options);
|
||||
if (isset($options['reason_phrase'])) {
|
||||
$this->reasonPhrase = $options['reason_phrase'];
|
||||
}
|
||||
}
|
||||
}
|
||||
111
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
vendored
Normal file
111
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Message;
|
||||
|
||||
/**
|
||||
* Represents an HTTP response message.
|
||||
*/
|
||||
interface ResponseInterface extends MessageInterface
|
||||
{
|
||||
/**
|
||||
* Gets the response Status-Code.
|
||||
*
|
||||
* The Status-Code is a 3-digit integer result code of the server's attempt
|
||||
* to understand and satisfy the request.
|
||||
*
|
||||
* @return int Status code.
|
||||
*/
|
||||
public function getStatusCode();
|
||||
|
||||
/**
|
||||
* Sets the status code of this response.
|
||||
*
|
||||
* @param int $code The 3-digit integer result code to set.
|
||||
*/
|
||||
public function setStatusCode($code);
|
||||
|
||||
/**
|
||||
* Gets the response Reason-Phrase, a short textual description of the
|
||||
* Status-Code.
|
||||
*
|
||||
* Because a Reason-Phrase is not a required element in response
|
||||
* Status-Line, the Reason-Phrase value MAY be null. Implementations MAY
|
||||
* choose to return the default RFC 2616 recommended reason phrase for the
|
||||
* response's Status-Code.
|
||||
*
|
||||
* @return string|null Reason phrase, or null if unknown.
|
||||
*/
|
||||
public function getReasonPhrase();
|
||||
|
||||
/**
|
||||
* Sets the Reason-Phrase of the response.
|
||||
*
|
||||
* If no Reason-Phrase is specified, implementations MAY choose to default
|
||||
* to the RFC 2616 recommended reason phrase for the response's Status-Code.
|
||||
*
|
||||
* @param string $phrase The Reason-Phrase to set.
|
||||
*/
|
||||
public function setReasonPhrase($phrase);
|
||||
|
||||
/**
|
||||
* Get the effective URL that resulted in this response (e.g. the last
|
||||
* redirect URL).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEffectiveUrl();
|
||||
|
||||
/**
|
||||
* Set the effective URL that resulted in this response (e.g. the last
|
||||
* redirect URL).
|
||||
*
|
||||
* @param string $url Effective URL
|
||||
*/
|
||||
public function setEffectiveUrl($url);
|
||||
|
||||
/**
|
||||
* Parse the JSON response body and return the JSON decoded data.
|
||||
*
|
||||
* @param array $config Associative array of configuration settings used
|
||||
* to control how the JSON data is parsed. Concrete implementations MAY
|
||||
* add further configuration settings as needed, but they MUST implement
|
||||
* functionality for the following options:
|
||||
*
|
||||
* - object: Set to true to parse JSON objects as PHP objects rather
|
||||
* than associative arrays. Defaults to false.
|
||||
* - big_int_strings: When set to true, large integers are converted to
|
||||
* strings rather than floats. Defaults to false.
|
||||
*
|
||||
* Implementations are free to add further configuration settings as
|
||||
* needed.
|
||||
*
|
||||
* @return mixed Returns the JSON decoded data based on the provided
|
||||
* parse settings.
|
||||
* @throws \RuntimeException if the response body is not in JSON format
|
||||
*/
|
||||
public function json(array $config = []);
|
||||
|
||||
/**
|
||||
* Parse the XML response body and return a \SimpleXMLElement.
|
||||
*
|
||||
* In order to prevent XXE attacks, this method disables loading external
|
||||
* entities. If you rely on external entities, then you must parse the
|
||||
* XML response manually by accessing the response body directly.
|
||||
*
|
||||
* @param array $config Associative array of configuration settings used
|
||||
* to control how the XML is parsed. Concrete implementations MAY add
|
||||
* further configuration settings as needed, but they MUST implement
|
||||
* functionality for the following options:
|
||||
*
|
||||
* - ns: Set to a string to represent the namespace prefix or URI
|
||||
* - ns_is_prefix: Set to true to specify that the NS is a prefix rather
|
||||
* than a URI (defaults to false).
|
||||
* - libxml_options: Bitwise OR of the libxml option constants
|
||||
* listed at http://php.net/manual/en/libxml.constants.php
|
||||
* (defaults to LIBXML_NONET)
|
||||
*
|
||||
* @return \SimpleXMLElement
|
||||
* @throws \RuntimeException if the response body is not in XML format
|
||||
* @link http://websec.io/2012/08/27/Preventing-XXE-in-PHP.html
|
||||
*/
|
||||
public function xml(array $config = []);
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Message/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;
|
||||
963
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Mimetypes.php
vendored
Normal file
963
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Mimetypes.php
vendored
Normal file
@@ -0,0 +1,963 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
/**
|
||||
* Provides mappings of file extensions to mimetypes
|
||||
* @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
|
||||
*/
|
||||
class Mimetypes
|
||||
{
|
||||
/** @var self */
|
||||
protected static $instance;
|
||||
|
||||
/** @var array Mapping of extension to mimetype */
|
||||
protected $mimetypes = array(
|
||||
'3dml' => 'text/vnd.in3d.3dml',
|
||||
'3g2' => 'video/3gpp2',
|
||||
'3gp' => 'video/3gpp',
|
||||
'7z' => 'application/x-7z-compressed',
|
||||
'aab' => 'application/x-authorware-bin',
|
||||
'aac' => 'audio/x-aac',
|
||||
'aam' => 'application/x-authorware-map',
|
||||
'aas' => 'application/x-authorware-seg',
|
||||
'abw' => 'application/x-abiword',
|
||||
'ac' => 'application/pkix-attr-cert',
|
||||
'acc' => 'application/vnd.americandynamics.acc',
|
||||
'ace' => 'application/x-ace-compressed',
|
||||
'acu' => 'application/vnd.acucobol',
|
||||
'acutc' => 'application/vnd.acucorp',
|
||||
'adp' => 'audio/adpcm',
|
||||
'aep' => 'application/vnd.audiograph',
|
||||
'afm' => 'application/x-font-type1',
|
||||
'afp' => 'application/vnd.ibm.modcap',
|
||||
'ahead' => 'application/vnd.ahead.space',
|
||||
'ai' => 'application/postscript',
|
||||
'aif' => 'audio/x-aiff',
|
||||
'aifc' => 'audio/x-aiff',
|
||||
'aiff' => 'audio/x-aiff',
|
||||
'air' => 'application/vnd.adobe.air-application-installer-package+zip',
|
||||
'ait' => 'application/vnd.dvb.ait',
|
||||
'ami' => 'application/vnd.amiga.ami',
|
||||
'apk' => 'application/vnd.android.package-archive',
|
||||
'application' => 'application/x-ms-application',
|
||||
'apr' => 'application/vnd.lotus-approach',
|
||||
'asa' => 'text/plain',
|
||||
'asax' => 'application/octet-stream',
|
||||
'asc' => 'application/pgp-signature',
|
||||
'ascx' => 'text/plain',
|
||||
'asf' => 'video/x-ms-asf',
|
||||
'ashx' => 'text/plain',
|
||||
'asm' => 'text/x-asm',
|
||||
'asmx' => 'text/plain',
|
||||
'aso' => 'application/vnd.accpac.simply.aso',
|
||||
'asp' => 'text/plain',
|
||||
'aspx' => 'text/plain',
|
||||
'asx' => 'video/x-ms-asf',
|
||||
'atc' => 'application/vnd.acucorp',
|
||||
'atom' => 'application/atom+xml',
|
||||
'atomcat' => 'application/atomcat+xml',
|
||||
'atomsvc' => 'application/atomsvc+xml',
|
||||
'atx' => 'application/vnd.antix.game-component',
|
||||
'au' => 'audio/basic',
|
||||
'avi' => 'video/x-msvideo',
|
||||
'aw' => 'application/applixware',
|
||||
'axd' => 'text/plain',
|
||||
'azf' => 'application/vnd.airzip.filesecure.azf',
|
||||
'azs' => 'application/vnd.airzip.filesecure.azs',
|
||||
'azw' => 'application/vnd.amazon.ebook',
|
||||
'bat' => 'application/x-msdownload',
|
||||
'bcpio' => 'application/x-bcpio',
|
||||
'bdf' => 'application/x-font-bdf',
|
||||
'bdm' => 'application/vnd.syncml.dm+wbxml',
|
||||
'bed' => 'application/vnd.realvnc.bed',
|
||||
'bh2' => 'application/vnd.fujitsu.oasysprs',
|
||||
'bin' => 'application/octet-stream',
|
||||
'bmi' => 'application/vnd.bmi',
|
||||
'bmp' => 'image/bmp',
|
||||
'book' => 'application/vnd.framemaker',
|
||||
'box' => 'application/vnd.previewsystems.box',
|
||||
'boz' => 'application/x-bzip2',
|
||||
'bpk' => 'application/octet-stream',
|
||||
'btif' => 'image/prs.btif',
|
||||
'bz' => 'application/x-bzip',
|
||||
'bz2' => 'application/x-bzip2',
|
||||
'c' => 'text/x-c',
|
||||
'c11amc' => 'application/vnd.cluetrust.cartomobile-config',
|
||||
'c11amz' => 'application/vnd.cluetrust.cartomobile-config-pkg',
|
||||
'c4d' => 'application/vnd.clonk.c4group',
|
||||
'c4f' => 'application/vnd.clonk.c4group',
|
||||
'c4g' => 'application/vnd.clonk.c4group',
|
||||
'c4p' => 'application/vnd.clonk.c4group',
|
||||
'c4u' => 'application/vnd.clonk.c4group',
|
||||
'cab' => 'application/vnd.ms-cab-compressed',
|
||||
'car' => 'application/vnd.curl.car',
|
||||
'cat' => 'application/vnd.ms-pki.seccat',
|
||||
'cc' => 'text/x-c',
|
||||
'cct' => 'application/x-director',
|
||||
'ccxml' => 'application/ccxml+xml',
|
||||
'cdbcmsg' => 'application/vnd.contact.cmsg',
|
||||
'cdf' => 'application/x-netcdf',
|
||||
'cdkey' => 'application/vnd.mediastation.cdkey',
|
||||
'cdmia' => 'application/cdmi-capability',
|
||||
'cdmic' => 'application/cdmi-container',
|
||||
'cdmid' => 'application/cdmi-domain',
|
||||
'cdmio' => 'application/cdmi-object',
|
||||
'cdmiq' => 'application/cdmi-queue',
|
||||
'cdx' => 'chemical/x-cdx',
|
||||
'cdxml' => 'application/vnd.chemdraw+xml',
|
||||
'cdy' => 'application/vnd.cinderella',
|
||||
'cer' => 'application/pkix-cert',
|
||||
'cfc' => 'application/x-coldfusion',
|
||||
'cfm' => 'application/x-coldfusion',
|
||||
'cgm' => 'image/cgm',
|
||||
'chat' => 'application/x-chat',
|
||||
'chm' => 'application/vnd.ms-htmlhelp',
|
||||
'chrt' => 'application/vnd.kde.kchart',
|
||||
'cif' => 'chemical/x-cif',
|
||||
'cii' => 'application/vnd.anser-web-certificate-issue-initiation',
|
||||
'cil' => 'application/vnd.ms-artgalry',
|
||||
'cla' => 'application/vnd.claymore',
|
||||
'class' => 'application/java-vm',
|
||||
'clkk' => 'application/vnd.crick.clicker.keyboard',
|
||||
'clkp' => 'application/vnd.crick.clicker.palette',
|
||||
'clkt' => 'application/vnd.crick.clicker.template',
|
||||
'clkw' => 'application/vnd.crick.clicker.wordbank',
|
||||
'clkx' => 'application/vnd.crick.clicker',
|
||||
'clp' => 'application/x-msclip',
|
||||
'cmc' => 'application/vnd.cosmocaller',
|
||||
'cmdf' => 'chemical/x-cmdf',
|
||||
'cml' => 'chemical/x-cml',
|
||||
'cmp' => 'application/vnd.yellowriver-custom-menu',
|
||||
'cmx' => 'image/x-cmx',
|
||||
'cod' => 'application/vnd.rim.cod',
|
||||
'com' => 'application/x-msdownload',
|
||||
'conf' => 'text/plain',
|
||||
'cpio' => 'application/x-cpio',
|
||||
'cpp' => 'text/x-c',
|
||||
'cpt' => 'application/mac-compactpro',
|
||||
'crd' => 'application/x-mscardfile',
|
||||
'crl' => 'application/pkix-crl',
|
||||
'crt' => 'application/x-x509-ca-cert',
|
||||
'cryptonote' => 'application/vnd.rig.cryptonote',
|
||||
'cs' => 'text/plain',
|
||||
'csh' => 'application/x-csh',
|
||||
'csml' => 'chemical/x-csml',
|
||||
'csp' => 'application/vnd.commonspace',
|
||||
'css' => 'text/css',
|
||||
'cst' => 'application/x-director',
|
||||
'csv' => 'text/csv',
|
||||
'cu' => 'application/cu-seeme',
|
||||
'curl' => 'text/vnd.curl',
|
||||
'cww' => 'application/prs.cww',
|
||||
'cxt' => 'application/x-director',
|
||||
'cxx' => 'text/x-c',
|
||||
'dae' => 'model/vnd.collada+xml',
|
||||
'daf' => 'application/vnd.mobius.daf',
|
||||
'dataless' => 'application/vnd.fdsn.seed',
|
||||
'davmount' => 'application/davmount+xml',
|
||||
'dcr' => 'application/x-director',
|
||||
'dcurl' => 'text/vnd.curl.dcurl',
|
||||
'dd2' => 'application/vnd.oma.dd2+xml',
|
||||
'ddd' => 'application/vnd.fujixerox.ddd',
|
||||
'deb' => 'application/x-debian-package',
|
||||
'def' => 'text/plain',
|
||||
'deploy' => 'application/octet-stream',
|
||||
'der' => 'application/x-x509-ca-cert',
|
||||
'dfac' => 'application/vnd.dreamfactory',
|
||||
'dic' => 'text/x-c',
|
||||
'dir' => 'application/x-director',
|
||||
'dis' => 'application/vnd.mobius.dis',
|
||||
'dist' => 'application/octet-stream',
|
||||
'distz' => 'application/octet-stream',
|
||||
'djv' => 'image/vnd.djvu',
|
||||
'djvu' => 'image/vnd.djvu',
|
||||
'dll' => 'application/x-msdownload',
|
||||
'dmg' => 'application/octet-stream',
|
||||
'dms' => 'application/octet-stream',
|
||||
'dna' => 'application/vnd.dna',
|
||||
'doc' => 'application/msword',
|
||||
'docm' => 'application/vnd.ms-word.document.macroenabled.12',
|
||||
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'dot' => 'application/msword',
|
||||
'dotm' => 'application/vnd.ms-word.template.macroenabled.12',
|
||||
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||
'dp' => 'application/vnd.osgi.dp',
|
||||
'dpg' => 'application/vnd.dpgraph',
|
||||
'dra' => 'audio/vnd.dra',
|
||||
'dsc' => 'text/prs.lines.tag',
|
||||
'dssc' => 'application/dssc+der',
|
||||
'dtb' => 'application/x-dtbook+xml',
|
||||
'dtd' => 'application/xml-dtd',
|
||||
'dts' => 'audio/vnd.dts',
|
||||
'dtshd' => 'audio/vnd.dts.hd',
|
||||
'dump' => 'application/octet-stream',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'dwf' => 'model/vnd.dwf',
|
||||
'dwg' => 'image/vnd.dwg',
|
||||
'dxf' => 'image/vnd.dxf',
|
||||
'dxp' => 'application/vnd.spotfire.dxp',
|
||||
'dxr' => 'application/x-director',
|
||||
'ecelp4800' => 'audio/vnd.nuera.ecelp4800',
|
||||
'ecelp7470' => 'audio/vnd.nuera.ecelp7470',
|
||||
'ecelp9600' => 'audio/vnd.nuera.ecelp9600',
|
||||
'ecma' => 'application/ecmascript',
|
||||
'edm' => 'application/vnd.novadigm.edm',
|
||||
'edx' => 'application/vnd.novadigm.edx',
|
||||
'efif' => 'application/vnd.picsel',
|
||||
'ei6' => 'application/vnd.pg.osasli',
|
||||
'elc' => 'application/octet-stream',
|
||||
'eml' => 'message/rfc822',
|
||||
'emma' => 'application/emma+xml',
|
||||
'eol' => 'audio/vnd.digital-winds',
|
||||
'eot' => 'application/vnd.ms-fontobject',
|
||||
'eps' => 'application/postscript',
|
||||
'epub' => 'application/epub+zip',
|
||||
'es3' => 'application/vnd.eszigno3+xml',
|
||||
'esf' => 'application/vnd.epson.esf',
|
||||
'et3' => 'application/vnd.eszigno3+xml',
|
||||
'etx' => 'text/x-setext',
|
||||
'exe' => 'application/x-msdownload',
|
||||
'exi' => 'application/exi',
|
||||
'ext' => 'application/vnd.novadigm.ext',
|
||||
'ez' => 'application/andrew-inset',
|
||||
'ez2' => 'application/vnd.ezpix-album',
|
||||
'ez3' => 'application/vnd.ezpix-package',
|
||||
'f' => 'text/x-fortran',
|
||||
'f4v' => 'video/x-f4v',
|
||||
'f77' => 'text/x-fortran',
|
||||
'f90' => 'text/x-fortran',
|
||||
'fbs' => 'image/vnd.fastbidsheet',
|
||||
'fcs' => 'application/vnd.isac.fcs',
|
||||
'fdf' => 'application/vnd.fdf',
|
||||
'fe_launch' => 'application/vnd.denovo.fcselayout-link',
|
||||
'fg5' => 'application/vnd.fujitsu.oasysgp',
|
||||
'fgd' => 'application/x-director',
|
||||
'fh' => 'image/x-freehand',
|
||||
'fh4' => 'image/x-freehand',
|
||||
'fh5' => 'image/x-freehand',
|
||||
'fh7' => 'image/x-freehand',
|
||||
'fhc' => 'image/x-freehand',
|
||||
'fig' => 'application/x-xfig',
|
||||
'fli' => 'video/x-fli',
|
||||
'flo' => 'application/vnd.micrografx.flo',
|
||||
'flv' => 'video/x-flv',
|
||||
'flw' => 'application/vnd.kde.kivio',
|
||||
'flx' => 'text/vnd.fmi.flexstor',
|
||||
'fly' => 'text/vnd.fly',
|
||||
'fm' => 'application/vnd.framemaker',
|
||||
'fnc' => 'application/vnd.frogans.fnc',
|
||||
'for' => 'text/x-fortran',
|
||||
'fpx' => 'image/vnd.fpx',
|
||||
'frame' => 'application/vnd.framemaker',
|
||||
'fsc' => 'application/vnd.fsc.weblaunch',
|
||||
'fst' => 'image/vnd.fst',
|
||||
'ftc' => 'application/vnd.fluxtime.clip',
|
||||
'fti' => 'application/vnd.anser-web-funds-transfer-initiation',
|
||||
'fvt' => 'video/vnd.fvt',
|
||||
'fxp' => 'application/vnd.adobe.fxp',
|
||||
'fxpl' => 'application/vnd.adobe.fxp',
|
||||
'fzs' => 'application/vnd.fuzzysheet',
|
||||
'g2w' => 'application/vnd.geoplan',
|
||||
'g3' => 'image/g3fax',
|
||||
'g3w' => 'application/vnd.geospace',
|
||||
'gac' => 'application/vnd.groove-account',
|
||||
'gdl' => 'model/vnd.gdl',
|
||||
'geo' => 'application/vnd.dynageo',
|
||||
'gex' => 'application/vnd.geometry-explorer',
|
||||
'ggb' => 'application/vnd.geogebra.file',
|
||||
'ggt' => 'application/vnd.geogebra.tool',
|
||||
'ghf' => 'application/vnd.groove-help',
|
||||
'gif' => 'image/gif',
|
||||
'gim' => 'application/vnd.groove-identity-message',
|
||||
'gmx' => 'application/vnd.gmx',
|
||||
'gnumeric' => 'application/x-gnumeric',
|
||||
'gph' => 'application/vnd.flographit',
|
||||
'gqf' => 'application/vnd.grafeq',
|
||||
'gqs' => 'application/vnd.grafeq',
|
||||
'gram' => 'application/srgs',
|
||||
'gre' => 'application/vnd.geometry-explorer',
|
||||
'grv' => 'application/vnd.groove-injector',
|
||||
'grxml' => 'application/srgs+xml',
|
||||
'gsf' => 'application/x-font-ghostscript',
|
||||
'gtar' => 'application/x-gtar',
|
||||
'gtm' => 'application/vnd.groove-tool-message',
|
||||
'gtw' => 'model/vnd.gtw',
|
||||
'gv' => 'text/vnd.graphviz',
|
||||
'gxt' => 'application/vnd.geonext',
|
||||
'h' => 'text/x-c',
|
||||
'h261' => 'video/h261',
|
||||
'h263' => 'video/h263',
|
||||
'h264' => 'video/h264',
|
||||
'hal' => 'application/vnd.hal+xml',
|
||||
'hbci' => 'application/vnd.hbci',
|
||||
'hdf' => 'application/x-hdf',
|
||||
'hh' => 'text/x-c',
|
||||
'hlp' => 'application/winhlp',
|
||||
'hpgl' => 'application/vnd.hp-hpgl',
|
||||
'hpid' => 'application/vnd.hp-hpid',
|
||||
'hps' => 'application/vnd.hp-hps',
|
||||
'hqx' => 'application/mac-binhex40',
|
||||
'hta' => 'application/octet-stream',
|
||||
'htc' => 'text/html',
|
||||
'htke' => 'application/vnd.kenameaapp',
|
||||
'htm' => 'text/html',
|
||||
'html' => 'text/html',
|
||||
'hvd' => 'application/vnd.yamaha.hv-dic',
|
||||
'hvp' => 'application/vnd.yamaha.hv-voice',
|
||||
'hvs' => 'application/vnd.yamaha.hv-script',
|
||||
'i2g' => 'application/vnd.intergeo',
|
||||
'icc' => 'application/vnd.iccprofile',
|
||||
'ice' => 'x-conference/x-cooltalk',
|
||||
'icm' => 'application/vnd.iccprofile',
|
||||
'ico' => 'image/x-icon',
|
||||
'ics' => 'text/calendar',
|
||||
'ief' => 'image/ief',
|
||||
'ifb' => 'text/calendar',
|
||||
'ifm' => 'application/vnd.shana.informed.formdata',
|
||||
'iges' => 'model/iges',
|
||||
'igl' => 'application/vnd.igloader',
|
||||
'igm' => 'application/vnd.insors.igm',
|
||||
'igs' => 'model/iges',
|
||||
'igx' => 'application/vnd.micrografx.igx',
|
||||
'iif' => 'application/vnd.shana.informed.interchange',
|
||||
'imp' => 'application/vnd.accpac.simply.imp',
|
||||
'ims' => 'application/vnd.ms-ims',
|
||||
'in' => 'text/plain',
|
||||
'ini' => 'text/plain',
|
||||
'ipfix' => 'application/ipfix',
|
||||
'ipk' => 'application/vnd.shana.informed.package',
|
||||
'irm' => 'application/vnd.ibm.rights-management',
|
||||
'irp' => 'application/vnd.irepository.package+xml',
|
||||
'iso' => 'application/octet-stream',
|
||||
'itp' => 'application/vnd.shana.informed.formtemplate',
|
||||
'ivp' => 'application/vnd.immervision-ivp',
|
||||
'ivu' => 'application/vnd.immervision-ivu',
|
||||
'jad' => 'text/vnd.sun.j2me.app-descriptor',
|
||||
'jam' => 'application/vnd.jam',
|
||||
'jar' => 'application/java-archive',
|
||||
'java' => 'text/x-java-source',
|
||||
'jisp' => 'application/vnd.jisp',
|
||||
'jlt' => 'application/vnd.hp-jlyt',
|
||||
'jnlp' => 'application/x-java-jnlp-file',
|
||||
'joda' => 'application/vnd.joost.joda-archive',
|
||||
'jpe' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'jpg' => 'image/jpeg',
|
||||
'jpgm' => 'video/jpm',
|
||||
'jpgv' => 'video/jpeg',
|
||||
'jpm' => 'video/jpm',
|
||||
'js' => 'text/javascript',
|
||||
'json' => 'application/json',
|
||||
'kar' => 'audio/midi',
|
||||
'karbon' => 'application/vnd.kde.karbon',
|
||||
'kfo' => 'application/vnd.kde.kformula',
|
||||
'kia' => 'application/vnd.kidspiration',
|
||||
'kml' => 'application/vnd.google-earth.kml+xml',
|
||||
'kmz' => 'application/vnd.google-earth.kmz',
|
||||
'kne' => 'application/vnd.kinar',
|
||||
'knp' => 'application/vnd.kinar',
|
||||
'kon' => 'application/vnd.kde.kontour',
|
||||
'kpr' => 'application/vnd.kde.kpresenter',
|
||||
'kpt' => 'application/vnd.kde.kpresenter',
|
||||
'ksp' => 'application/vnd.kde.kspread',
|
||||
'ktr' => 'application/vnd.kahootz',
|
||||
'ktx' => 'image/ktx',
|
||||
'ktz' => 'application/vnd.kahootz',
|
||||
'kwd' => 'application/vnd.kde.kword',
|
||||
'kwt' => 'application/vnd.kde.kword',
|
||||
'lasxml' => 'application/vnd.las.las+xml',
|
||||
'latex' => 'application/x-latex',
|
||||
'lbd' => 'application/vnd.llamagraphics.life-balance.desktop',
|
||||
'lbe' => 'application/vnd.llamagraphics.life-balance.exchange+xml',
|
||||
'les' => 'application/vnd.hhe.lesson-player',
|
||||
'lha' => 'application/octet-stream',
|
||||
'link66' => 'application/vnd.route66.link66+xml',
|
||||
'list' => 'text/plain',
|
||||
'list3820' => 'application/vnd.ibm.modcap',
|
||||
'listafp' => 'application/vnd.ibm.modcap',
|
||||
'log' => 'text/plain',
|
||||
'lostxml' => 'application/lost+xml',
|
||||
'lrf' => 'application/octet-stream',
|
||||
'lrm' => 'application/vnd.ms-lrm',
|
||||
'ltf' => 'application/vnd.frogans.ltf',
|
||||
'lvp' => 'audio/vnd.lucent.voice',
|
||||
'lwp' => 'application/vnd.lotus-wordpro',
|
||||
'lzh' => 'application/octet-stream',
|
||||
'm13' => 'application/x-msmediaview',
|
||||
'm14' => 'application/x-msmediaview',
|
||||
'm1v' => 'video/mpeg',
|
||||
'm21' => 'application/mp21',
|
||||
'm2a' => 'audio/mpeg',
|
||||
'm2v' => 'video/mpeg',
|
||||
'm3a' => 'audio/mpeg',
|
||||
'm3u' => 'audio/x-mpegurl',
|
||||
'm3u8' => 'application/vnd.apple.mpegurl',
|
||||
'm4a' => 'audio/mp4',
|
||||
'm4u' => 'video/vnd.mpegurl',
|
||||
'm4v' => 'video/mp4',
|
||||
'ma' => 'application/mathematica',
|
||||
'mads' => 'application/mads+xml',
|
||||
'mag' => 'application/vnd.ecowin.chart',
|
||||
'maker' => 'application/vnd.framemaker',
|
||||
'man' => 'text/troff',
|
||||
'mathml' => 'application/mathml+xml',
|
||||
'mb' => 'application/mathematica',
|
||||
'mbk' => 'application/vnd.mobius.mbk',
|
||||
'mbox' => 'application/mbox',
|
||||
'mc1' => 'application/vnd.medcalcdata',
|
||||
'mcd' => 'application/vnd.mcd',
|
||||
'mcurl' => 'text/vnd.curl.mcurl',
|
||||
'mdb' => 'application/x-msaccess',
|
||||
'mdi' => 'image/vnd.ms-modi',
|
||||
'me' => 'text/troff',
|
||||
'mesh' => 'model/mesh',
|
||||
'meta4' => 'application/metalink4+xml',
|
||||
'mets' => 'application/mets+xml',
|
||||
'mfm' => 'application/vnd.mfmp',
|
||||
'mgp' => 'application/vnd.osgeo.mapguide.package',
|
||||
'mgz' => 'application/vnd.proteus.magazine',
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mif' => 'application/vnd.mif',
|
||||
'mime' => 'message/rfc822',
|
||||
'mj2' => 'video/mj2',
|
||||
'mjp2' => 'video/mj2',
|
||||
'mlp' => 'application/vnd.dolby.mlp',
|
||||
'mmd' => 'application/vnd.chipnuts.karaoke-mmd',
|
||||
'mmf' => 'application/vnd.smaf',
|
||||
'mmr' => 'image/vnd.fujixerox.edmics-mmr',
|
||||
'mny' => 'application/x-msmoney',
|
||||
'mobi' => 'application/x-mobipocket-ebook',
|
||||
'mods' => 'application/mods+xml',
|
||||
'mov' => 'video/quicktime',
|
||||
'movie' => 'video/x-sgi-movie',
|
||||
'mp2' => 'audio/mpeg',
|
||||
'mp21' => 'application/mp21',
|
||||
'mp2a' => 'audio/mpeg',
|
||||
'mp3' => 'audio/mpeg',
|
||||
'mp4' => 'video/mp4',
|
||||
'mp4a' => 'audio/mp4',
|
||||
'mp4s' => 'application/mp4',
|
||||
'mp4v' => 'video/mp4',
|
||||
'mpc' => 'application/vnd.mophun.certificate',
|
||||
'mpe' => 'video/mpeg',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpg4' => 'video/mp4',
|
||||
'mpga' => 'audio/mpeg',
|
||||
'mpkg' => 'application/vnd.apple.installer+xml',
|
||||
'mpm' => 'application/vnd.blueice.multipass',
|
||||
'mpn' => 'application/vnd.mophun.application',
|
||||
'mpp' => 'application/vnd.ms-project',
|
||||
'mpt' => 'application/vnd.ms-project',
|
||||
'mpy' => 'application/vnd.ibm.minipay',
|
||||
'mqy' => 'application/vnd.mobius.mqy',
|
||||
'mrc' => 'application/marc',
|
||||
'mrcx' => 'application/marcxml+xml',
|
||||
'ms' => 'text/troff',
|
||||
'mscml' => 'application/mediaservercontrol+xml',
|
||||
'mseed' => 'application/vnd.fdsn.mseed',
|
||||
'mseq' => 'application/vnd.mseq',
|
||||
'msf' => 'application/vnd.epson.msf',
|
||||
'msh' => 'model/mesh',
|
||||
'msi' => 'application/x-msdownload',
|
||||
'msl' => 'application/vnd.mobius.msl',
|
||||
'msty' => 'application/vnd.muvee.style',
|
||||
'mts' => 'model/vnd.mts',
|
||||
'mus' => 'application/vnd.musician',
|
||||
'musicxml' => 'application/vnd.recordare.musicxml+xml',
|
||||
'mvb' => 'application/x-msmediaview',
|
||||
'mwf' => 'application/vnd.mfer',
|
||||
'mxf' => 'application/mxf',
|
||||
'mxl' => 'application/vnd.recordare.musicxml',
|
||||
'mxml' => 'application/xv+xml',
|
||||
'mxs' => 'application/vnd.triscape.mxs',
|
||||
'mxu' => 'video/vnd.mpegurl',
|
||||
'n-gage' => 'application/vnd.nokia.n-gage.symbian.install',
|
||||
'n3' => 'text/n3',
|
||||
'nb' => 'application/mathematica',
|
||||
'nbp' => 'application/vnd.wolfram.player',
|
||||
'nc' => 'application/x-netcdf',
|
||||
'ncx' => 'application/x-dtbncx+xml',
|
||||
'ngdat' => 'application/vnd.nokia.n-gage.data',
|
||||
'nlu' => 'application/vnd.neurolanguage.nlu',
|
||||
'nml' => 'application/vnd.enliven',
|
||||
'nnd' => 'application/vnd.noblenet-directory',
|
||||
'nns' => 'application/vnd.noblenet-sealer',
|
||||
'nnw' => 'application/vnd.noblenet-web',
|
||||
'npx' => 'image/vnd.net-fpx',
|
||||
'nsf' => 'application/vnd.lotus-notes',
|
||||
'oa2' => 'application/vnd.fujitsu.oasys2',
|
||||
'oa3' => 'application/vnd.fujitsu.oasys3',
|
||||
'oas' => 'application/vnd.fujitsu.oasys',
|
||||
'obd' => 'application/x-msbinder',
|
||||
'oda' => 'application/oda',
|
||||
'odb' => 'application/vnd.oasis.opendocument.database',
|
||||
'odc' => 'application/vnd.oasis.opendocument.chart',
|
||||
'odf' => 'application/vnd.oasis.opendocument.formula',
|
||||
'odft' => 'application/vnd.oasis.opendocument.formula-template',
|
||||
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
||||
'odi' => 'application/vnd.oasis.opendocument.image',
|
||||
'odm' => 'application/vnd.oasis.opendocument.text-master',
|
||||
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
||||
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
||||
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||
'oga' => 'audio/ogg',
|
||||
'ogg' => 'audio/ogg',
|
||||
'ogv' => 'video/ogg',
|
||||
'ogx' => 'application/ogg',
|
||||
'onepkg' => 'application/onenote',
|
||||
'onetmp' => 'application/onenote',
|
||||
'onetoc' => 'application/onenote',
|
||||
'onetoc2' => 'application/onenote',
|
||||
'opf' => 'application/oebps-package+xml',
|
||||
'oprc' => 'application/vnd.palm',
|
||||
'org' => 'application/vnd.lotus-organizer',
|
||||
'osf' => 'application/vnd.yamaha.openscoreformat',
|
||||
'osfpvg' => 'application/vnd.yamaha.openscoreformat.osfpvg+xml',
|
||||
'otc' => 'application/vnd.oasis.opendocument.chart-template',
|
||||
'otf' => 'application/x-font-otf',
|
||||
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
|
||||
'oth' => 'application/vnd.oasis.opendocument.text-web',
|
||||
'oti' => 'application/vnd.oasis.opendocument.image-template',
|
||||
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
|
||||
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
|
||||
'ott' => 'application/vnd.oasis.opendocument.text-template',
|
||||
'oxt' => 'application/vnd.openofficeorg.extension',
|
||||
'p' => 'text/x-pascal',
|
||||
'p10' => 'application/pkcs10',
|
||||
'p12' => 'application/x-pkcs12',
|
||||
'p7b' => 'application/x-pkcs7-certificates',
|
||||
'p7c' => 'application/pkcs7-mime',
|
||||
'p7m' => 'application/pkcs7-mime',
|
||||
'p7r' => 'application/x-pkcs7-certreqresp',
|
||||
'p7s' => 'application/pkcs7-signature',
|
||||
'p8' => 'application/pkcs8',
|
||||
'pas' => 'text/x-pascal',
|
||||
'paw' => 'application/vnd.pawaafile',
|
||||
'pbd' => 'application/vnd.powerbuilder6',
|
||||
'pbm' => 'image/x-portable-bitmap',
|
||||
'pcf' => 'application/x-font-pcf',
|
||||
'pcl' => 'application/vnd.hp-pcl',
|
||||
'pclxl' => 'application/vnd.hp-pclxl',
|
||||
'pct' => 'image/x-pict',
|
||||
'pcurl' => 'application/vnd.curl.pcurl',
|
||||
'pcx' => 'image/x-pcx',
|
||||
'pdb' => 'application/vnd.palm',
|
||||
'pdf' => 'application/pdf',
|
||||
'pfa' => 'application/x-font-type1',
|
||||
'pfb' => 'application/x-font-type1',
|
||||
'pfm' => 'application/x-font-type1',
|
||||
'pfr' => 'application/font-tdpfr',
|
||||
'pfx' => 'application/x-pkcs12',
|
||||
'pgm' => 'image/x-portable-graymap',
|
||||
'pgn' => 'application/x-chess-pgn',
|
||||
'pgp' => 'application/pgp-encrypted',
|
||||
'php' => 'text/x-php',
|
||||
'phps' => 'application/x-httpd-phps',
|
||||
'pic' => 'image/x-pict',
|
||||
'pkg' => 'application/octet-stream',
|
||||
'pki' => 'application/pkixcmp',
|
||||
'pkipath' => 'application/pkix-pkipath',
|
||||
'plb' => 'application/vnd.3gpp.pic-bw-large',
|
||||
'plc' => 'application/vnd.mobius.plc',
|
||||
'plf' => 'application/vnd.pocketlearn',
|
||||
'pls' => 'application/pls+xml',
|
||||
'pml' => 'application/vnd.ctc-posml',
|
||||
'png' => 'image/png',
|
||||
'pnm' => 'image/x-portable-anymap',
|
||||
'portpkg' => 'application/vnd.macports.portpkg',
|
||||
'pot' => 'application/vnd.ms-powerpoint',
|
||||
'potm' => 'application/vnd.ms-powerpoint.template.macroenabled.12',
|
||||
'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
|
||||
'ppam' => 'application/vnd.ms-powerpoint.addin.macroenabled.12',
|
||||
'ppd' => 'application/vnd.cups-ppd',
|
||||
'ppm' => 'image/x-portable-pixmap',
|
||||
'pps' => 'application/vnd.ms-powerpoint',
|
||||
'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroenabled.12',
|
||||
'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
||||
'ppt' => 'application/vnd.ms-powerpoint',
|
||||
'pptm' => 'application/vnd.ms-powerpoint.presentation.macroenabled.12',
|
||||
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'pqa' => 'application/vnd.palm',
|
||||
'prc' => 'application/x-mobipocket-ebook',
|
||||
'pre' => 'application/vnd.lotus-freelance',
|
||||
'prf' => 'application/pics-rules',
|
||||
'ps' => 'application/postscript',
|
||||
'psb' => 'application/vnd.3gpp.pic-bw-small',
|
||||
'psd' => 'image/vnd.adobe.photoshop',
|
||||
'psf' => 'application/x-font-linux-psf',
|
||||
'pskcxml' => 'application/pskc+xml',
|
||||
'ptid' => 'application/vnd.pvi.ptid1',
|
||||
'pub' => 'application/x-mspublisher',
|
||||
'pvb' => 'application/vnd.3gpp.pic-bw-var',
|
||||
'pwn' => 'application/vnd.3m.post-it-notes',
|
||||
'pya' => 'audio/vnd.ms-playready.media.pya',
|
||||
'pyv' => 'video/vnd.ms-playready.media.pyv',
|
||||
'qam' => 'application/vnd.epson.quickanime',
|
||||
'qbo' => 'application/vnd.intu.qbo',
|
||||
'qfx' => 'application/vnd.intu.qfx',
|
||||
'qps' => 'application/vnd.publishare-delta-tree',
|
||||
'qt' => 'video/quicktime',
|
||||
'qwd' => 'application/vnd.quark.quarkxpress',
|
||||
'qwt' => 'application/vnd.quark.quarkxpress',
|
||||
'qxb' => 'application/vnd.quark.quarkxpress',
|
||||
'qxd' => 'application/vnd.quark.quarkxpress',
|
||||
'qxl' => 'application/vnd.quark.quarkxpress',
|
||||
'qxt' => 'application/vnd.quark.quarkxpress',
|
||||
'ra' => 'audio/x-pn-realaudio',
|
||||
'ram' => 'audio/x-pn-realaudio',
|
||||
'rar' => 'application/x-rar-compressed',
|
||||
'ras' => 'image/x-cmu-raster',
|
||||
'rb' => 'text/plain',
|
||||
'rcprofile' => 'application/vnd.ipunplugged.rcprofile',
|
||||
'rdf' => 'application/rdf+xml',
|
||||
'rdz' => 'application/vnd.data-vision.rdz',
|
||||
'rep' => 'application/vnd.businessobjects',
|
||||
'res' => 'application/x-dtbresource+xml',
|
||||
'resx' => 'text/xml',
|
||||
'rgb' => 'image/x-rgb',
|
||||
'rif' => 'application/reginfo+xml',
|
||||
'rip' => 'audio/vnd.rip',
|
||||
'rl' => 'application/resource-lists+xml',
|
||||
'rlc' => 'image/vnd.fujixerox.edmics-rlc',
|
||||
'rld' => 'application/resource-lists-diff+xml',
|
||||
'rm' => 'application/vnd.rn-realmedia',
|
||||
'rmi' => 'audio/midi',
|
||||
'rmp' => 'audio/x-pn-realaudio-plugin',
|
||||
'rms' => 'application/vnd.jcp.javame.midlet-rms',
|
||||
'rnc' => 'application/relax-ng-compact-syntax',
|
||||
'roff' => 'text/troff',
|
||||
'rp9' => 'application/vnd.cloanto.rp9',
|
||||
'rpss' => 'application/vnd.nokia.radio-presets',
|
||||
'rpst' => 'application/vnd.nokia.radio-preset',
|
||||
'rq' => 'application/sparql-query',
|
||||
'rs' => 'application/rls-services+xml',
|
||||
'rsd' => 'application/rsd+xml',
|
||||
'rss' => 'application/rss+xml',
|
||||
'rtf' => 'application/rtf',
|
||||
'rtx' => 'text/richtext',
|
||||
's' => 'text/x-asm',
|
||||
'saf' => 'application/vnd.yamaha.smaf-audio',
|
||||
'sbml' => 'application/sbml+xml',
|
||||
'sc' => 'application/vnd.ibm.secure-container',
|
||||
'scd' => 'application/x-msschedule',
|
||||
'scm' => 'application/vnd.lotus-screencam',
|
||||
'scq' => 'application/scvp-cv-request',
|
||||
'scs' => 'application/scvp-cv-response',
|
||||
'scurl' => 'text/vnd.curl.scurl',
|
||||
'sda' => 'application/vnd.stardivision.draw',
|
||||
'sdc' => 'application/vnd.stardivision.calc',
|
||||
'sdd' => 'application/vnd.stardivision.impress',
|
||||
'sdkd' => 'application/vnd.solent.sdkm+xml',
|
||||
'sdkm' => 'application/vnd.solent.sdkm+xml',
|
||||
'sdp' => 'application/sdp',
|
||||
'sdw' => 'application/vnd.stardivision.writer',
|
||||
'see' => 'application/vnd.seemail',
|
||||
'seed' => 'application/vnd.fdsn.seed',
|
||||
'sema' => 'application/vnd.sema',
|
||||
'semd' => 'application/vnd.semd',
|
||||
'semf' => 'application/vnd.semf',
|
||||
'ser' => 'application/java-serialized-object',
|
||||
'setpay' => 'application/set-payment-initiation',
|
||||
'setreg' => 'application/set-registration-initiation',
|
||||
'sfd-hdstx' => 'application/vnd.hydrostatix.sof-data',
|
||||
'sfs' => 'application/vnd.spotfire.sfs',
|
||||
'sgl' => 'application/vnd.stardivision.writer-global',
|
||||
'sgm' => 'text/sgml',
|
||||
'sgml' => 'text/sgml',
|
||||
'sh' => 'application/x-sh',
|
||||
'shar' => 'application/x-shar',
|
||||
'shf' => 'application/shf+xml',
|
||||
'sig' => 'application/pgp-signature',
|
||||
'silo' => 'model/mesh',
|
||||
'sis' => 'application/vnd.symbian.install',
|
||||
'sisx' => 'application/vnd.symbian.install',
|
||||
'sit' => 'application/x-stuffit',
|
||||
'sitx' => 'application/x-stuffitx',
|
||||
'skd' => 'application/vnd.koan',
|
||||
'skm' => 'application/vnd.koan',
|
||||
'skp' => 'application/vnd.koan',
|
||||
'skt' => 'application/vnd.koan',
|
||||
'sldm' => 'application/vnd.ms-powerpoint.slide.macroenabled.12',
|
||||
'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
|
||||
'slt' => 'application/vnd.epson.salt',
|
||||
'sm' => 'application/vnd.stepmania.stepchart',
|
||||
'smf' => 'application/vnd.stardivision.math',
|
||||
'smi' => 'application/smil+xml',
|
||||
'smil' => 'application/smil+xml',
|
||||
'snd' => 'audio/basic',
|
||||
'snf' => 'application/x-font-snf',
|
||||
'so' => 'application/octet-stream',
|
||||
'spc' => 'application/x-pkcs7-certificates',
|
||||
'spf' => 'application/vnd.yamaha.smaf-phrase',
|
||||
'spl' => 'application/x-futuresplash',
|
||||
'spot' => 'text/vnd.in3d.spot',
|
||||
'spp' => 'application/scvp-vp-response',
|
||||
'spq' => 'application/scvp-vp-request',
|
||||
'spx' => 'audio/ogg',
|
||||
'src' => 'application/x-wais-source',
|
||||
'sru' => 'application/sru+xml',
|
||||
'srx' => 'application/sparql-results+xml',
|
||||
'sse' => 'application/vnd.kodak-descriptor',
|
||||
'ssf' => 'application/vnd.epson.ssf',
|
||||
'ssml' => 'application/ssml+xml',
|
||||
'st' => 'application/vnd.sailingtracker.track',
|
||||
'stc' => 'application/vnd.sun.xml.calc.template',
|
||||
'std' => 'application/vnd.sun.xml.draw.template',
|
||||
'stf' => 'application/vnd.wt.stf',
|
||||
'sti' => 'application/vnd.sun.xml.impress.template',
|
||||
'stk' => 'application/hyperstudio',
|
||||
'stl' => 'application/vnd.ms-pki.stl',
|
||||
'str' => 'application/vnd.pg.format',
|
||||
'stw' => 'application/vnd.sun.xml.writer.template',
|
||||
'sub' => 'image/vnd.dvb.subtitle',
|
||||
'sus' => 'application/vnd.sus-calendar',
|
||||
'susp' => 'application/vnd.sus-calendar',
|
||||
'sv4cpio' => 'application/x-sv4cpio',
|
||||
'sv4crc' => 'application/x-sv4crc',
|
||||
'svc' => 'application/vnd.dvb.service',
|
||||
'svd' => 'application/vnd.svd',
|
||||
'svg' => 'image/svg+xml',
|
||||
'svgz' => 'image/svg+xml',
|
||||
'swa' => 'application/x-director',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'swi' => 'application/vnd.aristanetworks.swi',
|
||||
'sxc' => 'application/vnd.sun.xml.calc',
|
||||
'sxd' => 'application/vnd.sun.xml.draw',
|
||||
'sxg' => 'application/vnd.sun.xml.writer.global',
|
||||
'sxi' => 'application/vnd.sun.xml.impress',
|
||||
'sxm' => 'application/vnd.sun.xml.math',
|
||||
'sxw' => 'application/vnd.sun.xml.writer',
|
||||
't' => 'text/troff',
|
||||
'tao' => 'application/vnd.tao.intent-module-archive',
|
||||
'tar' => 'application/x-tar',
|
||||
'tcap' => 'application/vnd.3gpp2.tcap',
|
||||
'tcl' => 'application/x-tcl',
|
||||
'teacher' => 'application/vnd.smart.teacher',
|
||||
'tei' => 'application/tei+xml',
|
||||
'teicorpus' => 'application/tei+xml',
|
||||
'tex' => 'application/x-tex',
|
||||
'texi' => 'application/x-texinfo',
|
||||
'texinfo' => 'application/x-texinfo',
|
||||
'text' => 'text/plain',
|
||||
'tfi' => 'application/thraud+xml',
|
||||
'tfm' => 'application/x-tex-tfm',
|
||||
'thmx' => 'application/vnd.ms-officetheme',
|
||||
'tif' => 'image/tiff',
|
||||
'tiff' => 'image/tiff',
|
||||
'tmo' => 'application/vnd.tmobile-livetv',
|
||||
'torrent' => 'application/x-bittorrent',
|
||||
'tpl' => 'application/vnd.groove-tool-template',
|
||||
'tpt' => 'application/vnd.trid.tpt',
|
||||
'tr' => 'text/troff',
|
||||
'tra' => 'application/vnd.trueapp',
|
||||
'trm' => 'application/x-msterminal',
|
||||
'tsd' => 'application/timestamped-data',
|
||||
'tsv' => 'text/tab-separated-values',
|
||||
'ttc' => 'application/x-font-ttf',
|
||||
'ttf' => 'application/x-font-ttf',
|
||||
'ttl' => 'text/turtle',
|
||||
'twd' => 'application/vnd.simtech-mindmapper',
|
||||
'twds' => 'application/vnd.simtech-mindmapper',
|
||||
'txd' => 'application/vnd.genomatix.tuxedo',
|
||||
'txf' => 'application/vnd.mobius.txf',
|
||||
'txt' => 'text/plain',
|
||||
'u32' => 'application/x-authorware-bin',
|
||||
'udeb' => 'application/x-debian-package',
|
||||
'ufd' => 'application/vnd.ufdl',
|
||||
'ufdl' => 'application/vnd.ufdl',
|
||||
'umj' => 'application/vnd.umajin',
|
||||
'unityweb' => 'application/vnd.unity',
|
||||
'uoml' => 'application/vnd.uoml+xml',
|
||||
'uri' => 'text/uri-list',
|
||||
'uris' => 'text/uri-list',
|
||||
'urls' => 'text/uri-list',
|
||||
'ustar' => 'application/x-ustar',
|
||||
'utz' => 'application/vnd.uiq.theme',
|
||||
'uu' => 'text/x-uuencode',
|
||||
'uva' => 'audio/vnd.dece.audio',
|
||||
'uvd' => 'application/vnd.dece.data',
|
||||
'uvf' => 'application/vnd.dece.data',
|
||||
'uvg' => 'image/vnd.dece.graphic',
|
||||
'uvh' => 'video/vnd.dece.hd',
|
||||
'uvi' => 'image/vnd.dece.graphic',
|
||||
'uvm' => 'video/vnd.dece.mobile',
|
||||
'uvp' => 'video/vnd.dece.pd',
|
||||
'uvs' => 'video/vnd.dece.sd',
|
||||
'uvt' => 'application/vnd.dece.ttml+xml',
|
||||
'uvu' => 'video/vnd.uvvu.mp4',
|
||||
'uvv' => 'video/vnd.dece.video',
|
||||
'uvva' => 'audio/vnd.dece.audio',
|
||||
'uvvd' => 'application/vnd.dece.data',
|
||||
'uvvf' => 'application/vnd.dece.data',
|
||||
'uvvg' => 'image/vnd.dece.graphic',
|
||||
'uvvh' => 'video/vnd.dece.hd',
|
||||
'uvvi' => 'image/vnd.dece.graphic',
|
||||
'uvvm' => 'video/vnd.dece.mobile',
|
||||
'uvvp' => 'video/vnd.dece.pd',
|
||||
'uvvs' => 'video/vnd.dece.sd',
|
||||
'uvvt' => 'application/vnd.dece.ttml+xml',
|
||||
'uvvu' => 'video/vnd.uvvu.mp4',
|
||||
'uvvv' => 'video/vnd.dece.video',
|
||||
'uvvx' => 'application/vnd.dece.unspecified',
|
||||
'uvx' => 'application/vnd.dece.unspecified',
|
||||
'vcd' => 'application/x-cdlink',
|
||||
'vcf' => 'text/x-vcard',
|
||||
'vcg' => 'application/vnd.groove-vcard',
|
||||
'vcs' => 'text/x-vcalendar',
|
||||
'vcx' => 'application/vnd.vcx',
|
||||
'vis' => 'application/vnd.visionary',
|
||||
'viv' => 'video/vnd.vivo',
|
||||
'vor' => 'application/vnd.stardivision.writer',
|
||||
'vox' => 'application/x-authorware-bin',
|
||||
'vrml' => 'model/vrml',
|
||||
'vsd' => 'application/vnd.visio',
|
||||
'vsf' => 'application/vnd.vsf',
|
||||
'vss' => 'application/vnd.visio',
|
||||
'vst' => 'application/vnd.visio',
|
||||
'vsw' => 'application/vnd.visio',
|
||||
'vtu' => 'model/vnd.vtu',
|
||||
'vxml' => 'application/voicexml+xml',
|
||||
'w3d' => 'application/x-director',
|
||||
'wad' => 'application/x-doom',
|
||||
'wav' => 'audio/x-wav',
|
||||
'wax' => 'audio/x-ms-wax',
|
||||
'wbmp' => 'image/vnd.wap.wbmp',
|
||||
'wbs' => 'application/vnd.criticaltools.wbs+xml',
|
||||
'wbxml' => 'application/vnd.wap.wbxml',
|
||||
'wcm' => 'application/vnd.ms-works',
|
||||
'wdb' => 'application/vnd.ms-works',
|
||||
'weba' => 'audio/webm',
|
||||
'webm' => 'video/webm',
|
||||
'webp' => 'image/webp',
|
||||
'wg' => 'application/vnd.pmi.widget',
|
||||
'wgt' => 'application/widget',
|
||||
'wks' => 'application/vnd.ms-works',
|
||||
'wm' => 'video/x-ms-wm',
|
||||
'wma' => 'audio/x-ms-wma',
|
||||
'wmd' => 'application/x-ms-wmd',
|
||||
'wmf' => 'application/x-msmetafile',
|
||||
'wml' => 'text/vnd.wap.wml',
|
||||
'wmlc' => 'application/vnd.wap.wmlc',
|
||||
'wmls' => 'text/vnd.wap.wmlscript',
|
||||
'wmlsc' => 'application/vnd.wap.wmlscriptc',
|
||||
'wmv' => 'video/x-ms-wmv',
|
||||
'wmx' => 'video/x-ms-wmx',
|
||||
'wmz' => 'application/x-ms-wmz',
|
||||
'woff' => 'application/x-font-woff',
|
||||
'wpd' => 'application/vnd.wordperfect',
|
||||
'wpl' => 'application/vnd.ms-wpl',
|
||||
'wps' => 'application/vnd.ms-works',
|
||||
'wqd' => 'application/vnd.wqd',
|
||||
'wri' => 'application/x-mswrite',
|
||||
'wrl' => 'model/vrml',
|
||||
'wsdl' => 'application/wsdl+xml',
|
||||
'wspolicy' => 'application/wspolicy+xml',
|
||||
'wtb' => 'application/vnd.webturbo',
|
||||
'wvx' => 'video/x-ms-wvx',
|
||||
'x32' => 'application/x-authorware-bin',
|
||||
'x3d' => 'application/vnd.hzn-3d-crossword',
|
||||
'xap' => 'application/x-silverlight-app',
|
||||
'xar' => 'application/vnd.xara',
|
||||
'xbap' => 'application/x-ms-xbap',
|
||||
'xbd' => 'application/vnd.fujixerox.docuworks.binder',
|
||||
'xbm' => 'image/x-xbitmap',
|
||||
'xdf' => 'application/xcap-diff+xml',
|
||||
'xdm' => 'application/vnd.syncml.dm+xml',
|
||||
'xdp' => 'application/vnd.adobe.xdp+xml',
|
||||
'xdssc' => 'application/dssc+xml',
|
||||
'xdw' => 'application/vnd.fujixerox.docuworks',
|
||||
'xenc' => 'application/xenc+xml',
|
||||
'xer' => 'application/patch-ops-error+xml',
|
||||
'xfdf' => 'application/vnd.adobe.xfdf',
|
||||
'xfdl' => 'application/vnd.xfdl',
|
||||
'xht' => 'application/xhtml+xml',
|
||||
'xhtml' => 'application/xhtml+xml',
|
||||
'xhvml' => 'application/xv+xml',
|
||||
'xif' => 'image/vnd.xiff',
|
||||
'xla' => 'application/vnd.ms-excel',
|
||||
'xlam' => 'application/vnd.ms-excel.addin.macroenabled.12',
|
||||
'xlc' => 'application/vnd.ms-excel',
|
||||
'xlm' => 'application/vnd.ms-excel',
|
||||
'xls' => 'application/vnd.ms-excel',
|
||||
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroenabled.12',
|
||||
'xlsm' => 'application/vnd.ms-excel.sheet.macroenabled.12',
|
||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'xlt' => 'application/vnd.ms-excel',
|
||||
'xltm' => 'application/vnd.ms-excel.template.macroenabled.12',
|
||||
'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
||||
'xlw' => 'application/vnd.ms-excel',
|
||||
'xml' => 'application/xml',
|
||||
'xo' => 'application/vnd.olpc-sugar',
|
||||
'xop' => 'application/xop+xml',
|
||||
'xpi' => 'application/x-xpinstall',
|
||||
'xpm' => 'image/x-xpixmap',
|
||||
'xpr' => 'application/vnd.is-xpr',
|
||||
'xps' => 'application/vnd.ms-xpsdocument',
|
||||
'xpw' => 'application/vnd.intercon.formnet',
|
||||
'xpx' => 'application/vnd.intercon.formnet',
|
||||
'xsl' => 'application/xml',
|
||||
'xslt' => 'application/xslt+xml',
|
||||
'xsm' => 'application/vnd.syncml+xml',
|
||||
'xspf' => 'application/xspf+xml',
|
||||
'xul' => 'application/vnd.mozilla.xul+xml',
|
||||
'xvm' => 'application/xv+xml',
|
||||
'xvml' => 'application/xv+xml',
|
||||
'xwd' => 'image/x-xwindowdump',
|
||||
'xyz' => 'chemical/x-xyz',
|
||||
'yaml' => 'text/yaml',
|
||||
'yang' => 'application/yang',
|
||||
'yin' => 'application/yin+xml',
|
||||
'yml' => 'text/yaml',
|
||||
'zaz' => 'application/vnd.zzazz.deck+xml',
|
||||
'zip' => 'application/zip',
|
||||
'zir' => 'application/vnd.zul',
|
||||
'zirz' => 'application/vnd.zul',
|
||||
'zmm' => 'application/vnd.handheld-entertainment+xml'
|
||||
);
|
||||
|
||||
/**
|
||||
* Get a singleton instance of the class
|
||||
*
|
||||
* @return self
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (!self::$instance) {
|
||||
self::$instance = new self();
|
||||
}
|
||||
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a mimetype value from a file extension
|
||||
*
|
||||
* @param string $extension File extension
|
||||
*
|
||||
* @return string|null
|
||||
*
|
||||
*/
|
||||
public function fromExtension($extension)
|
||||
{
|
||||
$extension = strtolower($extension);
|
||||
|
||||
return isset($this->mimetypes[$extension])
|
||||
? $this->mimetypes[$extension]
|
||||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a mimetype from a filename
|
||||
*
|
||||
* @param string $filename Filename to generate a mimetype from
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function fromFilename($filename)
|
||||
{
|
||||
return $this->fromExtension(pathinfo($filename, PATHINFO_EXTENSION));
|
||||
}
|
||||
}
|
||||
333
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Pool.php
vendored
Normal file
333
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Pool.php
vendored
Normal file
@@ -0,0 +1,333 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Event\BeforeEvent;
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\Ring\Core;
|
||||
use GuzzleHttp\Ring\Future\FutureInterface;
|
||||
use GuzzleHttp\Event\ListenerAttacherTrait;
|
||||
use GuzzleHttp\Event\EndEvent;
|
||||
use React\Promise\Deferred;
|
||||
use React\Promise\FulfilledPromise;
|
||||
use React\Promise\PromiseInterface;
|
||||
use React\Promise\RejectedPromise;
|
||||
|
||||
/**
|
||||
* Sends and iterator of requests concurrently using a capped pool size.
|
||||
*
|
||||
* The Pool object implements FutureInterface, meaning it can be used later
|
||||
* when necessary, the requests provided to the pool can be cancelled, and
|
||||
* you can check the state of the pool to know if it has been dereferenced
|
||||
* (sent) or has been cancelled.
|
||||
*
|
||||
* When sending the pool, keep in mind that no results are returned: callers
|
||||
* are expected to handle results asynchronously using Guzzle's event system.
|
||||
* When requests complete, more are added to the pool to ensure that the
|
||||
* requested pool size is always filled as much as possible.
|
||||
*
|
||||
* IMPORTANT: Do not provide a pool size greater that what the utilized
|
||||
* underlying RingPHP handler can support. This will result is extremely poor
|
||||
* performance.
|
||||
*/
|
||||
class Pool implements FutureInterface
|
||||
{
|
||||
use ListenerAttacherTrait;
|
||||
|
||||
/** @var \GuzzleHttp\ClientInterface */
|
||||
private $client;
|
||||
|
||||
/** @var \Iterator Yields requests */
|
||||
private $iter;
|
||||
|
||||
/** @var Deferred */
|
||||
private $deferred;
|
||||
|
||||
/** @var PromiseInterface */
|
||||
private $promise;
|
||||
|
||||
private $waitQueue = [];
|
||||
private $eventListeners = [];
|
||||
private $poolSize;
|
||||
private $isRealized = false;
|
||||
|
||||
/**
|
||||
* The option values for 'before', 'complete', 'error' and 'end' can be a
|
||||
* callable, an associative array containing event data, or an array of
|
||||
* event data arrays. Event data arrays contain the following keys:
|
||||
*
|
||||
* - fn: callable to invoke that receives the event
|
||||
* - priority: Optional event priority (defaults to 0)
|
||||
* - once: Set to true so that the event is removed after it is triggered
|
||||
*
|
||||
* @param ClientInterface $client Client used to send the requests.
|
||||
* @param array|\Iterator $requests Requests to send in parallel
|
||||
* @param array $options Associative array of options
|
||||
* - pool_size: (callable|int) Maximum number of requests to send
|
||||
* concurrently, or a callback that receives
|
||||
* the current queue size and returns the
|
||||
* number of new requests to send
|
||||
* - before: (callable|array) Receives a BeforeEvent
|
||||
* - complete: (callable|array) Receives a CompleteEvent
|
||||
* - error: (callable|array) Receives a ErrorEvent
|
||||
* - end: (callable|array) Receives an EndEvent
|
||||
*/
|
||||
public function __construct(
|
||||
ClientInterface $client,
|
||||
$requests,
|
||||
array $options = []
|
||||
) {
|
||||
$this->client = $client;
|
||||
$this->iter = $this->coerceIterable($requests);
|
||||
$this->deferred = new Deferred();
|
||||
$this->promise = $this->deferred->promise();
|
||||
$this->poolSize = isset($options['pool_size'])
|
||||
? $options['pool_size'] : 25;
|
||||
$this->eventListeners = $this->prepareListeners(
|
||||
$options,
|
||||
['before', 'complete', 'error', 'end']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends multiple requests in parallel and returns an array of responses
|
||||
* and exceptions that uses the same ordering as the provided requests.
|
||||
*
|
||||
* IMPORTANT: This method keeps every request and response in memory, and
|
||||
* as such, is NOT recommended when sending a large number or an
|
||||
* indeterminate number of requests concurrently.
|
||||
*
|
||||
* @param ClientInterface $client Client used to send the requests
|
||||
* @param array|\Iterator $requests Requests to send in parallel
|
||||
* @param array $options Passes through the options available in
|
||||
* {@see GuzzleHttp\Pool::__construct}
|
||||
*
|
||||
* @return BatchResults Returns a container for the results.
|
||||
* @throws \InvalidArgumentException if the event format is incorrect.
|
||||
*/
|
||||
public static function batch(
|
||||
ClientInterface $client,
|
||||
$requests,
|
||||
array $options = []
|
||||
) {
|
||||
$hash = new \SplObjectStorage();
|
||||
foreach ($requests as $request) {
|
||||
$hash->attach($request);
|
||||
}
|
||||
|
||||
// In addition to the normally run events when requests complete, add
|
||||
// and event to continuously track the results of transfers in the hash.
|
||||
(new self($client, $requests, RequestEvents::convertEventArray(
|
||||
$options,
|
||||
['end'],
|
||||
[
|
||||
'priority' => RequestEvents::LATE,
|
||||
'fn' => function (EndEvent $e) use ($hash) {
|
||||
$hash[$e->getRequest()] = $e->getException()
|
||||
? $e->getException()
|
||||
: $e->getResponse();
|
||||
}
|
||||
]
|
||||
)))->wait();
|
||||
|
||||
return new BatchResults($hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Pool and immediately sends the requests.
|
||||
*
|
||||
* @param ClientInterface $client Client used to send the requests
|
||||
* @param array|\Iterator $requests Requests to send in parallel
|
||||
* @param array $options Passes through the options available in
|
||||
* {@see GuzzleHttp\Pool::__construct}
|
||||
*/
|
||||
public static function send(
|
||||
ClientInterface $client,
|
||||
$requests,
|
||||
array $options = []
|
||||
) {
|
||||
$pool = new self($client, $requests, $options);
|
||||
$pool->wait();
|
||||
}
|
||||
|
||||
private function getPoolSize()
|
||||
{
|
||||
return is_callable($this->poolSize)
|
||||
? call_user_func($this->poolSize, count($this->waitQueue))
|
||||
: $this->poolSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add as many requests as possible up to the current pool limit.
|
||||
*/
|
||||
private function addNextRequests()
|
||||
{
|
||||
$limit = max($this->getPoolSize() - count($this->waitQueue), 0);
|
||||
while ($limit--) {
|
||||
if (!$this->addNextRequest()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function wait()
|
||||
{
|
||||
if ($this->isRealized) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Seed the pool with N number of requests.
|
||||
$this->addNextRequests();
|
||||
|
||||
// Stop if the pool was cancelled while transferring requests.
|
||||
if ($this->isRealized) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Wait on any outstanding FutureResponse objects.
|
||||
while ($response = array_pop($this->waitQueue)) {
|
||||
try {
|
||||
$response->wait();
|
||||
} catch (\Exception $e) {
|
||||
// Eat exceptions because they should be handled asynchronously
|
||||
}
|
||||
$this->addNextRequests();
|
||||
}
|
||||
|
||||
// Clean up no longer needed state.
|
||||
$this->isRealized = true;
|
||||
$this->waitQueue = $this->eventListeners = [];
|
||||
$this->client = $this->iter = null;
|
||||
$this->deferred->resolve(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Attempt to cancel all outstanding requests (requests that are queued for
|
||||
* dereferencing). Returns true if all outstanding requests can be
|
||||
* cancelled.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function cancel()
|
||||
{
|
||||
if ($this->isRealized) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$success = $this->isRealized = true;
|
||||
foreach ($this->waitQueue as $response) {
|
||||
if (!$response->cancel()) {
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a promise that is invoked when the pool completed. There will be
|
||||
* no passed value.
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function then(
|
||||
callable $onFulfilled = null,
|
||||
callable $onRejected = null,
|
||||
callable $onProgress = null
|
||||
) {
|
||||
return $this->promise->then($onFulfilled, $onRejected, $onProgress);
|
||||
}
|
||||
|
||||
public function promise()
|
||||
{
|
||||
return $this->promise;
|
||||
}
|
||||
|
||||
private function coerceIterable($requests)
|
||||
{
|
||||
if ($requests instanceof \Iterator) {
|
||||
return $requests;
|
||||
} elseif (is_array($requests)) {
|
||||
return new \ArrayIterator($requests);
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException('Expected Iterator or array. '
|
||||
. 'Found ' . Core::describeType($requests));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the next request to pool and tracks what requests need to be
|
||||
* dereferenced when completing the pool.
|
||||
*/
|
||||
private function addNextRequest()
|
||||
{
|
||||
add_next:
|
||||
|
||||
if ($this->isRealized || !$this->iter || !$this->iter->valid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$request = $this->iter->current();
|
||||
$this->iter->next();
|
||||
|
||||
if (!($request instanceof RequestInterface)) {
|
||||
throw new \InvalidArgumentException(sprintf(
|
||||
'All requests in the provided iterator must implement '
|
||||
. 'RequestInterface. Found %s',
|
||||
Core::describeType($request)
|
||||
));
|
||||
}
|
||||
|
||||
// Be sure to use "lazy" futures, meaning they do not send right away.
|
||||
$request->getConfig()->set('future', 'lazy');
|
||||
$hash = spl_object_hash($request);
|
||||
$this->attachListeners($request, $this->eventListeners);
|
||||
$request->getEmitter()->on('before', [$this, '_trackRetries'], RequestEvents::EARLY);
|
||||
$response = $this->client->send($request);
|
||||
$this->waitQueue[$hash] = $response;
|
||||
$promise = $response->promise();
|
||||
|
||||
// Don't recursively call itself for completed or rejected responses.
|
||||
if ($promise instanceof FulfilledPromise
|
||||
|| $promise instanceof RejectedPromise
|
||||
) {
|
||||
try {
|
||||
$this->finishResponse($request, $response->wait(), $hash);
|
||||
} catch (\Exception $e) {
|
||||
$this->finishResponse($request, $e, $hash);
|
||||
}
|
||||
goto add_next;
|
||||
}
|
||||
|
||||
// Use this function for both resolution and rejection.
|
||||
$thenFn = function ($value) use ($request, $hash) {
|
||||
$this->finishResponse($request, $value, $hash);
|
||||
if (!$request->getConfig()->get('_pool_retries')) {
|
||||
$this->addNextRequests();
|
||||
}
|
||||
};
|
||||
|
||||
$promise->then($thenFn, $thenFn);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function _trackRetries(BeforeEvent $e)
|
||||
{
|
||||
$e->getRequest()->getConfig()->set('_pool_retries', $e->getRetryCount());
|
||||
}
|
||||
|
||||
private function finishResponse($request, $value, $hash)
|
||||
{
|
||||
unset($this->waitQueue[$hash]);
|
||||
$result = $value instanceof ResponseInterface
|
||||
? ['request' => $request, 'response' => $value, 'error' => null]
|
||||
: ['request' => $request, 'response' => null, 'error' => $value];
|
||||
$this->deferred->notify($result);
|
||||
}
|
||||
}
|
||||
109
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
vendored
Normal file
109
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Post;
|
||||
|
||||
use GuzzleHttp\Stream\AppendStream;
|
||||
use GuzzleHttp\Stream\Stream;
|
||||
use GuzzleHttp\Stream\StreamDecoratorTrait;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Stream that when read returns bytes for a streaming multipart/form-data body
|
||||
*/
|
||||
class MultipartBody implements StreamInterface
|
||||
{
|
||||
use StreamDecoratorTrait;
|
||||
|
||||
private $boundary;
|
||||
|
||||
/**
|
||||
* @param array $fields Associative array of field names to values where
|
||||
* each value is a string or array of strings.
|
||||
* @param array $files Associative array of PostFileInterface objects
|
||||
* @param string $boundary You can optionally provide a specific boundary
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function __construct(
|
||||
array $fields = [],
|
||||
array $files = [],
|
||||
$boundary = null
|
||||
) {
|
||||
$this->boundary = $boundary ?: uniqid();
|
||||
$this->stream = $this->createStream($fields, $files);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the boundary
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBoundary()
|
||||
{
|
||||
return $this->boundary;
|
||||
}
|
||||
|
||||
public function isWritable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string needed to transfer a POST field
|
||||
*/
|
||||
private function getFieldString($name, $value)
|
||||
{
|
||||
return sprintf(
|
||||
"--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n",
|
||||
$this->boundary,
|
||||
$name,
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the headers needed before transferring the content of a POST file
|
||||
*/
|
||||
private function getFileHeaders(PostFileInterface $file)
|
||||
{
|
||||
$headers = '';
|
||||
foreach ($file->getHeaders() as $key => $value) {
|
||||
$headers .= "{$key}: {$value}\r\n";
|
||||
}
|
||||
|
||||
return "--{$this->boundary}\r\n" . trim($headers) . "\r\n\r\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the aggregate stream that will be used to upload the POST data
|
||||
*/
|
||||
protected function createStream(array $fields, array $files)
|
||||
{
|
||||
$stream = new AppendStream();
|
||||
|
||||
foreach ($fields as $name => $fieldValues) {
|
||||
foreach ((array) $fieldValues as $value) {
|
||||
$stream->addStream(
|
||||
Stream::factory($this->getFieldString($name, $value))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($files as $file) {
|
||||
|
||||
if (!$file instanceof PostFileInterface) {
|
||||
throw new \InvalidArgumentException('All POST fields must '
|
||||
. 'implement PostFieldInterface');
|
||||
}
|
||||
|
||||
$stream->addStream(
|
||||
Stream::factory($this->getFileHeaders($file))
|
||||
);
|
||||
$stream->addStream($file->getContent());
|
||||
$stream->addStream(Stream::factory("\r\n"));
|
||||
}
|
||||
|
||||
// Add the trailing boundary with CRLF
|
||||
$stream->addStream(Stream::factory("--{$this->boundary}--\r\n"));
|
||||
|
||||
return $stream;
|
||||
}
|
||||
}
|
||||
287
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
vendored
Normal file
287
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
vendored
Normal file
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Post;
|
||||
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Stream\Exception\CannotAttachException;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
use GuzzleHttp\Stream\Stream;
|
||||
use GuzzleHttp\Query;
|
||||
|
||||
/**
|
||||
* Holds POST fields and files and creates a streaming body when read methods
|
||||
* are called on the object.
|
||||
*/
|
||||
class PostBody implements PostBodyInterface
|
||||
{
|
||||
/** @var StreamInterface */
|
||||
private $body;
|
||||
|
||||
/** @var callable */
|
||||
private $aggregator;
|
||||
|
||||
private $fields = [];
|
||||
|
||||
/** @var PostFileInterface[] */
|
||||
private $files = [];
|
||||
private $forceMultipart = false;
|
||||
private $detached = false;
|
||||
|
||||
/**
|
||||
* Applies request headers to a request based on the POST state
|
||||
*
|
||||
* @param RequestInterface $request Request to update
|
||||
*/
|
||||
public function applyRequestHeaders(RequestInterface $request)
|
||||
{
|
||||
if ($this->files || $this->forceMultipart) {
|
||||
$request->setHeader(
|
||||
'Content-Type',
|
||||
'multipart/form-data; boundary=' . $this->getBody()->getBoundary()
|
||||
);
|
||||
} elseif ($this->fields && !$request->hasHeader('Content-Type')) {
|
||||
$request->setHeader(
|
||||
'Content-Type',
|
||||
'application/x-www-form-urlencoded'
|
||||
);
|
||||
}
|
||||
|
||||
if ($size = $this->getSize()) {
|
||||
$request->setHeader('Content-Length', $size);
|
||||
}
|
||||
}
|
||||
|
||||
public function forceMultipartUpload($force)
|
||||
{
|
||||
$this->forceMultipart = $force;
|
||||
}
|
||||
|
||||
public function setAggregator(callable $aggregator)
|
||||
{
|
||||
$this->aggregator = $aggregator;
|
||||
}
|
||||
|
||||
public function setField($name, $value)
|
||||
{
|
||||
$this->fields[$name] = $value;
|
||||
$this->mutate();
|
||||
}
|
||||
|
||||
public function replaceFields(array $fields)
|
||||
{
|
||||
$this->fields = $fields;
|
||||
$this->mutate();
|
||||
}
|
||||
|
||||
public function getField($name)
|
||||
{
|
||||
return isset($this->fields[$name]) ? $this->fields[$name] : null;
|
||||
}
|
||||
|
||||
public function removeField($name)
|
||||
{
|
||||
unset($this->fields[$name]);
|
||||
$this->mutate();
|
||||
}
|
||||
|
||||
public function getFields($asString = false)
|
||||
{
|
||||
if (!$asString) {
|
||||
return $this->fields;
|
||||
}
|
||||
|
||||
$query = new Query($this->fields);
|
||||
$query->setEncodingType(Query::RFC1738);
|
||||
$query->setAggregator($this->getAggregator());
|
||||
|
||||
return (string) $query;
|
||||
}
|
||||
|
||||
public function hasField($name)
|
||||
{
|
||||
return isset($this->fields[$name]);
|
||||
}
|
||||
|
||||
public function getFile($name)
|
||||
{
|
||||
foreach ($this->files as $file) {
|
||||
if ($file->getName() == $name) {
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getFiles()
|
||||
{
|
||||
return $this->files;
|
||||
}
|
||||
|
||||
public function addFile(PostFileInterface $file)
|
||||
{
|
||||
$this->files[] = $file;
|
||||
$this->mutate();
|
||||
}
|
||||
|
||||
public function clearFiles()
|
||||
{
|
||||
$this->files = [];
|
||||
$this->mutate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the numbers of fields + files
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->files) + count($this->fields);
|
||||
}
|
||||
|
||||
public function __toString()
|
||||
{
|
||||
return (string) $this->getBody();
|
||||
}
|
||||
|
||||
public function getContents($maxLength = -1)
|
||||
{
|
||||
return $this->getBody()->getContents();
|
||||
}
|
||||
|
||||
public function close()
|
||||
{
|
||||
$this->detach();
|
||||
}
|
||||
|
||||
public function detach()
|
||||
{
|
||||
$this->detached = true;
|
||||
$this->fields = $this->files = [];
|
||||
|
||||
if ($this->body) {
|
||||
$this->body->close();
|
||||
$this->body = null;
|
||||
}
|
||||
}
|
||||
|
||||
public function attach($stream)
|
||||
{
|
||||
throw new CannotAttachException();
|
||||
}
|
||||
|
||||
public function eof()
|
||||
{
|
||||
return $this->getBody()->eof();
|
||||
}
|
||||
|
||||
public function tell()
|
||||
{
|
||||
return $this->body ? $this->body->tell() : 0;
|
||||
}
|
||||
|
||||
public function isSeekable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isReadable()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isWritable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
{
|
||||
return $this->getBody()->getSize();
|
||||
}
|
||||
|
||||
public function seek($offset, $whence = SEEK_SET)
|
||||
{
|
||||
return $this->getBody()->seek($offset, $whence);
|
||||
}
|
||||
|
||||
public function read($length)
|
||||
{
|
||||
return $this->getBody()->read($length);
|
||||
}
|
||||
|
||||
public function write($string)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getMetadata($key = null)
|
||||
{
|
||||
return $key ? null : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a stream object that is built from the POST fields and files.
|
||||
*
|
||||
* If one has already been created, the previously created stream will be
|
||||
* returned.
|
||||
*/
|
||||
private function getBody()
|
||||
{
|
||||
if ($this->body) {
|
||||
return $this->body;
|
||||
} elseif ($this->files || $this->forceMultipart) {
|
||||
return $this->body = $this->createMultipart();
|
||||
} elseif ($this->fields) {
|
||||
return $this->body = $this->createUrlEncoded();
|
||||
} else {
|
||||
return $this->body = Stream::factory();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the aggregator used to join multi-valued field parameters
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
final protected function getAggregator()
|
||||
{
|
||||
if (!$this->aggregator) {
|
||||
$this->aggregator = Query::phpAggregator();
|
||||
}
|
||||
|
||||
return $this->aggregator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a multipart/form-data body stream
|
||||
*
|
||||
* @return MultipartBody
|
||||
*/
|
||||
private function createMultipart()
|
||||
{
|
||||
// Flatten the nested query string values using the correct aggregator
|
||||
return new MultipartBody(
|
||||
call_user_func($this->getAggregator(), $this->fields),
|
||||
$this->files
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an application/x-www-form-urlencoded stream body
|
||||
*
|
||||
* @return StreamInterface
|
||||
*/
|
||||
private function createUrlEncoded()
|
||||
{
|
||||
return Stream::factory($this->getFields(true));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rid of any cached data
|
||||
*/
|
||||
private function mutate()
|
||||
{
|
||||
$this->body = null;
|
||||
}
|
||||
}
|
||||
109
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php
vendored
Normal file
109
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Post;
|
||||
|
||||
use GuzzleHttp\Message\AppliesHeadersInterface;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Represents a POST body that is sent as either a multipart/form-data stream
|
||||
* or application/x-www-urlencoded stream.
|
||||
*/
|
||||
interface PostBodyInterface extends StreamInterface, \Countable, AppliesHeadersInterface
|
||||
{
|
||||
/**
|
||||
* Set a specific field
|
||||
*
|
||||
* @param string $name Name of the field to set
|
||||
* @param string|array $value Value to set
|
||||
*/
|
||||
public function setField($name, $value);
|
||||
|
||||
/**
|
||||
* Set the aggregation strategy that will be used to turn multi-valued
|
||||
* fields into a string.
|
||||
*
|
||||
* The aggregation function accepts a deeply nested array of query string
|
||||
* values and returns a flattened associative array of key value pairs.
|
||||
*
|
||||
* @param callable $aggregator
|
||||
*/
|
||||
public function setAggregator(callable $aggregator);
|
||||
|
||||
/**
|
||||
* Set to true to force a multipart upload even if there are no files.
|
||||
*
|
||||
* @param bool $force Set to true to force multipart uploads or false to
|
||||
* remove this flag.
|
||||
*/
|
||||
public function forceMultipartUpload($force);
|
||||
|
||||
/**
|
||||
* Replace all existing form fields with an array of fields
|
||||
*
|
||||
* @param array $fields Associative array of fields to set
|
||||
*/
|
||||
public function replaceFields(array $fields);
|
||||
|
||||
/**
|
||||
* Get a specific field by name
|
||||
*
|
||||
* @param string $name Name of the POST field to retrieve
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getField($name);
|
||||
|
||||
/**
|
||||
* Remove a field by name
|
||||
*
|
||||
* @param string $name Name of the field to remove
|
||||
*/
|
||||
public function removeField($name);
|
||||
|
||||
/**
|
||||
* Returns an associative array of names to values or a query string.
|
||||
*
|
||||
* @param bool $asString Set to true to retrieve the fields as a query
|
||||
* string.
|
||||
*
|
||||
* @return array|string
|
||||
*/
|
||||
public function getFields($asString = false);
|
||||
|
||||
/**
|
||||
* Returns true if a field is set
|
||||
*
|
||||
* @param string $name Name of the field to set
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasField($name);
|
||||
|
||||
/**
|
||||
* Get all of the files
|
||||
*
|
||||
* @return array Returns an array of PostFileInterface objects
|
||||
*/
|
||||
public function getFiles();
|
||||
|
||||
/**
|
||||
* Get a POST file by name.
|
||||
*
|
||||
* @param string $name Name of the POST file to retrieve
|
||||
*
|
||||
* @return PostFileInterface|null
|
||||
*/
|
||||
public function getFile($name);
|
||||
|
||||
/**
|
||||
* Add a file to the POST
|
||||
*
|
||||
* @param PostFileInterface $file File to add
|
||||
*/
|
||||
public function addFile(PostFileInterface $file);
|
||||
|
||||
/**
|
||||
* Remove all files from the collection
|
||||
*/
|
||||
public function clearFiles();
|
||||
}
|
||||
135
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostFile.php
vendored
Normal file
135
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostFile.php
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Post;
|
||||
|
||||
use GuzzleHttp\Mimetypes;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
use GuzzleHttp\Stream\Stream;
|
||||
|
||||
/**
|
||||
* Post file upload
|
||||
*/
|
||||
class PostFile implements PostFileInterface
|
||||
{
|
||||
private $name;
|
||||
private $filename;
|
||||
private $content;
|
||||
private $headers = [];
|
||||
|
||||
/**
|
||||
* @param string $name Name of the form field
|
||||
* @param mixed $content Data to send
|
||||
* @param string|null $filename Filename content-disposition attribute
|
||||
* @param array $headers Array of headers to set on the file
|
||||
* (can override any default headers)
|
||||
* @throws \RuntimeException when filename is not passed or can't be determined
|
||||
*/
|
||||
public function __construct(
|
||||
$name,
|
||||
$content,
|
||||
$filename = null,
|
||||
array $headers = []
|
||||
) {
|
||||
$this->headers = $headers;
|
||||
$this->name = $name;
|
||||
$this->prepareContent($content);
|
||||
$this->prepareFilename($filename);
|
||||
$this->prepareDefaultHeaders();
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getFilename()
|
||||
{
|
||||
return $this->filename;
|
||||
}
|
||||
|
||||
public function getContent()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
public function getHeaders()
|
||||
{
|
||||
return $this->headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the contents of a POST file.
|
||||
*
|
||||
* @param mixed $content Content of the POST file
|
||||
*/
|
||||
private function prepareContent($content)
|
||||
{
|
||||
$this->content = $content;
|
||||
|
||||
if (!($this->content instanceof StreamInterface)) {
|
||||
$this->content = Stream::factory($this->content);
|
||||
} elseif ($this->content instanceof MultipartBody) {
|
||||
if (!$this->hasHeader('Content-Disposition')) {
|
||||
$disposition = 'form-data; name="' . $this->name .'"';
|
||||
$this->headers['Content-Disposition'] = $disposition;
|
||||
}
|
||||
|
||||
if (!$this->hasHeader('Content-Type')) {
|
||||
$this->headers['Content-Type'] = sprintf(
|
||||
"multipart/form-data; boundary=%s",
|
||||
$this->content->getBoundary()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies a file name to the POST file based on various checks.
|
||||
*
|
||||
* @param string|null $filename Filename to apply (or null to guess)
|
||||
*/
|
||||
private function prepareFilename($filename)
|
||||
{
|
||||
$this->filename = $filename;
|
||||
|
||||
if (!$this->filename) {
|
||||
$this->filename = $this->content->getMetadata('uri');
|
||||
}
|
||||
|
||||
if (!$this->filename || substr($this->filename, 0, 6) === 'php://') {
|
||||
$this->filename = $this->name;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies default Content-Disposition and Content-Type headers if needed.
|
||||
*/
|
||||
private function prepareDefaultHeaders()
|
||||
{
|
||||
// Set a default content-disposition header if one was no provided
|
||||
if (!$this->hasHeader('Content-Disposition')) {
|
||||
$this->headers['Content-Disposition'] = sprintf(
|
||||
'form-data; name="%s"; filename="%s"',
|
||||
$this->name,
|
||||
basename($this->filename)
|
||||
);
|
||||
}
|
||||
|
||||
// Set a default Content-Type if one was not supplied
|
||||
if (!$this->hasHeader('Content-Type')) {
|
||||
$this->headers['Content-Type'] = Mimetypes::getInstance()
|
||||
->fromFilename($this->filename) ?: 'text/plain';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a specific header exists on the POST file by name.
|
||||
*
|
||||
* @param string $name Case-insensitive header to check
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function hasHeader($name)
|
||||
{
|
||||
return isset(array_change_key_case($this->headers)[strtolower($name)]);
|
||||
}
|
||||
}
|
||||
41
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostFileInterface.php
vendored
Normal file
41
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/PostFileInterface.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Post;
|
||||
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Post file upload interface
|
||||
*/
|
||||
interface PostFileInterface
|
||||
{
|
||||
/**
|
||||
* Get the name of the form field
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName();
|
||||
|
||||
/**
|
||||
* Get the full path to the file
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getFilename();
|
||||
|
||||
/**
|
||||
* Get the content
|
||||
*
|
||||
* @return StreamInterface
|
||||
*/
|
||||
public function getContent();
|
||||
|
||||
/**
|
||||
* Gets all POST file headers.
|
||||
*
|
||||
* The keys represent the header name as it will be sent over the wire, and
|
||||
* each value is a string.
|
||||
*
|
||||
* @return array Returns an associative array of the file's headers.
|
||||
*/
|
||||
public function getHeaders();
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Post/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;
|
||||
204
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Query.php
vendored
Normal file
204
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Query.php
vendored
Normal file
@@ -0,0 +1,204 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
/**
|
||||
* Manages query string variables and can aggregate them into a string
|
||||
*/
|
||||
class Query extends Collection
|
||||
{
|
||||
const RFC3986 = 'RFC3986';
|
||||
const RFC1738 = 'RFC1738';
|
||||
|
||||
/** @var callable Encoding function */
|
||||
private $encoding = 'rawurlencode';
|
||||
/** @var callable */
|
||||
private $aggregator;
|
||||
|
||||
/**
|
||||
* Parse a query string into a Query object
|
||||
*
|
||||
* $urlEncoding is used to control how the query string is parsed and how
|
||||
* it is ultimately serialized. The value can be set to one of the
|
||||
* following:
|
||||
*
|
||||
* - true: (default) Parse query strings using RFC 3986 while still
|
||||
* converting "+" to " ".
|
||||
* - false: Disables URL decoding of the input string and URL encoding when
|
||||
* the query string is serialized.
|
||||
* - 'RFC3986': Use RFC 3986 URL encoding/decoding
|
||||
* - 'RFC1738': Use RFC 1738 URL encoding/decoding
|
||||
*
|
||||
* @param string $query Query string to parse
|
||||
* @param bool|string $urlEncoding Controls how the input string is decoded
|
||||
* and encoded.
|
||||
* @return self
|
||||
*/
|
||||
public static function fromString($query, $urlEncoding = true)
|
||||
{
|
||||
static $qp;
|
||||
if (!$qp) {
|
||||
$qp = new QueryParser();
|
||||
}
|
||||
|
||||
$q = new static();
|
||||
|
||||
if ($urlEncoding !== true) {
|
||||
$q->setEncodingType($urlEncoding);
|
||||
}
|
||||
|
||||
$qp->parseInto($q, $query, $urlEncoding);
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the query string parameters to a query string string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
if (!$this->data) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// The default aggregator is statically cached
|
||||
static $defaultAggregator;
|
||||
|
||||
if (!$this->aggregator) {
|
||||
if (!$defaultAggregator) {
|
||||
$defaultAggregator = self::phpAggregator();
|
||||
}
|
||||
$this->aggregator = $defaultAggregator;
|
||||
}
|
||||
|
||||
$result = '';
|
||||
$aggregator = $this->aggregator;
|
||||
$encoder = $this->encoding;
|
||||
|
||||
foreach ($aggregator($this->data) as $key => $values) {
|
||||
foreach ($values as $value) {
|
||||
if ($result) {
|
||||
$result .= '&';
|
||||
}
|
||||
$result .= $encoder($key);
|
||||
if ($value !== null) {
|
||||
$result .= '=' . $encoder($value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Controls how multi-valued query string parameters are aggregated into a
|
||||
* string.
|
||||
*
|
||||
* $query->setAggregator($query::duplicateAggregator());
|
||||
*
|
||||
* @param callable $aggregator Callable used to convert a deeply nested
|
||||
* array of query string variables into a flattened array of key value
|
||||
* pairs. The callable accepts an array of query data and returns a
|
||||
* flattened array of key value pairs where each value is an array of
|
||||
* strings.
|
||||
*/
|
||||
public function setAggregator(callable $aggregator)
|
||||
{
|
||||
$this->aggregator = $aggregator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify how values are URL encoded
|
||||
*
|
||||
* @param string|bool $type One of 'RFC1738', 'RFC3986', or false to disable encoding
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function setEncodingType($type)
|
||||
{
|
||||
switch ($type) {
|
||||
case self::RFC3986:
|
||||
$this->encoding = 'rawurlencode';
|
||||
break;
|
||||
case self::RFC1738:
|
||||
$this->encoding = 'urlencode';
|
||||
break;
|
||||
case false:
|
||||
$this->encoding = function ($v) { return $v; };
|
||||
break;
|
||||
default:
|
||||
throw new \InvalidArgumentException('Invalid URL encoding type');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Query string aggregator that does not aggregate nested query string
|
||||
* values and allows duplicates in the resulting array.
|
||||
*
|
||||
* Example: http://test.com?q=1&q=2
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public static function duplicateAggregator()
|
||||
{
|
||||
return function (array $data) {
|
||||
return self::walkQuery($data, '', function ($key, $prefix) {
|
||||
return is_int($key) ? $prefix : "{$prefix}[{$key}]";
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggregates nested query string variables using the same technique as
|
||||
* ``http_build_query()``.
|
||||
*
|
||||
* @param bool $numericIndices Pass false to not include numeric indices
|
||||
* when multi-values query string parameters are present.
|
||||
*
|
||||
* @return callable
|
||||
*/
|
||||
public static function phpAggregator($numericIndices = true)
|
||||
{
|
||||
return function (array $data) use ($numericIndices) {
|
||||
return self::walkQuery(
|
||||
$data,
|
||||
'',
|
||||
function ($key, $prefix) use ($numericIndices) {
|
||||
return !$numericIndices && is_int($key)
|
||||
? "{$prefix}[]"
|
||||
: "{$prefix}[{$key}]";
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Easily create query aggregation functions by providing a key prefix
|
||||
* function to this query string array walker.
|
||||
*
|
||||
* @param array $query Query string to walk
|
||||
* @param string $keyPrefix Key prefix (start with '')
|
||||
* @param callable $prefixer Function used to create a key prefix
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function walkQuery(array $query, $keyPrefix, callable $prefixer)
|
||||
{
|
||||
$result = [];
|
||||
foreach ($query as $key => $value) {
|
||||
if ($keyPrefix) {
|
||||
$key = $prefixer($key, $keyPrefix);
|
||||
}
|
||||
if (is_array($value)) {
|
||||
$result += self::walkQuery($value, $key, $prefixer);
|
||||
} elseif (isset($result[$key])) {
|
||||
$result[$key][] = $value;
|
||||
} else {
|
||||
$result[$key] = array($value);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
163
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/QueryParser.php
vendored
Normal file
163
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/QueryParser.php
vendored
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
/**
|
||||
* Parses query strings into a Query object.
|
||||
*
|
||||
* While parsing, the parser will attempt to determine the most appropriate
|
||||
* query string aggregator to use when serializing the parsed query string
|
||||
* object back into a string. The hope is that parsing then serializing a
|
||||
* query string should be a lossless operation.
|
||||
*
|
||||
* @internal Use Query::fromString()
|
||||
*/
|
||||
class QueryParser
|
||||
{
|
||||
private $duplicates;
|
||||
private $numericIndices;
|
||||
|
||||
/**
|
||||
* Parse a query string into a Query object.
|
||||
*
|
||||
* @param Query $query Query object to populate
|
||||
* @param string $str Query string to parse
|
||||
* @param bool|string $urlEncoding How the query string is encoded
|
||||
*/
|
||||
public function parseInto(Query $query, $str, $urlEncoding = true)
|
||||
{
|
||||
if ($str === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
$result = [];
|
||||
$this->duplicates = false;
|
||||
$this->numericIndices = true;
|
||||
$decoder = self::getDecoder($urlEncoding);
|
||||
|
||||
foreach (explode('&', $str) as $kvp) {
|
||||
|
||||
$parts = explode('=', $kvp, 2);
|
||||
$key = $decoder($parts[0]);
|
||||
$value = isset($parts[1]) ? $decoder($parts[1]) : null;
|
||||
|
||||
// Special handling needs to be taken for PHP nested array syntax
|
||||
if (strpos($key, '[') !== false) {
|
||||
$this->parsePhpValue($key, $value, $result);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isset($result[$key])) {
|
||||
$result[$key] = $value;
|
||||
} else {
|
||||
$this->duplicates = true;
|
||||
if (!is_array($result[$key])) {
|
||||
$result[$key] = [$result[$key]];
|
||||
}
|
||||
$result[$key][] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$query->replace($result);
|
||||
|
||||
if (!$this->numericIndices) {
|
||||
$query->setAggregator(Query::phpAggregator(false));
|
||||
} elseif ($this->duplicates) {
|
||||
$query->setAggregator(Query::duplicateAggregator());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a callable that is used to URL decode query keys and values.
|
||||
*
|
||||
* @param string|bool $type One of true, false, RFC3986, and RFC1738
|
||||
*
|
||||
* @return callable|string
|
||||
*/
|
||||
private static function getDecoder($type)
|
||||
{
|
||||
if ($type === true) {
|
||||
return function ($value) {
|
||||
return rawurldecode(str_replace('+', ' ', $value));
|
||||
};
|
||||
} elseif ($type == Query::RFC3986) {
|
||||
return 'rawurldecode';
|
||||
} elseif ($type == Query::RFC1738) {
|
||||
return 'urldecode';
|
||||
} else {
|
||||
return function ($str) { return $str; };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a PHP style key value pair.
|
||||
*
|
||||
* @param string $key Key to parse (e.g., "foo[a][b]")
|
||||
* @param string|null $value Value to set
|
||||
* @param array $result Result to modify by reference
|
||||
*/
|
||||
private function parsePhpValue($key, $value, array &$result)
|
||||
{
|
||||
$node =& $result;
|
||||
$keyBuffer = '';
|
||||
|
||||
for ($i = 0, $t = strlen($key); $i < $t; $i++) {
|
||||
switch ($key[$i]) {
|
||||
case '[':
|
||||
if ($keyBuffer) {
|
||||
$this->prepareNode($node, $keyBuffer);
|
||||
$node =& $node[$keyBuffer];
|
||||
$keyBuffer = '';
|
||||
}
|
||||
break;
|
||||
case ']':
|
||||
$k = $this->cleanKey($node, $keyBuffer);
|
||||
$this->prepareNode($node, $k);
|
||||
$node =& $node[$k];
|
||||
$keyBuffer = '';
|
||||
break;
|
||||
default:
|
||||
$keyBuffer .= $key[$i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($node)) {
|
||||
$this->duplicates = true;
|
||||
$node[] = $value;
|
||||
} else {
|
||||
$node = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares a value in the array at the given key.
|
||||
*
|
||||
* If the key already exists, the key value is converted into an array.
|
||||
*
|
||||
* @param array $node Result node to modify
|
||||
* @param string $key Key to add or modify in the node
|
||||
*/
|
||||
private function prepareNode(&$node, $key)
|
||||
{
|
||||
if (!isset($node[$key])) {
|
||||
$node[$key] = null;
|
||||
} elseif (!is_array($node[$key])) {
|
||||
$node[$key] = [$node[$key]];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the appropriate key based on the node and key.
|
||||
*/
|
||||
private function cleanKey($node, $key)
|
||||
{
|
||||
if ($key === '') {
|
||||
$key = $node ? (string) count($node) : 0;
|
||||
// Found a [] key, so track this to ensure that we disable numeric
|
||||
// indexing of keys in the resolved query aggregator.
|
||||
$this->numericIndices = false;
|
||||
}
|
||||
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
153
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/RequestFsm.php
vendored
Normal file
153
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/RequestFsm.php
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Event\BeforeEvent;
|
||||
use GuzzleHttp\Event\ErrorEvent;
|
||||
use GuzzleHttp\Event\CompleteEvent;
|
||||
use GuzzleHttp\Event\EndEvent;
|
||||
use GuzzleHttp\Exception\StateException;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Message\FutureResponse;
|
||||
use GuzzleHttp\Message\MessageFactoryInterface;
|
||||
use GuzzleHttp\Ring\Future\FutureInterface;
|
||||
|
||||
/**
|
||||
* Responsible for transitioning requests through lifecycle events.
|
||||
*/
|
||||
class RequestFsm
|
||||
{
|
||||
private $handler;
|
||||
private $mf;
|
||||
private $maxTransitions;
|
||||
|
||||
public function __construct(
|
||||
callable $handler,
|
||||
MessageFactoryInterface $messageFactory,
|
||||
$maxTransitions = 200
|
||||
) {
|
||||
$this->mf = $messageFactory;
|
||||
$this->maxTransitions = $maxTransitions;
|
||||
$this->handler = $handler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the state machine until a terminal state is entered or the
|
||||
* optionally supplied $finalState is entered.
|
||||
*
|
||||
* @param Transaction $trans Transaction being transitioned.
|
||||
*
|
||||
* @throws \Exception if a terminal state throws an exception.
|
||||
*/
|
||||
public function __invoke(Transaction $trans)
|
||||
{
|
||||
$trans->_transitionCount = 0;
|
||||
|
||||
if (!$trans->state) {
|
||||
$trans->state = 'before';
|
||||
}
|
||||
|
||||
transition:
|
||||
|
||||
if (++$trans->_transitionCount > $this->maxTransitions) {
|
||||
throw new StateException("Too many state transitions were "
|
||||
. "encountered ({$trans->_transitionCount}). This likely "
|
||||
. "means that a combination of event listeners are in an "
|
||||
. "infinite loop.");
|
||||
}
|
||||
|
||||
switch ($trans->state) {
|
||||
case 'before': goto before;
|
||||
case 'complete': goto complete;
|
||||
case 'error': goto error;
|
||||
case 'retry': goto retry;
|
||||
case 'send': goto send;
|
||||
case 'end': goto end;
|
||||
default: throw new StateException("Invalid state: {$trans->state}");
|
||||
}
|
||||
|
||||
before: {
|
||||
try {
|
||||
$trans->request->getEmitter()->emit('before', new BeforeEvent($trans));
|
||||
$trans->state = 'send';
|
||||
if ((bool) $trans->response) {
|
||||
$trans->state = 'complete';
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$trans->state = 'error';
|
||||
$trans->exception = $e;
|
||||
}
|
||||
goto transition;
|
||||
}
|
||||
|
||||
complete: {
|
||||
try {
|
||||
if ($trans->response instanceof FutureInterface) {
|
||||
// Futures will have their own end events emitted when
|
||||
// dereferenced.
|
||||
return;
|
||||
}
|
||||
$trans->state = 'end';
|
||||
$trans->response->setEffectiveUrl($trans->request->getUrl());
|
||||
$trans->request->getEmitter()->emit('complete', new CompleteEvent($trans));
|
||||
} catch (\Exception $e) {
|
||||
$trans->state = 'error';
|
||||
$trans->exception = $e;
|
||||
}
|
||||
goto transition;
|
||||
}
|
||||
|
||||
error: {
|
||||
try {
|
||||
// Convert non-request exception to a wrapped exception
|
||||
$trans->exception = RequestException::wrapException(
|
||||
$trans->request, $trans->exception
|
||||
);
|
||||
$trans->state = 'end';
|
||||
$trans->request->getEmitter()->emit('error', new ErrorEvent($trans));
|
||||
// An intercepted request (not retried) transitions to complete
|
||||
if (!$trans->exception && $trans->state !== 'retry') {
|
||||
$trans->state = 'complete';
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$trans->state = 'end';
|
||||
$trans->exception = $e;
|
||||
}
|
||||
goto transition;
|
||||
}
|
||||
|
||||
retry: {
|
||||
$trans->retries++;
|
||||
$trans->response = null;
|
||||
$trans->exception = null;
|
||||
$trans->state = 'before';
|
||||
goto transition;
|
||||
}
|
||||
|
||||
send: {
|
||||
$fn = $this->handler;
|
||||
$trans->response = FutureResponse::proxy(
|
||||
$fn(RingBridge::prepareRingRequest($trans)),
|
||||
function ($value) use ($trans) {
|
||||
RingBridge::completeRingResponse($trans, $value, $this->mf, $this);
|
||||
$this($trans);
|
||||
return $trans->response;
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
end: {
|
||||
$trans->request->getEmitter()->emit('end', new EndEvent($trans));
|
||||
// Throw exceptions in the terminal event if the exception
|
||||
// was not handled by an "end" event listener.
|
||||
if ($trans->exception) {
|
||||
if (!($trans->exception instanceof RequestException)) {
|
||||
$trans->exception = RequestException::wrapException(
|
||||
$trans->request, $trans->exception
|
||||
);
|
||||
}
|
||||
throw $trans->exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
165
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/RingBridge.php
vendored
Normal file
165
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/RingBridge.php
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
namespace GuzzleHttp;
|
||||
|
||||
use GuzzleHttp\Message\MessageFactoryInterface;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Event\ProgressEvent;
|
||||
use GuzzleHttp\Message\Request;
|
||||
use GuzzleHttp\Ring\Core;
|
||||
use GuzzleHttp\Stream\Stream;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
|
||||
/**
|
||||
* Provides the bridge between Guzzle requests and responses and Guzzle Ring.
|
||||
*/
|
||||
class RingBridge
|
||||
{
|
||||
/**
|
||||
* Creates a Ring request from a request object.
|
||||
*
|
||||
* This function does not hook up the "then" and "progress" events that
|
||||
* would be required for actually sending a Guzzle request through a
|
||||
* RingPHP handler.
|
||||
*
|
||||
* @param RequestInterface $request Request to convert.
|
||||
*
|
||||
* @return array Converted Guzzle Ring request.
|
||||
*/
|
||||
public static function createRingRequest(RequestInterface $request)
|
||||
{
|
||||
$options = $request->getConfig()->toArray();
|
||||
$url = $request->getUrl();
|
||||
// No need to calculate the query string twice (in URL and query).
|
||||
$qs = ($pos = strpos($url, '?')) ? substr($url, $pos + 1) : null;
|
||||
|
||||
return [
|
||||
'scheme' => $request->getScheme(),
|
||||
'http_method' => $request->getMethod(),
|
||||
'url' => $url,
|
||||
'uri' => $request->getPath(),
|
||||
'headers' => $request->getHeaders(),
|
||||
'body' => $request->getBody(),
|
||||
'version' => $request->getProtocolVersion(),
|
||||
'client' => $options,
|
||||
'query_string' => $qs,
|
||||
'future' => isset($options['future']) ? $options['future'] : false
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Ring request from a request object AND prepares the callbacks.
|
||||
*
|
||||
* @param Transaction $trans Transaction to update.
|
||||
*
|
||||
* @return array Converted Guzzle Ring request.
|
||||
*/
|
||||
public static function prepareRingRequest(Transaction $trans)
|
||||
{
|
||||
// Clear out the transaction state when initiating.
|
||||
$trans->exception = null;
|
||||
$request = self::createRingRequest($trans->request);
|
||||
|
||||
// Emit progress events if any progress listeners are registered.
|
||||
if ($trans->request->getEmitter()->hasListeners('progress')) {
|
||||
$emitter = $trans->request->getEmitter();
|
||||
$request['client']['progress'] = function ($a, $b, $c, $d) use ($trans, $emitter) {
|
||||
$emitter->emit('progress', new ProgressEvent($trans, $a, $b, $c, $d));
|
||||
};
|
||||
}
|
||||
|
||||
return $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the process of processing a response received from a ring
|
||||
* handler. The created response is added to the transaction, and the
|
||||
* transaction stat is set appropriately.
|
||||
*
|
||||
* @param Transaction $trans Owns request and response.
|
||||
* @param array $response Ring response array
|
||||
* @param MessageFactoryInterface $messageFactory Creates response objects.
|
||||
*/
|
||||
public static function completeRingResponse(
|
||||
Transaction $trans,
|
||||
array $response,
|
||||
MessageFactoryInterface $messageFactory
|
||||
) {
|
||||
$trans->state = 'complete';
|
||||
$trans->transferInfo = isset($response['transfer_stats'])
|
||||
? $response['transfer_stats'] : [];
|
||||
|
||||
if (!empty($response['status'])) {
|
||||
$options = [];
|
||||
if (isset($response['version'])) {
|
||||
$options['protocol_version'] = $response['version'];
|
||||
}
|
||||
if (isset($response['reason'])) {
|
||||
$options['reason_phrase'] = $response['reason'];
|
||||
}
|
||||
$trans->response = $messageFactory->createResponse(
|
||||
$response['status'],
|
||||
isset($response['headers']) ? $response['headers'] : [],
|
||||
isset($response['body']) ? $response['body'] : null,
|
||||
$options
|
||||
);
|
||||
if (isset($response['effective_url'])) {
|
||||
$trans->response->setEffectiveUrl($response['effective_url']);
|
||||
}
|
||||
} elseif (empty($response['error'])) {
|
||||
// When nothing was returned, then we need to add an error.
|
||||
$response['error'] = self::getNoRingResponseException($trans->request);
|
||||
}
|
||||
|
||||
if (isset($response['error'])) {
|
||||
$trans->state = 'error';
|
||||
$trans->exception = $response['error'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Guzzle request object using a ring request array.
|
||||
*
|
||||
* @param array $request Ring request
|
||||
*
|
||||
* @return Request
|
||||
* @throws \InvalidArgumentException for incomplete requests.
|
||||
*/
|
||||
public static function fromRingRequest(array $request)
|
||||
{
|
||||
$options = [];
|
||||
if (isset($request['version'])) {
|
||||
$options['protocol_version'] = $request['version'];
|
||||
}
|
||||
|
||||
if (!isset($request['http_method'])) {
|
||||
throw new \InvalidArgumentException('No http_method');
|
||||
}
|
||||
|
||||
return new Request(
|
||||
$request['http_method'],
|
||||
Core::url($request),
|
||||
isset($request['headers']) ? $request['headers'] : [],
|
||||
isset($request['body']) ? Stream::factory($request['body']) : null,
|
||||
$options
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an exception that can be used when a RingPHP handler does not
|
||||
* populate a response.
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
*
|
||||
* @return RequestException
|
||||
*/
|
||||
public static function getNoRingResponseException(RequestInterface $request)
|
||||
{
|
||||
$message = <<<EOT
|
||||
Sending the request did not return a response, exception, or populate the
|
||||
transaction with a response. This is most likely due to an incorrectly
|
||||
implemented RingPHP handler. If you are simply trying to mock responses,
|
||||
then it is recommended to use the GuzzleHttp\Ring\Client\MockHandler.
|
||||
EOT;
|
||||
return new RequestException($message, $request);
|
||||
}
|
||||
}
|
||||
58
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Cookie.php
vendored
Normal file
58
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Cookie.php
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Subscriber;
|
||||
|
||||
use GuzzleHttp\Cookie\CookieJar;
|
||||
use GuzzleHttp\Cookie\CookieJarInterface;
|
||||
use GuzzleHttp\Event\BeforeEvent;
|
||||
use GuzzleHttp\Event\CompleteEvent;
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Event\SubscriberInterface;
|
||||
|
||||
/**
|
||||
* Adds, extracts, and persists cookies between HTTP requests
|
||||
*/
|
||||
class Cookie implements SubscriberInterface
|
||||
{
|
||||
/** @var CookieJarInterface */
|
||||
private $cookieJar;
|
||||
|
||||
/**
|
||||
* @param CookieJarInterface $cookieJar Cookie jar used to hold cookies
|
||||
*/
|
||||
public function __construct(CookieJarInterface $cookieJar = null)
|
||||
{
|
||||
$this->cookieJar = $cookieJar ?: new CookieJar();
|
||||
}
|
||||
|
||||
public function getEvents()
|
||||
{
|
||||
// Fire the cookie plugin complete event before redirecting
|
||||
return [
|
||||
'before' => ['onBefore'],
|
||||
'complete' => ['onComplete', RequestEvents::REDIRECT_RESPONSE + 10]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the cookie cookieJar
|
||||
*
|
||||
* @return CookieJarInterface
|
||||
*/
|
||||
public function getCookieJar()
|
||||
{
|
||||
return $this->cookieJar;
|
||||
}
|
||||
|
||||
public function onBefore(BeforeEvent $event)
|
||||
{
|
||||
$this->cookieJar->addCookieHeader($event->getRequest());
|
||||
}
|
||||
|
||||
public function onComplete(CompleteEvent $event)
|
||||
{
|
||||
$this->cookieJar->extractCookies(
|
||||
$event->getRequest(),
|
||||
$event->getResponse()
|
||||
);
|
||||
}
|
||||
}
|
||||
172
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/History.php
vendored
Normal file
172
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/History.php
vendored
Normal file
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Subscriber;
|
||||
|
||||
use GuzzleHttp\Event\CompleteEvent;
|
||||
use GuzzleHttp\Event\ErrorEvent;
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Event\SubscriberInterface;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Maintains a list of requests and responses sent using a request or client
|
||||
*/
|
||||
class History implements SubscriberInterface, \IteratorAggregate, \Countable
|
||||
{
|
||||
/** @var int The maximum number of requests to maintain in the history */
|
||||
private $limit;
|
||||
|
||||
/** @var array Requests and responses that have passed through the plugin */
|
||||
private $transactions = [];
|
||||
|
||||
public function __construct($limit = 10)
|
||||
{
|
||||
$this->limit = $limit;
|
||||
}
|
||||
|
||||
public function getEvents()
|
||||
{
|
||||
return [
|
||||
'complete' => ['onComplete', RequestEvents::EARLY],
|
||||
'error' => ['onError', RequestEvents::EARLY],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert to a string that contains all request and response headers
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
$lines = array();
|
||||
foreach ($this->transactions as $entry) {
|
||||
$response = isset($entry['response']) ? $entry['response'] : '';
|
||||
$lines[] = '> ' . trim($entry['sent_request'])
|
||||
. "\n\n< " . trim($response) . "\n";
|
||||
}
|
||||
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
public function onComplete(CompleteEvent $event)
|
||||
{
|
||||
$this->add($event->getRequest(), $event->getResponse());
|
||||
}
|
||||
|
||||
public function onError(ErrorEvent $event)
|
||||
{
|
||||
// Only track when no response is present, meaning this didn't ever
|
||||
// emit a complete event
|
||||
if (!$event->getResponse()) {
|
||||
$this->add($event->getRequest());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an Iterator that yields associative array values where each
|
||||
* associative array contains the following key value pairs:
|
||||
*
|
||||
* - request: Representing the actual request that was received.
|
||||
* - sent_request: A clone of the request that will not be mutated.
|
||||
* - response: The response that was received (if available).
|
||||
*
|
||||
* @return \Iterator
|
||||
*/
|
||||
public function getIterator()
|
||||
{
|
||||
return new \ArrayIterator($this->transactions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all of the requests sent through the plugin.
|
||||
*
|
||||
* Requests can be modified after they are logged by the history
|
||||
* subscriber. By default this method will return the actual request
|
||||
* instances that were received. Pass true to this method if you wish to
|
||||
* get copies of the requests that represent the request state when it was
|
||||
* initially logged by the history subscriber.
|
||||
*
|
||||
* @param bool $asSent Set to true to get clones of the requests that have
|
||||
* not been mutated since the request was received by
|
||||
* the history subscriber.
|
||||
*
|
||||
* @return RequestInterface[]
|
||||
*/
|
||||
public function getRequests($asSent = false)
|
||||
{
|
||||
return array_map(function ($t) use ($asSent) {
|
||||
return $asSent ? $t['sent_request'] : $t['request'];
|
||||
}, $this->transactions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of requests in the history
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return count($this->transactions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last request sent.
|
||||
*
|
||||
* Requests can be modified after they are logged by the history
|
||||
* subscriber. By default this method will return the actual request
|
||||
* instance that was received. Pass true to this method if you wish to get
|
||||
* a copy of the request that represents the request state when it was
|
||||
* initially logged by the history subscriber.
|
||||
*
|
||||
* @param bool $asSent Set to true to get a clone of the last request that
|
||||
* has not been mutated since the request was received
|
||||
* by the history subscriber.
|
||||
*
|
||||
* @return RequestInterface
|
||||
*/
|
||||
public function getLastRequest($asSent = false)
|
||||
{
|
||||
return $asSent
|
||||
? end($this->transactions)['sent_request']
|
||||
: end($this->transactions)['request'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the last response in the history
|
||||
*
|
||||
* @return ResponseInterface|null
|
||||
*/
|
||||
public function getLastResponse()
|
||||
{
|
||||
return end($this->transactions)['response'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the history
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->transactions = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a request to the history
|
||||
*
|
||||
* @param RequestInterface $request Request to add
|
||||
* @param ResponseInterface $response Response of the request
|
||||
*/
|
||||
private function add(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response = null
|
||||
) {
|
||||
$this->transactions[] = [
|
||||
'request' => $request,
|
||||
'sent_request' => clone $request,
|
||||
'response' => $response
|
||||
];
|
||||
if (count($this->transactions) > $this->limit) {
|
||||
array_shift($this->transactions);
|
||||
}
|
||||
}
|
||||
}
|
||||
36
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php
vendored
Normal file
36
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/HttpError.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Subscriber;
|
||||
|
||||
use GuzzleHttp\Event\CompleteEvent;
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Event\SubscriberInterface;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
|
||||
/**
|
||||
* Throws exceptions when a 4xx or 5xx response is received
|
||||
*/
|
||||
class HttpError implements SubscriberInterface
|
||||
{
|
||||
public function getEvents()
|
||||
{
|
||||
return ['complete' => ['onComplete', RequestEvents::VERIFY_RESPONSE]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw a RequestException on an HTTP protocol error
|
||||
*
|
||||
* @param CompleteEvent $event Emitted event
|
||||
* @throws RequestException
|
||||
*/
|
||||
public function onComplete(CompleteEvent $event)
|
||||
{
|
||||
$code = (string) $event->getResponse()->getStatusCode();
|
||||
// Throw an exception for an unsuccessful response
|
||||
if ($code[0] >= 4) {
|
||||
throw RequestException::create(
|
||||
$event->getRequest(),
|
||||
$event->getResponse()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
147
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Mock.php
vendored
Normal file
147
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Mock.php
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Subscriber;
|
||||
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Event\SubscriberInterface;
|
||||
use GuzzleHttp\Event\BeforeEvent;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Message\MessageFactory;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Queues mock responses or exceptions and delivers mock responses or
|
||||
* exceptions in a fifo order.
|
||||
*/
|
||||
class Mock implements SubscriberInterface, \Countable
|
||||
{
|
||||
/** @var array Array of mock responses / exceptions */
|
||||
private $queue = [];
|
||||
|
||||
/** @var bool Whether or not to consume an entity body when mocking */
|
||||
private $readBodies;
|
||||
|
||||
/** @var MessageFactory */
|
||||
private $factory;
|
||||
|
||||
/**
|
||||
* @param array $items Array of responses or exceptions to queue
|
||||
* @param bool $readBodies Set to false to not consume the entity body of
|
||||
* a request when a mock is served.
|
||||
*/
|
||||
public function __construct(array $items = [], $readBodies = true)
|
||||
{
|
||||
$this->factory = new MessageFactory();
|
||||
$this->readBodies = $readBodies;
|
||||
$this->addMultiple($items);
|
||||
}
|
||||
|
||||
public function getEvents()
|
||||
{
|
||||
// Fire the event last, after signing
|
||||
return ['before' => ['onBefore', RequestEvents::SIGN_REQUEST - 10]];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \OutOfBoundsException|\Exception
|
||||
*/
|
||||
public function onBefore(BeforeEvent $event)
|
||||
{
|
||||
if (!$item = array_shift($this->queue)) {
|
||||
throw new \OutOfBoundsException('Mock queue is empty');
|
||||
} elseif ($item instanceof RequestException) {
|
||||
throw $item;
|
||||
}
|
||||
|
||||
// Emulate reading a response body
|
||||
$request = $event->getRequest();
|
||||
if ($this->readBodies && $request->getBody()) {
|
||||
while (!$request->getBody()->eof()) {
|
||||
$request->getBody()->read(8096);
|
||||
}
|
||||
}
|
||||
|
||||
$saveTo = $event->getRequest()->getConfig()->get('save_to');
|
||||
|
||||
if (null !== $saveTo) {
|
||||
$body = $item->getBody();
|
||||
|
||||
if (is_resource($saveTo)) {
|
||||
fwrite($saveTo, $body);
|
||||
} elseif (is_string($saveTo)) {
|
||||
file_put_contents($saveTo, $body);
|
||||
} elseif ($saveTo instanceof StreamInterface) {
|
||||
$saveTo->write($body);
|
||||
}
|
||||
}
|
||||
|
||||
$event->intercept($item);
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
return count($this->queue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a response to the end of the queue
|
||||
*
|
||||
* @param string|ResponseInterface $response Response or path to response file
|
||||
*
|
||||
* @return self
|
||||
* @throws \InvalidArgumentException if a string or Response is not passed
|
||||
*/
|
||||
public function addResponse($response)
|
||||
{
|
||||
if (is_string($response)) {
|
||||
$response = file_exists($response)
|
||||
? $this->factory->fromMessage(file_get_contents($response))
|
||||
: $this->factory->fromMessage($response);
|
||||
} elseif (!($response instanceof ResponseInterface)) {
|
||||
throw new \InvalidArgumentException('Response must a message '
|
||||
. 'string, response object, or path to a file');
|
||||
}
|
||||
|
||||
$this->queue[] = $response;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an exception to the end of the queue
|
||||
*
|
||||
* @param RequestException $e Exception to throw when the request is executed
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function addException(RequestException $e)
|
||||
{
|
||||
$this->queue[] = $e;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add multiple items to the queue
|
||||
*
|
||||
* @param array $items Items to add
|
||||
*/
|
||||
public function addMultiple(array $items)
|
||||
{
|
||||
foreach ($items as $item) {
|
||||
if ($item instanceof RequestException) {
|
||||
$this->addException($item);
|
||||
} else {
|
||||
$this->addResponse($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear the queue
|
||||
*/
|
||||
public function clearQueue()
|
||||
{
|
||||
$this->queue = [];
|
||||
}
|
||||
}
|
||||
130
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php
vendored
Normal file
130
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Subscriber;
|
||||
|
||||
use GuzzleHttp\Event\BeforeEvent;
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Event\SubscriberInterface;
|
||||
use GuzzleHttp\Message\AppliesHeadersInterface;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Mimetypes;
|
||||
use GuzzleHttp\Stream\StreamInterface;
|
||||
|
||||
/**
|
||||
* Prepares requests with a body before sending
|
||||
*
|
||||
* **Request Options**
|
||||
*
|
||||
* - expect: Set to true to enable the "Expect: 100-Continue" header for a
|
||||
* request that send a body. Set to false to disable "Expect: 100-Continue".
|
||||
* Set to a number so that the size of the payload must be greater than the
|
||||
* number in order to send the Expect header. Setting to a number will send
|
||||
* the Expect header for all requests in which the size of the payload cannot
|
||||
* be determined or where the body is not rewindable.
|
||||
*/
|
||||
class Prepare implements SubscriberInterface
|
||||
{
|
||||
public function getEvents()
|
||||
{
|
||||
return ['before' => ['onBefore', RequestEvents::PREPARE_REQUEST]];
|
||||
}
|
||||
|
||||
public function onBefore(BeforeEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
// Set the appropriate Content-Type for a request if one is not set and
|
||||
// there are form fields
|
||||
if (!($body = $request->getBody())) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->addContentLength($request, $body);
|
||||
|
||||
if ($body instanceof AppliesHeadersInterface) {
|
||||
// Synchronize the body with the request headers
|
||||
$body->applyRequestHeaders($request);
|
||||
} elseif (!$request->hasHeader('Content-Type')) {
|
||||
$this->addContentType($request, $body);
|
||||
}
|
||||
|
||||
$this->addExpectHeader($request, $body);
|
||||
}
|
||||
|
||||
private function addContentType(
|
||||
RequestInterface $request,
|
||||
StreamInterface $body
|
||||
) {
|
||||
if (!($uri = $body->getMetadata('uri'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Guess the content-type based on the stream's "uri" metadata value.
|
||||
// The file extension is used to determine the appropriate mime-type.
|
||||
if ($contentType = Mimetypes::getInstance()->fromFilename($uri)) {
|
||||
$request->setHeader('Content-Type', $contentType);
|
||||
}
|
||||
}
|
||||
|
||||
private function addContentLength(
|
||||
RequestInterface $request,
|
||||
StreamInterface $body
|
||||
) {
|
||||
// Set the Content-Length header if it can be determined, and never
|
||||
// send a Transfer-Encoding: chunked and Content-Length header in
|
||||
// the same request.
|
||||
if ($request->hasHeader('Content-Length')) {
|
||||
// Remove transfer-encoding if content-length is set.
|
||||
$request->removeHeader('Transfer-Encoding');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($request->hasHeader('Transfer-Encoding')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (null !== ($size = $body->getSize())) {
|
||||
$request->setHeader('Content-Length', $size);
|
||||
$request->removeHeader('Transfer-Encoding');
|
||||
} elseif ('1.1' == $request->getProtocolVersion()) {
|
||||
// Use chunked Transfer-Encoding if there is no determinable
|
||||
// content-length header and we're using HTTP/1.1.
|
||||
$request->setHeader('Transfer-Encoding', 'chunked');
|
||||
$request->removeHeader('Content-Length');
|
||||
}
|
||||
}
|
||||
|
||||
private function addExpectHeader(
|
||||
RequestInterface $request,
|
||||
StreamInterface $body
|
||||
) {
|
||||
// Determine if the Expect header should be used
|
||||
if ($request->hasHeader('Expect')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$expect = $request->getConfig()['expect'];
|
||||
|
||||
// Return if disabled or if you're not using HTTP/1.1
|
||||
if ($expect === false || $request->getProtocolVersion() !== '1.1') {
|
||||
return;
|
||||
}
|
||||
|
||||
// The expect header is unconditionally enabled
|
||||
if ($expect === true) {
|
||||
$request->setHeader('Expect', '100-Continue');
|
||||
return;
|
||||
}
|
||||
|
||||
// By default, send the expect header when the payload is > 1mb
|
||||
if ($expect === null) {
|
||||
$expect = 1048576;
|
||||
}
|
||||
|
||||
// Always add if the body cannot be rewound, the size cannot be
|
||||
// determined, or the size is greater than the cutoff threshold
|
||||
$size = $body->getSize();
|
||||
if ($size === null || $size >= (int) $expect || !$body->isSeekable()) {
|
||||
$request->setHeader('Expect', '100-Continue');
|
||||
}
|
||||
}
|
||||
}
|
||||
176
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php
vendored
Normal file
176
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
namespace GuzzleHttp\Subscriber;
|
||||
|
||||
use GuzzleHttp\Event\CompleteEvent;
|
||||
use GuzzleHttp\Event\RequestEvents;
|
||||
use GuzzleHttp\Event\SubscriberInterface;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
use GuzzleHttp\Exception\CouldNotRewindStreamException;
|
||||
use GuzzleHttp\Exception\TooManyRedirectsException;
|
||||
use GuzzleHttp\Message\RequestInterface;
|
||||
use GuzzleHttp\Message\ResponseInterface;
|
||||
use GuzzleHttp\Url;
|
||||
|
||||
/**
|
||||
* Subscriber used to implement HTTP redirects.
|
||||
*
|
||||
* **Request options**
|
||||
*
|
||||
* - redirect: Associative array containing the 'max', 'strict', and 'referer'
|
||||
* keys.
|
||||
*
|
||||
* - max: Maximum number of redirects allowed per-request
|
||||
* - strict: You can use strict redirects by setting this value to ``true``.
|
||||
* Strict redirects adhere to strict RFC compliant redirection (e.g.,
|
||||
* redirect POST with POST) vs doing what most clients do (e.g., redirect
|
||||
* POST request with a GET request).
|
||||
* - referer: Set to true to automatically add the "Referer" header when a
|
||||
* redirect request is sent.
|
||||
* - protocols: Array of allowed protocols. Defaults to 'http' and 'https'.
|
||||
* When a redirect attempts to utilize a protocol that is not white listed,
|
||||
* an exception is thrown.
|
||||
*/
|
||||
class Redirect implements SubscriberInterface
|
||||
{
|
||||
public function getEvents()
|
||||
{
|
||||
return ['complete' => ['onComplete', RequestEvents::REDIRECT_RESPONSE]];
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewind the entity body of the request if needed
|
||||
*
|
||||
* @param RequestInterface $redirectRequest
|
||||
* @throws CouldNotRewindStreamException
|
||||
*/
|
||||
public static function rewindEntityBody(RequestInterface $redirectRequest)
|
||||
{
|
||||
// Rewind the entity body of the request if needed
|
||||
if ($body = $redirectRequest->getBody()) {
|
||||
// Only rewind the body if some of it has been read already, and
|
||||
// throw an exception if the rewind fails
|
||||
if ($body->tell() && !$body->seek(0)) {
|
||||
throw new CouldNotRewindStreamException(
|
||||
'Unable to rewind the non-seekable request body after redirecting',
|
||||
$redirectRequest
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a request receives a redirect response
|
||||
*
|
||||
* @param CompleteEvent $event Event emitted
|
||||
* @throws TooManyRedirectsException
|
||||
*/
|
||||
public function onComplete(CompleteEvent $event)
|
||||
{
|
||||
$response = $event->getResponse();
|
||||
|
||||
if (substr($response->getStatusCode(), 0, 1) != '3'
|
||||
|| !$response->hasHeader('Location')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
$request = $event->getRequest();
|
||||
$config = $request->getConfig();
|
||||
|
||||
// Increment the redirect and initialize the redirect state.
|
||||
if ($redirectCount = $config['redirect_count']) {
|
||||
$config['redirect_count'] = ++$redirectCount;
|
||||
} else {
|
||||
$config['redirect_scheme'] = $request->getScheme();
|
||||
$config['redirect_count'] = $redirectCount = 1;
|
||||
}
|
||||
|
||||
$max = $config->getPath('redirect/max') ?: 5;
|
||||
|
||||
if ($redirectCount > $max) {
|
||||
throw new TooManyRedirectsException(
|
||||
"Will not follow more than {$redirectCount} redirects",
|
||||
$request
|
||||
);
|
||||
}
|
||||
|
||||
$this->modifyRedirectRequest($request, $response);
|
||||
$event->retry();
|
||||
}
|
||||
|
||||
private function modifyRedirectRequest(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response
|
||||
) {
|
||||
$config = $request->getConfig();
|
||||
$protocols = $config->getPath('redirect/protocols') ?: ['http', 'https'];
|
||||
|
||||
// Use a GET request if this is an entity enclosing request and we are
|
||||
// not forcing RFC compliance, but rather emulating what all browsers
|
||||
// would do.
|
||||
$statusCode = $response->getStatusCode();
|
||||
if ($statusCode == 303 ||
|
||||
($statusCode <= 302 && $request->getBody() && !$config->getPath('redirect/strict'))
|
||||
) {
|
||||
$request->setMethod('GET');
|
||||
$request->setBody(null);
|
||||
}
|
||||
|
||||
$previousUrl = $request->getUrl();
|
||||
$this->setRedirectUrl($request, $response, $protocols);
|
||||
$this->rewindEntityBody($request);
|
||||
|
||||
// Add the Referer header if it is told to do so and only
|
||||
// add the header if we are not redirecting from https to http.
|
||||
if ($config->getPath('redirect/referer')
|
||||
&& ($request->getScheme() == 'https' || $request->getScheme() == $config['redirect_scheme'])
|
||||
) {
|
||||
$url = Url::fromString($previousUrl);
|
||||
$url->setUsername(null);
|
||||
$url->setPassword(null);
|
||||
$request->setHeader('Referer', (string) $url);
|
||||
} else {
|
||||
$request->removeHeader('Referer');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the appropriate URL on the request based on the location header
|
||||
*
|
||||
* @param RequestInterface $request
|
||||
* @param ResponseInterface $response
|
||||
* @param array $protocols
|
||||
*/
|
||||
private function setRedirectUrl(
|
||||
RequestInterface $request,
|
||||
ResponseInterface $response,
|
||||
array $protocols
|
||||
) {
|
||||
$location = $response->getHeader('Location');
|
||||
$location = Url::fromString($location);
|
||||
|
||||
// Combine location with the original URL if it is not absolute.
|
||||
if (!$location->isAbsolute()) {
|
||||
$originalUrl = Url::fromString($request->getUrl());
|
||||
// Remove query string parameters and just take what is present on
|
||||
// the redirect Location header
|
||||
$originalUrl->getQuery()->clear();
|
||||
$location = $originalUrl->combine($location);
|
||||
}
|
||||
|
||||
// Ensure that the redirect URL is allowed based on the protocols.
|
||||
if (!in_array($location->getScheme(), $protocols)) {
|
||||
throw new BadResponseException(
|
||||
sprintf(
|
||||
'Redirect URL, %s, does not use one of the allowed redirect protocols: %s',
|
||||
$location,
|
||||
implode(', ', $protocols)
|
||||
),
|
||||
$request,
|
||||
$response
|
||||
);
|
||||
}
|
||||
|
||||
$request->setUrl($location);
|
||||
}
|
||||
}
|
||||
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/index.php
vendored
Normal file
11
modules/ps_metrics/vendor/guzzlehttp/guzzle/src/Subscriber/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;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user