first commit
This commit is contained in:
445
wp-content/plugins/polylang/vendor/composer/ClassLoader.php
vendored
Normal file
445
wp-content/plugins/polylang/vendor/composer/ClassLoader.php
vendored
Normal file
@@ -0,0 +1,445 @@
|
||||
<?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 http://www.php-fig.org/psr/psr-0/
|
||||
* @see http://www.php-fig.org/psr/psr-4/
|
||||
*/
|
||||
class ClassLoader
|
||||
{
|
||||
// PSR-4
|
||||
private $prefixLengthsPsr4 = array();
|
||||
private $prefixDirsPsr4 = array();
|
||||
private $fallbackDirsPsr4 = array();
|
||||
|
||||
// PSR-0
|
||||
private $prefixesPsr0 = array();
|
||||
private $fallbackDirsPsr0 = array();
|
||||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
private $classMapAuthoritative = false;
|
||||
private $missingClasses = array();
|
||||
private $apcuPrefix;
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
if (!empty($this->prefixesPsr0)) {
|
||||
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
public function getPrefixesPsr4()
|
||||
{
|
||||
return $this->prefixDirsPsr4;
|
||||
}
|
||||
|
||||
public function getFallbackDirs()
|
||||
{
|
||||
return $this->fallbackDirsPsr0;
|
||||
}
|
||||
|
||||
public function getFallbackDirsPsr4()
|
||||
{
|
||||
return $this->fallbackDirsPsr4;
|
||||
}
|
||||
|
||||
public function getClassMap()
|
||||
{
|
||||
return $this->classMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $classMap Class to filename map
|
||||
*/
|
||||
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 array|string $paths The PSR-0 root directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*/
|
||||
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 array|string $paths The PSR-4 base directories
|
||||
* @param bool $prepend Whether to prepend the directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
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 array|string $paths The PSR-0 base directories
|
||||
*/
|
||||
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 array|string $paths The PSR-4 base directories
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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
|
||||
*/
|
||||
public function register($prepend = false)
|
||||
{
|
||||
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters this instance as an autoloader.
|
||||
*/
|
||||
public function unregister()
|
||||
{
|
||||
spl_autoload_unregister(array($this, 'loadClass'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the given class or interface.
|
||||
*
|
||||
* @param string $class The name of the class
|
||||
* @return bool|null True if loaded, null otherwise
|
||||
*/
|
||||
public function loadClass($class)
|
||||
{
|
||||
if ($file = $this->findFile($class)) {
|
||||
includeFile($file);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
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.
|
||||
*/
|
||||
function includeFile($file)
|
||||
{
|
||||
include $file;
|
||||
}
|
||||
352
wp-content/plugins/polylang/vendor/composer/InstalledVersions.php
vendored
Normal file
352
wp-content/plugins/polylang/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
wp-content/plugins/polylang/vendor/composer/LICENSE
vendored
Normal file
21
wp-content/plugins/polylang/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.
|
||||
|
||||
137
wp-content/plugins/polylang/vendor/composer/autoload_classmap.php
vendored
Normal file
137
wp-content/plugins/polylang/vendor/composer/autoload_classmap.php
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
// autoload_classmap.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
'PLL_AS3CF' => $baseDir . '/integrations/wp-offload-media/as3cf.php',
|
||||
'PLL_Abstract_Sitemaps' => $baseDir . '/modules/sitemaps/abstract-sitemaps.php',
|
||||
'PLL_Accept_Language' => $baseDir . '/frontend/accept-language.php',
|
||||
'PLL_Accept_Languages_Collection' => $baseDir . '/frontend/accept-languages-collection.php',
|
||||
'PLL_Admin' => $baseDir . '/admin/admin.php',
|
||||
'PLL_Admin_Base' => $baseDir . '/admin/admin-base.php',
|
||||
'PLL_Admin_Block_Editor' => $baseDir . '/admin/admin-block-editor.php',
|
||||
'PLL_Admin_Classic_Editor' => $baseDir . '/admin/admin-classic-editor.php',
|
||||
'PLL_Admin_Default_Term' => $baseDir . '/admin/admin-default-term.php',
|
||||
'PLL_Admin_Filters' => $baseDir . '/admin/admin-filters.php',
|
||||
'PLL_Admin_Filters_Columns' => $baseDir . '/admin/admin-filters-columns.php',
|
||||
'PLL_Admin_Filters_Media' => $baseDir . '/admin/admin-filters-media.php',
|
||||
'PLL_Admin_Filters_Post' => $baseDir . '/admin/admin-filters-post.php',
|
||||
'PLL_Admin_Filters_Post_Base' => $baseDir . '/admin/admin-filters-post-base.php',
|
||||
'PLL_Admin_Filters_Term' => $baseDir . '/admin/admin-filters-term.php',
|
||||
'PLL_Admin_Filters_Widgets_Options' => $baseDir . '/admin/admin-filters-widgets-options.php',
|
||||
'PLL_Admin_Links' => $baseDir . '/admin/admin-links.php',
|
||||
'PLL_Admin_Model' => $baseDir . '/admin/admin-model.php',
|
||||
'PLL_Admin_Nav_Menu' => $baseDir . '/admin/admin-nav-menu.php',
|
||||
'PLL_Admin_Notices' => $baseDir . '/admin/admin-notices.php',
|
||||
'PLL_Admin_Site_Health' => $baseDir . '/modules/site-health/admin-site-health.php',
|
||||
'PLL_Admin_Static_Pages' => $baseDir . '/admin/admin-static-pages.php',
|
||||
'PLL_Admin_Strings' => $baseDir . '/admin/admin-strings.php',
|
||||
'PLL_Admin_Sync' => $baseDir . '/modules/sync/admin-sync.php',
|
||||
'PLL_Aqua_Resizer' => $baseDir . '/integrations/aqua-resizer/aqua-resizer.php',
|
||||
'PLL_Base' => $baseDir . '/include/base.php',
|
||||
'PLL_CRUD_Posts' => $baseDir . '/include/crud-posts.php',
|
||||
'PLL_CRUD_Terms' => $baseDir . '/include/crud-terms.php',
|
||||
'PLL_Cache' => $baseDir . '/include/cache.php',
|
||||
'PLL_Cache_Compat' => $baseDir . '/integrations/cache/cache-compat.php',
|
||||
'PLL_Canonical' => $baseDir . '/frontend/canonical.php',
|
||||
'PLL_Cft' => $baseDir . '/integrations/custom-field-template/cft.php',
|
||||
'PLL_Choose_Lang' => $baseDir . '/frontend/choose-lang.php',
|
||||
'PLL_Choose_Lang_Content' => $baseDir . '/frontend/choose-lang-content.php',
|
||||
'PLL_Choose_Lang_Domain' => $baseDir . '/frontend/choose-lang-domain.php',
|
||||
'PLL_Choose_Lang_Url' => $baseDir . '/frontend/choose-lang-url.php',
|
||||
'PLL_Cookie' => $baseDir . '/include/cookie.php',
|
||||
'PLL_Db_Tools' => $baseDir . '/include/db-tools.php',
|
||||
'PLL_Domain_Mapping' => $baseDir . '/integrations/domain-mapping/domain-mapping.php',
|
||||
'PLL_Duplicate_Post' => $baseDir . '/integrations/duplicate-post/duplicate-post.php',
|
||||
'PLL_Featured_Content' => $baseDir . '/integrations/jetpack/featured-content.php',
|
||||
'PLL_Filters' => $baseDir . '/include/filters.php',
|
||||
'PLL_Filters_Links' => $baseDir . '/include/filters-links.php',
|
||||
'PLL_Filters_Sanitization' => $baseDir . '/include/filters-sanitization.php',
|
||||
'PLL_Filters_Widgets_Options' => $baseDir . '/include/filters-widgets-options.php',
|
||||
'PLL_Frontend' => $baseDir . '/frontend/frontend.php',
|
||||
'PLL_Frontend_Auto_Translate' => $baseDir . '/frontend/frontend-auto-translate.php',
|
||||
'PLL_Frontend_Filters' => $baseDir . '/frontend/frontend-filters.php',
|
||||
'PLL_Frontend_Filters_Links' => $baseDir . '/frontend/frontend-filters-links.php',
|
||||
'PLL_Frontend_Filters_Search' => $baseDir . '/frontend/frontend-filters-search.php',
|
||||
'PLL_Frontend_Filters_Widgets' => $baseDir . '/frontend/frontend-filters-widgets.php',
|
||||
'PLL_Frontend_Links' => $baseDir . '/frontend/frontend-links.php',
|
||||
'PLL_Frontend_Nav_Menu' => $baseDir . '/frontend/frontend-nav-menu.php',
|
||||
'PLL_Frontend_Static_Pages' => $baseDir . '/frontend/frontend-static-pages.php',
|
||||
'PLL_Install' => $baseDir . '/install/install.php',
|
||||
'PLL_Install_Base' => $baseDir . '/install/install-base.php',
|
||||
'PLL_Integrations' => $baseDir . '/integrations/integrations.php',
|
||||
'PLL_Jetpack' => $baseDir . '/integrations/jetpack/jetpack.php',
|
||||
'PLL_Language' => $baseDir . '/include/language.php',
|
||||
'PLL_Language_Deprecated' => $baseDir . '/include/language-deprecated.php',
|
||||
'PLL_Language_Factory' => $baseDir . '/include/language-factory.php',
|
||||
'PLL_License' => $baseDir . '/include/license.php',
|
||||
'PLL_Links' => $baseDir . '/include/links.php',
|
||||
'PLL_Links_Abstract_Domain' => $baseDir . '/include/links-abstract-domain.php',
|
||||
'PLL_Links_Default' => $baseDir . '/include/links-default.php',
|
||||
'PLL_Links_Directory' => $baseDir . '/include/links-directory.php',
|
||||
'PLL_Links_Domain' => $baseDir . '/include/links-domain.php',
|
||||
'PLL_Links_Model' => $baseDir . '/include/links-model.php',
|
||||
'PLL_Links_Permalinks' => $baseDir . '/include/links-permalinks.php',
|
||||
'PLL_Links_Subdomain' => $baseDir . '/include/links-subdomain.php',
|
||||
'PLL_MO' => $baseDir . '/include/mo.php',
|
||||
'PLL_Model' => $baseDir . '/include/model.php',
|
||||
'PLL_Multilingual_Sitemaps_Provider' => $baseDir . '/modules/sitemaps/multilingual-sitemaps-provider.php',
|
||||
'PLL_Nav_Menu' => $baseDir . '/include/nav-menu.php',
|
||||
'PLL_No_Category_Base' => $baseDir . '/integrations/no-category-base/no-category-base.php',
|
||||
'PLL_OLT_Manager' => $baseDir . '/include/olt-manager.php',
|
||||
'PLL_Plugin_Updater' => $baseDir . '/install/plugin-updater.php',
|
||||
'PLL_Query' => $baseDir . '/include/query.php',
|
||||
'PLL_REST_Request' => $baseDir . '/include/rest-request.php',
|
||||
'PLL_Settings' => $baseDir . '/settings/settings.php',
|
||||
'PLL_Settings_Browser' => $baseDir . '/settings/settings-browser.php',
|
||||
'PLL_Settings_CPT' => $baseDir . '/settings/settings-cpt.php',
|
||||
'PLL_Settings_Licenses' => $baseDir . '/settings/settings-licenses.php',
|
||||
'PLL_Settings_Media' => $baseDir . '/settings/settings-media.php',
|
||||
'PLL_Settings_Module' => $baseDir . '/settings/settings-module.php',
|
||||
'PLL_Settings_Preview_Share_Slug' => $baseDir . '/modules/share-slug/settings-preview-share-slug.php',
|
||||
'PLL_Settings_Preview_Translate_Slugs' => $baseDir . '/modules/translate-slugs/settings-preview-translate-slugs.php',
|
||||
'PLL_Settings_Sync' => $baseDir . '/modules/sync/settings-sync.php',
|
||||
'PLL_Settings_Url' => $baseDir . '/settings/settings-url.php',
|
||||
'PLL_Sitemaps' => $baseDir . '/modules/sitemaps/sitemaps.php',
|
||||
'PLL_Sitemaps_Domain' => $baseDir . '/modules/sitemaps/sitemaps-domain.php',
|
||||
'PLL_Static_Pages' => $baseDir . '/include/static-pages.php',
|
||||
'PLL_Switcher' => $baseDir . '/include/switcher.php',
|
||||
'PLL_Sync' => $baseDir . '/modules/sync/sync.php',
|
||||
'PLL_Sync_Metas' => $baseDir . '/modules/sync/sync-metas.php',
|
||||
'PLL_Sync_Post_Metas' => $baseDir . '/modules/sync/sync-post-metas.php',
|
||||
'PLL_Sync_Tax' => $baseDir . '/modules/sync/sync-tax.php',
|
||||
'PLL_Sync_Term_Metas' => $baseDir . '/modules/sync/sync-term-metas.php',
|
||||
'PLL_T15S' => $baseDir . '/install/t15s.php',
|
||||
'PLL_Table_Languages' => $baseDir . '/settings/table-languages.php',
|
||||
'PLL_Table_Settings' => $baseDir . '/settings/table-settings.php',
|
||||
'PLL_Table_String' => $baseDir . '/settings/table-string.php',
|
||||
'PLL_Translatable_Object' => $baseDir . '/include/translatable-object.php',
|
||||
'PLL_Translatable_Object_With_Types_Interface' => $baseDir . '/include/translatable-object-with-types-interface.php',
|
||||
'PLL_Translatable_Object_With_Types_Trait' => $baseDir . '/include/translatable-object-with-types-trait.php',
|
||||
'PLL_Translatable_Objects' => $baseDir . '/include/translatable-objects.php',
|
||||
'PLL_Translate_Option' => $baseDir . '/include/translate-option.php',
|
||||
'PLL_Translated_Object' => $baseDir . '/include/translated-object.php',
|
||||
'PLL_Translated_Post' => $baseDir . '/include/translated-post.php',
|
||||
'PLL_Translated_Term' => $baseDir . '/include/translated-term.php',
|
||||
'PLL_Twenty_Seventeen' => $baseDir . '/integrations/twenty-seventeen/twenty-seven-teen.php',
|
||||
'PLL_Upgrade' => $baseDir . '/install/upgrade.php',
|
||||
'PLL_WPML_API' => $baseDir . '/modules/wpml/wpml-api.php',
|
||||
'PLL_WPML_Compat' => $baseDir . '/modules/wpml/wpml-compat.php',
|
||||
'PLL_WPML_Config' => $baseDir . '/modules/wpml/wpml-config.php',
|
||||
'PLL_WPSEO' => $baseDir . '/integrations/wpseo/wpseo.php',
|
||||
'PLL_WPSEO_OGP' => $baseDir . '/integrations/wpseo/wpseo-ogp.php',
|
||||
'PLL_WP_Import' => $baseDir . '/integrations/wp-importer/wp-import.php',
|
||||
'PLL_WP_Sweep' => $baseDir . '/integrations/wp-sweep/wp-sweep.php',
|
||||
'PLL_Walker' => $baseDir . '/include/walker.php',
|
||||
'PLL_Walker_Dropdown' => $baseDir . '/include/walker-dropdown.php',
|
||||
'PLL_Walker_List' => $baseDir . '/include/walker-list.php',
|
||||
'PLL_Widget_Calendar' => $baseDir . '/include/widget-calendar.php',
|
||||
'PLL_Widget_Languages' => $baseDir . '/include/widget-languages.php',
|
||||
'PLL_Wizard' => $baseDir . '/modules/wizard/wizard.php',
|
||||
'PLL_WordPress_Importer' => $baseDir . '/integrations/wp-importer/wordpress-importer.php',
|
||||
'PLL_Yarpp' => $baseDir . '/integrations/yarpp/yarpp.php',
|
||||
'Polylang' => $baseDir . '/include/class-polylang.php',
|
||||
);
|
||||
9
wp-content/plugins/polylang/vendor/composer/autoload_namespaces.php
vendored
Normal file
9
wp-content/plugins/polylang/vendor/composer/autoload_namespaces.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_namespaces.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
9
wp-content/plugins/polylang/vendor/composer/autoload_psr4.php
vendored
Normal file
9
wp-content/plugins/polylang/vendor/composer/autoload_psr4.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
// autoload_psr4.php @generated by Composer
|
||||
|
||||
$vendorDir = dirname(dirname(__FILE__));
|
||||
$baseDir = dirname($vendorDir);
|
||||
|
||||
return array(
|
||||
);
|
||||
55
wp-content/plugins/polylang/vendor/composer/autoload_real.php
vendored
Normal file
55
wp-content/plugins/polylang/vendor/composer/autoload_real.php
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit57e007bdf76a1fe336cb43b59389545b
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit57e007bdf76a1fe336cb43b59389545b', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit57e007bdf76a1fe336cb43b59389545b', 'loadClassLoader'));
|
||||
|
||||
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
||||
if ($useStaticLoader) {
|
||||
require_once __DIR__ . '/autoload_static.php';
|
||||
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit57e007bdf76a1fe336cb43b59389545b::getInitializer($loader));
|
||||
} else {
|
||||
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->set($namespace, $path);
|
||||
}
|
||||
|
||||
$map = require __DIR__ . '/autoload_psr4.php';
|
||||
foreach ($map as $namespace => $path) {
|
||||
$loader->setPsr4($namespace, $path);
|
||||
}
|
||||
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
$loader->addClassMap($classMap);
|
||||
}
|
||||
}
|
||||
|
||||
$loader->register(true);
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
147
wp-content/plugins/polylang/vendor/composer/autoload_static.php
vendored
Normal file
147
wp-content/plugins/polylang/vendor/composer/autoload_static.php
vendored
Normal file
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
// autoload_static.php @generated by Composer
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit57e007bdf76a1fe336cb43b59389545b
|
||||
{
|
||||
public static $classMap = array (
|
||||
'PLL_AS3CF' => __DIR__ . '/../..' . '/integrations/wp-offload-media/as3cf.php',
|
||||
'PLL_Abstract_Sitemaps' => __DIR__ . '/../..' . '/modules/sitemaps/abstract-sitemaps.php',
|
||||
'PLL_Accept_Language' => __DIR__ . '/../..' . '/frontend/accept-language.php',
|
||||
'PLL_Accept_Languages_Collection' => __DIR__ . '/../..' . '/frontend/accept-languages-collection.php',
|
||||
'PLL_Admin' => __DIR__ . '/../..' . '/admin/admin.php',
|
||||
'PLL_Admin_Base' => __DIR__ . '/../..' . '/admin/admin-base.php',
|
||||
'PLL_Admin_Block_Editor' => __DIR__ . '/../..' . '/admin/admin-block-editor.php',
|
||||
'PLL_Admin_Classic_Editor' => __DIR__ . '/../..' . '/admin/admin-classic-editor.php',
|
||||
'PLL_Admin_Default_Term' => __DIR__ . '/../..' . '/admin/admin-default-term.php',
|
||||
'PLL_Admin_Filters' => __DIR__ . '/../..' . '/admin/admin-filters.php',
|
||||
'PLL_Admin_Filters_Columns' => __DIR__ . '/../..' . '/admin/admin-filters-columns.php',
|
||||
'PLL_Admin_Filters_Media' => __DIR__ . '/../..' . '/admin/admin-filters-media.php',
|
||||
'PLL_Admin_Filters_Post' => __DIR__ . '/../..' . '/admin/admin-filters-post.php',
|
||||
'PLL_Admin_Filters_Post_Base' => __DIR__ . '/../..' . '/admin/admin-filters-post-base.php',
|
||||
'PLL_Admin_Filters_Term' => __DIR__ . '/../..' . '/admin/admin-filters-term.php',
|
||||
'PLL_Admin_Filters_Widgets_Options' => __DIR__ . '/../..' . '/admin/admin-filters-widgets-options.php',
|
||||
'PLL_Admin_Links' => __DIR__ . '/../..' . '/admin/admin-links.php',
|
||||
'PLL_Admin_Model' => __DIR__ . '/../..' . '/admin/admin-model.php',
|
||||
'PLL_Admin_Nav_Menu' => __DIR__ . '/../..' . '/admin/admin-nav-menu.php',
|
||||
'PLL_Admin_Notices' => __DIR__ . '/../..' . '/admin/admin-notices.php',
|
||||
'PLL_Admin_Site_Health' => __DIR__ . '/../..' . '/modules/site-health/admin-site-health.php',
|
||||
'PLL_Admin_Static_Pages' => __DIR__ . '/../..' . '/admin/admin-static-pages.php',
|
||||
'PLL_Admin_Strings' => __DIR__ . '/../..' . '/admin/admin-strings.php',
|
||||
'PLL_Admin_Sync' => __DIR__ . '/../..' . '/modules/sync/admin-sync.php',
|
||||
'PLL_Aqua_Resizer' => __DIR__ . '/../..' . '/integrations/aqua-resizer/aqua-resizer.php',
|
||||
'PLL_Base' => __DIR__ . '/../..' . '/include/base.php',
|
||||
'PLL_CRUD_Posts' => __DIR__ . '/../..' . '/include/crud-posts.php',
|
||||
'PLL_CRUD_Terms' => __DIR__ . '/../..' . '/include/crud-terms.php',
|
||||
'PLL_Cache' => __DIR__ . '/../..' . '/include/cache.php',
|
||||
'PLL_Cache_Compat' => __DIR__ . '/../..' . '/integrations/cache/cache-compat.php',
|
||||
'PLL_Canonical' => __DIR__ . '/../..' . '/frontend/canonical.php',
|
||||
'PLL_Cft' => __DIR__ . '/../..' . '/integrations/custom-field-template/cft.php',
|
||||
'PLL_Choose_Lang' => __DIR__ . '/../..' . '/frontend/choose-lang.php',
|
||||
'PLL_Choose_Lang_Content' => __DIR__ . '/../..' . '/frontend/choose-lang-content.php',
|
||||
'PLL_Choose_Lang_Domain' => __DIR__ . '/../..' . '/frontend/choose-lang-domain.php',
|
||||
'PLL_Choose_Lang_Url' => __DIR__ . '/../..' . '/frontend/choose-lang-url.php',
|
||||
'PLL_Cookie' => __DIR__ . '/../..' . '/include/cookie.php',
|
||||
'PLL_Db_Tools' => __DIR__ . '/../..' . '/include/db-tools.php',
|
||||
'PLL_Domain_Mapping' => __DIR__ . '/../..' . '/integrations/domain-mapping/domain-mapping.php',
|
||||
'PLL_Duplicate_Post' => __DIR__ . '/../..' . '/integrations/duplicate-post/duplicate-post.php',
|
||||
'PLL_Featured_Content' => __DIR__ . '/../..' . '/integrations/jetpack/featured-content.php',
|
||||
'PLL_Filters' => __DIR__ . '/../..' . '/include/filters.php',
|
||||
'PLL_Filters_Links' => __DIR__ . '/../..' . '/include/filters-links.php',
|
||||
'PLL_Filters_Sanitization' => __DIR__ . '/../..' . '/include/filters-sanitization.php',
|
||||
'PLL_Filters_Widgets_Options' => __DIR__ . '/../..' . '/include/filters-widgets-options.php',
|
||||
'PLL_Frontend' => __DIR__ . '/../..' . '/frontend/frontend.php',
|
||||
'PLL_Frontend_Auto_Translate' => __DIR__ . '/../..' . '/frontend/frontend-auto-translate.php',
|
||||
'PLL_Frontend_Filters' => __DIR__ . '/../..' . '/frontend/frontend-filters.php',
|
||||
'PLL_Frontend_Filters_Links' => __DIR__ . '/../..' . '/frontend/frontend-filters-links.php',
|
||||
'PLL_Frontend_Filters_Search' => __DIR__ . '/../..' . '/frontend/frontend-filters-search.php',
|
||||
'PLL_Frontend_Filters_Widgets' => __DIR__ . '/../..' . '/frontend/frontend-filters-widgets.php',
|
||||
'PLL_Frontend_Links' => __DIR__ . '/../..' . '/frontend/frontend-links.php',
|
||||
'PLL_Frontend_Nav_Menu' => __DIR__ . '/../..' . '/frontend/frontend-nav-menu.php',
|
||||
'PLL_Frontend_Static_Pages' => __DIR__ . '/../..' . '/frontend/frontend-static-pages.php',
|
||||
'PLL_Install' => __DIR__ . '/../..' . '/install/install.php',
|
||||
'PLL_Install_Base' => __DIR__ . '/../..' . '/install/install-base.php',
|
||||
'PLL_Integrations' => __DIR__ . '/../..' . '/integrations/integrations.php',
|
||||
'PLL_Jetpack' => __DIR__ . '/../..' . '/integrations/jetpack/jetpack.php',
|
||||
'PLL_Language' => __DIR__ . '/../..' . '/include/language.php',
|
||||
'PLL_Language_Deprecated' => __DIR__ . '/../..' . '/include/language-deprecated.php',
|
||||
'PLL_Language_Factory' => __DIR__ . '/../..' . '/include/language-factory.php',
|
||||
'PLL_License' => __DIR__ . '/../..' . '/include/license.php',
|
||||
'PLL_Links' => __DIR__ . '/../..' . '/include/links.php',
|
||||
'PLL_Links_Abstract_Domain' => __DIR__ . '/../..' . '/include/links-abstract-domain.php',
|
||||
'PLL_Links_Default' => __DIR__ . '/../..' . '/include/links-default.php',
|
||||
'PLL_Links_Directory' => __DIR__ . '/../..' . '/include/links-directory.php',
|
||||
'PLL_Links_Domain' => __DIR__ . '/../..' . '/include/links-domain.php',
|
||||
'PLL_Links_Model' => __DIR__ . '/../..' . '/include/links-model.php',
|
||||
'PLL_Links_Permalinks' => __DIR__ . '/../..' . '/include/links-permalinks.php',
|
||||
'PLL_Links_Subdomain' => __DIR__ . '/../..' . '/include/links-subdomain.php',
|
||||
'PLL_MO' => __DIR__ . '/../..' . '/include/mo.php',
|
||||
'PLL_Model' => __DIR__ . '/../..' . '/include/model.php',
|
||||
'PLL_Multilingual_Sitemaps_Provider' => __DIR__ . '/../..' . '/modules/sitemaps/multilingual-sitemaps-provider.php',
|
||||
'PLL_Nav_Menu' => __DIR__ . '/../..' . '/include/nav-menu.php',
|
||||
'PLL_No_Category_Base' => __DIR__ . '/../..' . '/integrations/no-category-base/no-category-base.php',
|
||||
'PLL_OLT_Manager' => __DIR__ . '/../..' . '/include/olt-manager.php',
|
||||
'PLL_Plugin_Updater' => __DIR__ . '/../..' . '/install/plugin-updater.php',
|
||||
'PLL_Query' => __DIR__ . '/../..' . '/include/query.php',
|
||||
'PLL_REST_Request' => __DIR__ . '/../..' . '/include/rest-request.php',
|
||||
'PLL_Settings' => __DIR__ . '/../..' . '/settings/settings.php',
|
||||
'PLL_Settings_Browser' => __DIR__ . '/../..' . '/settings/settings-browser.php',
|
||||
'PLL_Settings_CPT' => __DIR__ . '/../..' . '/settings/settings-cpt.php',
|
||||
'PLL_Settings_Licenses' => __DIR__ . '/../..' . '/settings/settings-licenses.php',
|
||||
'PLL_Settings_Media' => __DIR__ . '/../..' . '/settings/settings-media.php',
|
||||
'PLL_Settings_Module' => __DIR__ . '/../..' . '/settings/settings-module.php',
|
||||
'PLL_Settings_Preview_Share_Slug' => __DIR__ . '/../..' . '/modules/share-slug/settings-preview-share-slug.php',
|
||||
'PLL_Settings_Preview_Translate_Slugs' => __DIR__ . '/../..' . '/modules/translate-slugs/settings-preview-translate-slugs.php',
|
||||
'PLL_Settings_Sync' => __DIR__ . '/../..' . '/modules/sync/settings-sync.php',
|
||||
'PLL_Settings_Url' => __DIR__ . '/../..' . '/settings/settings-url.php',
|
||||
'PLL_Sitemaps' => __DIR__ . '/../..' . '/modules/sitemaps/sitemaps.php',
|
||||
'PLL_Sitemaps_Domain' => __DIR__ . '/../..' . '/modules/sitemaps/sitemaps-domain.php',
|
||||
'PLL_Static_Pages' => __DIR__ . '/../..' . '/include/static-pages.php',
|
||||
'PLL_Switcher' => __DIR__ . '/../..' . '/include/switcher.php',
|
||||
'PLL_Sync' => __DIR__ . '/../..' . '/modules/sync/sync.php',
|
||||
'PLL_Sync_Metas' => __DIR__ . '/../..' . '/modules/sync/sync-metas.php',
|
||||
'PLL_Sync_Post_Metas' => __DIR__ . '/../..' . '/modules/sync/sync-post-metas.php',
|
||||
'PLL_Sync_Tax' => __DIR__ . '/../..' . '/modules/sync/sync-tax.php',
|
||||
'PLL_Sync_Term_Metas' => __DIR__ . '/../..' . '/modules/sync/sync-term-metas.php',
|
||||
'PLL_T15S' => __DIR__ . '/../..' . '/install/t15s.php',
|
||||
'PLL_Table_Languages' => __DIR__ . '/../..' . '/settings/table-languages.php',
|
||||
'PLL_Table_Settings' => __DIR__ . '/../..' . '/settings/table-settings.php',
|
||||
'PLL_Table_String' => __DIR__ . '/../..' . '/settings/table-string.php',
|
||||
'PLL_Translatable_Object' => __DIR__ . '/../..' . '/include/translatable-object.php',
|
||||
'PLL_Translatable_Object_With_Types_Interface' => __DIR__ . '/../..' . '/include/translatable-object-with-types-interface.php',
|
||||
'PLL_Translatable_Object_With_Types_Trait' => __DIR__ . '/../..' . '/include/translatable-object-with-types-trait.php',
|
||||
'PLL_Translatable_Objects' => __DIR__ . '/../..' . '/include/translatable-objects.php',
|
||||
'PLL_Translate_Option' => __DIR__ . '/../..' . '/include/translate-option.php',
|
||||
'PLL_Translated_Object' => __DIR__ . '/../..' . '/include/translated-object.php',
|
||||
'PLL_Translated_Post' => __DIR__ . '/../..' . '/include/translated-post.php',
|
||||
'PLL_Translated_Term' => __DIR__ . '/../..' . '/include/translated-term.php',
|
||||
'PLL_Twenty_Seventeen' => __DIR__ . '/../..' . '/integrations/twenty-seventeen/twenty-seven-teen.php',
|
||||
'PLL_Upgrade' => __DIR__ . '/../..' . '/install/upgrade.php',
|
||||
'PLL_WPML_API' => __DIR__ . '/../..' . '/modules/wpml/wpml-api.php',
|
||||
'PLL_WPML_Compat' => __DIR__ . '/../..' . '/modules/wpml/wpml-compat.php',
|
||||
'PLL_WPML_Config' => __DIR__ . '/../..' . '/modules/wpml/wpml-config.php',
|
||||
'PLL_WPSEO' => __DIR__ . '/../..' . '/integrations/wpseo/wpseo.php',
|
||||
'PLL_WPSEO_OGP' => __DIR__ . '/../..' . '/integrations/wpseo/wpseo-ogp.php',
|
||||
'PLL_WP_Import' => __DIR__ . '/../..' . '/integrations/wp-importer/wp-import.php',
|
||||
'PLL_WP_Sweep' => __DIR__ . '/../..' . '/integrations/wp-sweep/wp-sweep.php',
|
||||
'PLL_Walker' => __DIR__ . '/../..' . '/include/walker.php',
|
||||
'PLL_Walker_Dropdown' => __DIR__ . '/../..' . '/include/walker-dropdown.php',
|
||||
'PLL_Walker_List' => __DIR__ . '/../..' . '/include/walker-list.php',
|
||||
'PLL_Widget_Calendar' => __DIR__ . '/../..' . '/include/widget-calendar.php',
|
||||
'PLL_Widget_Languages' => __DIR__ . '/../..' . '/include/widget-languages.php',
|
||||
'PLL_Wizard' => __DIR__ . '/../..' . '/modules/wizard/wizard.php',
|
||||
'PLL_WordPress_Importer' => __DIR__ . '/../..' . '/integrations/wp-importer/wordpress-importer.php',
|
||||
'PLL_Yarpp' => __DIR__ . '/../..' . '/integrations/yarpp/yarpp.php',
|
||||
'Polylang' => __DIR__ . '/../..' . '/include/class-polylang.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->classMap = ComposerStaticInit57e007bdf76a1fe336cb43b59389545b::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
}
|
||||
1
wp-content/plugins/polylang/vendor/composer/installed.json
vendored
Normal file
1
wp-content/plugins/polylang/vendor/composer/installed.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
[]
|
||||
23
wp-content/plugins/polylang/vendor/composer/installed.php
vendored
Normal file
23
wp-content/plugins/polylang/vendor/composer/installed.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php return array(
|
||||
'root' => array(
|
||||
'name' => 'wpsyntex/polylang',
|
||||
'pretty_version' => '3.2.x-dev',
|
||||
'version' => '3.2.9999999.9999999-dev',
|
||||
'reference' => '9555976eb2dc703519184632f83fa6114d3a9ce3',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev' => false,
|
||||
),
|
||||
'versions' => array(
|
||||
'wpsyntex/polylang' => array(
|
||||
'pretty_version' => '3.2.x-dev',
|
||||
'version' => '3.2.9999999.9999999-dev',
|
||||
'reference' => '9555976eb2dc703519184632f83fa6114d3a9ce3',
|
||||
'type' => 'wordpress-plugin',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
),
|
||||
);
|
||||
26
wp-content/plugins/polylang/vendor/composer/platform_check.php
vendored
Normal file
26
wp-content/plugins/polylang/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 >= 50600)) {
|
||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.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
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user