feat: initial ACRIB WordPress deployment

- WordPress 6.9.4 (es_ES) with Kadence theme
- Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto
- Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold
- Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI)
- Plugins: Kadence Blocks, Polylang, Contact Form 7
- Custom CSS with full brand styling and responsive layout
- HTTPS enforced via wp-config.php proxy detection
This commit is contained in:
Malin
2026-05-19 19:25:59 +02:00
commit f3ff7b7186
6119 changed files with 1984255 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = '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;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
throw new RuntimeException($err);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit2b363a563784ab73a27482ad263c7374::getLoader();

View File

@@ -0,0 +1,119 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../stellarwp/harbor/bin/stellar-harbor)
* 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'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/stellarwp/harbor/bin/stellar-harbor');
}
}
return include __DIR__ . '/..'.'/stellarwp/harbor/bin/stellar-harbor';

View File

@@ -0,0 +1,119 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../stellarwp/uplink/bin/stellar-uplink)
* 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'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/stellarwp/uplink/bin/stellar-uplink');
}
}
return include __DIR__ . '/..'.'/stellarwp/uplink/bin/stellar-uplink';

View File

@@ -0,0 +1,579 @@
<?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 \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array<string, string> $classMap Class to filename map
*
* @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 list<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)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$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 list<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)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$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] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$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 list<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 list<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 = self::$includeFile;
$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 keyed by their corresponding vendor directories.
*
* @return array<string, 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;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View File

@@ -0,0 +1,396 @@
<?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 string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/**
* @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
*/
private static $installedIsLocalDir;
/**
* @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 || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
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((string) $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();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
}
/**
* @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();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @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[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
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') {
/** @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[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}
return $installed;
}
}

View 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.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,127 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'KadenceWP\\KadenceBlocks\\Admin\\Admin_Provider' => $baseDir . '/includes/resources/Admin/Admin_Provider.php',
'KadenceWP\\KadenceBlocks\\App' => $baseDir . '/includes/resources/App.php',
'KadenceWP\\KadenceBlocks\\Asset\\Asset' => $baseDir . '/includes/resources/Asset/Asset.php',
'KadenceWP\\KadenceBlocks\\Asset\\Asset_Provider' => $baseDir . '/includes/resources/Asset/Asset_Provider.php',
'KadenceWP\\KadenceBlocks\\Cache\\Ai_Cache' => $baseDir . '/includes/resources/Cache/Ai_Cache.php',
'KadenceWP\\KadenceBlocks\\Cache\\Block_Library_Cache' => $baseDir . '/includes/resources/Cache/Block_Library_Cache.php',
'KadenceWP\\KadenceBlocks\\Cache\\Cache_Provider' => $baseDir . '/includes/resources/Cache/Cache_Provider.php',
'KadenceWP\\KadenceBlocks\\Cache\\Config' => $baseDir . '/includes/resources/Cache/Config.php',
'KadenceWP\\KadenceBlocks\\Container' => $baseDir . '/includes/resources/Container.php',
'KadenceWP\\KadenceBlocks\\Database\\Database_Provider' => $baseDir . '/includes/resources/Database/Database_Provider.php',
'KadenceWP\\KadenceBlocks\\Database\\Query' => $baseDir . '/includes/resources/Database/Query.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Get_Known_Plugins' => $baseDir . '/includes/resources/Harbor/Actions/Get_Known_Plugins.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Render_Harbor_License_Notice' => $baseDir . '/includes/resources/Harbor/Actions/Render_Harbor_License_Notice.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Report_Legacy_Licenses' => $baseDir . '/includes/resources/Harbor/Actions/Report_Legacy_Licenses.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Suppress_Legacy_Inactive_Notices' => $baseDir . '/includes/resources/Harbor/Actions/Suppress_Legacy_Inactive_Notices.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Harbor_Provider' => $baseDir . '/includes/resources/Harbor/Harbor_Provider.php',
'KadenceWP\\KadenceBlocks\\Hasher' => $baseDir . '/includes/resources/Hasher.php',
'KadenceWP\\KadenceBlocks\\Health\\Health_Provider' => $baseDir . '/includes/resources/Health/Health_Provider.php',
'KadenceWP\\KadenceBlocks\\Health\\Required_Function_Verifier' => $baseDir . '/includes/resources/Health/Required_Function_Verifier.php',
'KadenceWP\\KadenceBlocks\\Home\\Home_Content_View_Model' => $baseDir . '/includes/resources/Home/Home_Content_View_Model.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Cache_Primer' => $baseDir . '/includes/resources/Image_Downloader/Cache_Primer.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Image_Downloader' => $baseDir . '/includes/resources/Image_Downloader/Image_Downloader.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Image_Downloader_Provider' => $baseDir . '/includes/resources/Image_Downloader/Image_Downloader_Provider.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Image_Editor' => $baseDir . '/includes/resources/Image_Downloader/Image_Editor.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Meta' => $baseDir . '/includes/resources/Image_Downloader/Meta.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Pexels_ID_Registry' => $baseDir . '/includes/resources/Image_Downloader/Pexels_ID_Registry.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\WordPress_Importer' => $baseDir . '/includes/resources/Image_Downloader/WordPress_Importer.php',
'KadenceWP\\KadenceBlocks\\Log\\Log_Provider' => $baseDir . '/includes/resources/Log/Log_Provider.php',
'KadenceWP\\KadenceBlocks\\Notice\\Notice_Handler' => $baseDir . '/includes/resources/Notice/Notice_Handler.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Analysis_Registry' => $baseDir . '/includes/resources/Optimizer/Analysis_Registry.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Asset\\Provider' => $baseDir . '/includes/resources/Optimizer/Asset/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Asset_Loader' => $baseDir . '/includes/resources/Optimizer/Asset_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Optimizer_Query' => $baseDir . '/includes/resources/Optimizer/Database/Optimizer_Query.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Optimizer_Table' => $baseDir . '/includes/resources/Optimizer/Database/Optimizer_Table.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Provider' => $baseDir . '/includes/resources/Optimizer/Database/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Viewport_Hash_Table' => $baseDir . '/includes/resources/Optimizer/Database/Viewport_Hash_Table.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Viewport_Query' => $baseDir . '/includes/resources/Optimizer/Database/Viewport_Query.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Enums\\Viewport' => $baseDir . '/includes/resources/Optimizer/Enums/Viewport.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Background_Processor' => $baseDir . '/includes/resources/Optimizer/Hash/Background_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Hash_Builder' => $baseDir . '/includes/resources/Optimizer/Hash/Hash_Builder.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Hash_Handler' => $baseDir . '/includes/resources/Optimizer/Hash/Hash_Handler.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Hash_Store' => $baseDir . '/includes/resources/Optimizer/Hash/Hash_Store.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Provider' => $baseDir . '/includes/resources/Optimizer/Hash/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Contracts\\Processor' => $baseDir . '/includes/resources/Optimizer/Image/Contracts/Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Image_Processor' => $baseDir . '/includes/resources/Optimizer/Image/Image_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Processors\\Lazy_Load_Processor' => $baseDir . '/includes/resources/Optimizer/Image/Processors/Lazy_Load_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Processors\\Sizes_Attribute_Processor' => $baseDir . '/includes/resources/Optimizer/Image/Processors/Sizes_Attribute_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Provider' => $baseDir . '/includes/resources/Optimizer/Image/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Traits\\Image_Key_Generator_Trait' => $baseDir . '/includes/resources/Optimizer/Image/Traits/Image_Key_Generator_Trait.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Background_Lazy_Loader' => $baseDir . '/includes/resources/Optimizer/Lazy_Load/Background_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Element_Lazy_Loader' => $baseDir . '/includes/resources/Optimizer/Lazy_Load/Element_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Provider' => $baseDir . '/includes/resources/Optimizer/Lazy_Load/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Sections\\Lazy_Render_Decider' => $baseDir . '/includes/resources/Optimizer/Lazy_Load/Sections/Lazy_Render_Decider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Slider_Lazy_Loader' => $baseDir . '/includes/resources/Optimizer/Lazy_Load/Slider_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Video_Poster_Lazy_Loader' => $baseDir . '/includes/resources/Optimizer/Lazy_Load/Video_Poster_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Nonce\\Nonce' => $baseDir . '/includes/resources/Optimizer/Nonce/Nonce.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Nonce\\Provider' => $baseDir . '/includes/resources/Optimizer/Nonce/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Optimizer_Provider' => $baseDir . '/includes/resources/Optimizer/Optimizer_Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Path\\Path' => $baseDir . '/includes/resources/Optimizer/Path/Path.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Path\\Path_Factory' => $baseDir . '/includes/resources/Optimizer/Path/Path_Factory.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Bulk_Action_Manager' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Bulk_Action_Manager.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Column' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Column.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Column_Hook_Manager' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Column_Hook_Manager.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Column_Registrar' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Column_Registrar.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Contracts\\Renderable' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Contracts/Renderable.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Contracts\\Sort_Strategy' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Contracts/Sort_Strategy.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Contracts\\Table_Sorter' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Contracts/Table_Sorter.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Filter' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Filter.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Provider' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Renderers\\Optimizer_Renderer' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Renderers/Optimizer_Renderer.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Row_Action' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Row_Action.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Sorters\\Meta_Sort_Exists' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Sorters/Meta_Sort_Exists.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Sorters\\Optimizer_Sorter' => $baseDir . '/includes/resources/Optimizer/Post_List_Table/Sorters/Optimizer_Sorter.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Request\\Provider' => $baseDir . '/includes/resources/Optimizer/Request/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Request\\Request' => $baseDir . '/includes/resources/Optimizer/Request/Request.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Request\\Request_Anonymizer' => $baseDir . '/includes/resources/Optimizer/Request/Request_Anonymizer.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Resource_Hints\\Google_Font_Preconnector' => $baseDir . '/includes/resources/Optimizer/Resource_Hints/Google_Font_Preconnector.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Resource_Hints\\Provider' => $baseDir . '/includes/resources/Optimizer/Resource_Hints/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\ComputedStyle' => $baseDir . '/includes/resources/Optimizer/Response/ComputedStyle.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\DeviceAnalysis' => $baseDir . '/includes/resources/Optimizer/Response/DeviceAnalysis.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\ImageAnalysis' => $baseDir . '/includes/resources/Optimizer/Response/ImageAnalysis.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\Section' => $baseDir . '/includes/resources/Optimizer/Response/Section.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\SrcsetEntry' => $baseDir . '/includes/resources/Optimizer/Response/SrcsetEntry.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\WebsiteAnalysis' => $baseDir . '/includes/resources/Optimizer/Response/WebsiteAnalysis.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Rest\\Optimize_Rest_Controller' => $baseDir . '/includes/resources/Optimizer/Rest/Optimize_Rest_Controller.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Rest\\Provider' => $baseDir . '/includes/resources/Optimizer/Rest/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Rest\\Schema' => $baseDir . '/includes/resources/Optimizer/Rest/Schema.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Provider' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rule_Collection' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Rule_Collection.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Ignored_Query_Var_Rule' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Rules/Ignored_Query_Var_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Logged_In_Rule' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Rules/Logged_In_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Not_Found_Rule' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Rules/Not_Found_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Optimizer_Request_Rule' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Rules/Optimizer_Request_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Post_Excluded_Rule' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Rules/Post_Excluded_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Skip_Rule' => $baseDir . '/includes/resources/Optimizer/Skip_Rules/Skip_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\State' => $baseDir . '/includes/resources/Optimizer/State.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Status\\Meta' => $baseDir . '/includes/resources/Optimizer/Status/Meta.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Status\\Provider' => $baseDir . '/includes/resources/Optimizer/Status/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Status\\Status' => $baseDir . '/includes/resources/Optimizer/Status/Status.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Cached_Store_Decorator' => $baseDir . '/includes/resources/Optimizer/Store/Cached_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Contracts\\Store' => $baseDir . '/includes/resources/Optimizer/Store/Contracts/Store.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Excluded_Store_Decorator' => $baseDir . '/includes/resources/Optimizer/Store/Excluded_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Expired_Store_Decorator' => $baseDir . '/includes/resources/Optimizer/Store/Expired_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Provider' => $baseDir . '/includes/resources/Optimizer/Store/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Status_Sync_Store_Decorator' => $baseDir . '/includes/resources/Optimizer/Store/Status_Sync_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Table_Store' => $baseDir . '/includes/resources/Optimizer/Store/Table_Store.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Translation\\Provider' => $baseDir . '/includes/resources/Optimizer/Translation/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Translation\\Text_Repository' => $baseDir . '/includes/resources/Optimizer/Translation/Text_Repository.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Contracts\\Terminable' => $baseDir . '/includes/resources/Shutdown/Contracts/Terminable.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Shutdown_Collection' => $baseDir . '/includes/resources/Shutdown/Shutdown_Collection.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Shutdown_Handler' => $baseDir . '/includes/resources/Shutdown/Shutdown_Handler.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Shutdown_Provider' => $baseDir . '/includes/resources/Shutdown/Shutdown_Provider.php',
'KadenceWP\\KadenceBlocks\\Traits\\Image_Size_Trait' => $baseDir . '/includes/resources/Traits/Image_Size_Trait.php',
'KadenceWP\\KadenceBlocks\\Traits\\Permalink_Trait' => $baseDir . '/includes/resources/Traits/Permalink_Trait.php',
'KadenceWP\\KadenceBlocks\\Traits\\Rest\\Image_Trait' => $baseDir . '/includes/resources/Traits/Rest/Image_Trait.php',
'KadenceWP\\KadenceBlocks\\Traits\\Viewport_Trait' => $baseDir . '/includes/resources/Traits/Viewport_Trait.php',
'KadenceWP\\KadenceBlocks\\Uplink\\Uplink_Provider' => $baseDir . '/includes/resources/Uplink/Uplink_Provider.php',
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);

View File

@@ -0,0 +1,10 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'KadenceWP\\KadenceBlocks\\' => array($baseDir . '/includes/resources'),
);

View File

@@ -0,0 +1,36 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit2b363a563784ab73a27482ad263c7374
{
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('ComposerAutoloaderInit2b363a563784ab73a27482ad263c7374', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit2b363a563784ab73a27482ad263c7374', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit2b363a563784ab73a27482ad263c7374::getInitializer($loader));
$loader->register(true);
return $loader;
}
}

View File

@@ -0,0 +1,153 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInit2b363a563784ab73a27482ad263c7374
{
public static $prefixLengthsPsr4 = array (
'K' =>
array (
'KadenceWP\\KadenceBlocks\\' => 24,
),
);
public static $prefixDirsPsr4 = array (
'KadenceWP\\KadenceBlocks\\' =>
array (
0 => __DIR__ . '/../..' . '/includes/resources',
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'KadenceWP\\KadenceBlocks\\Admin\\Admin_Provider' => __DIR__ . '/../..' . '/includes/resources/Admin/Admin_Provider.php',
'KadenceWP\\KadenceBlocks\\App' => __DIR__ . '/../..' . '/includes/resources/App.php',
'KadenceWP\\KadenceBlocks\\Asset\\Asset' => __DIR__ . '/../..' . '/includes/resources/Asset/Asset.php',
'KadenceWP\\KadenceBlocks\\Asset\\Asset_Provider' => __DIR__ . '/../..' . '/includes/resources/Asset/Asset_Provider.php',
'KadenceWP\\KadenceBlocks\\Cache\\Ai_Cache' => __DIR__ . '/../..' . '/includes/resources/Cache/Ai_Cache.php',
'KadenceWP\\KadenceBlocks\\Cache\\Block_Library_Cache' => __DIR__ . '/../..' . '/includes/resources/Cache/Block_Library_Cache.php',
'KadenceWP\\KadenceBlocks\\Cache\\Cache_Provider' => __DIR__ . '/../..' . '/includes/resources/Cache/Cache_Provider.php',
'KadenceWP\\KadenceBlocks\\Cache\\Config' => __DIR__ . '/../..' . '/includes/resources/Cache/Config.php',
'KadenceWP\\KadenceBlocks\\Container' => __DIR__ . '/../..' . '/includes/resources/Container.php',
'KadenceWP\\KadenceBlocks\\Database\\Database_Provider' => __DIR__ . '/../..' . '/includes/resources/Database/Database_Provider.php',
'KadenceWP\\KadenceBlocks\\Database\\Query' => __DIR__ . '/../..' . '/includes/resources/Database/Query.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Get_Known_Plugins' => __DIR__ . '/../..' . '/includes/resources/Harbor/Actions/Get_Known_Plugins.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Render_Harbor_License_Notice' => __DIR__ . '/../..' . '/includes/resources/Harbor/Actions/Render_Harbor_License_Notice.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Report_Legacy_Licenses' => __DIR__ . '/../..' . '/includes/resources/Harbor/Actions/Report_Legacy_Licenses.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Actions\\Suppress_Legacy_Inactive_Notices' => __DIR__ . '/../..' . '/includes/resources/Harbor/Actions/Suppress_Legacy_Inactive_Notices.php',
'KadenceWP\\KadenceBlocks\\Harbor\\Harbor_Provider' => __DIR__ . '/../..' . '/includes/resources/Harbor/Harbor_Provider.php',
'KadenceWP\\KadenceBlocks\\Hasher' => __DIR__ . '/../..' . '/includes/resources/Hasher.php',
'KadenceWP\\KadenceBlocks\\Health\\Health_Provider' => __DIR__ . '/../..' . '/includes/resources/Health/Health_Provider.php',
'KadenceWP\\KadenceBlocks\\Health\\Required_Function_Verifier' => __DIR__ . '/../..' . '/includes/resources/Health/Required_Function_Verifier.php',
'KadenceWP\\KadenceBlocks\\Home\\Home_Content_View_Model' => __DIR__ . '/../..' . '/includes/resources/Home/Home_Content_View_Model.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Cache_Primer' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/Cache_Primer.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Image_Downloader' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/Image_Downloader.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Image_Downloader_Provider' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/Image_Downloader_Provider.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Image_Editor' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/Image_Editor.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Meta' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/Meta.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\Pexels_ID_Registry' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/Pexels_ID_Registry.php',
'KadenceWP\\KadenceBlocks\\Image_Downloader\\WordPress_Importer' => __DIR__ . '/../..' . '/includes/resources/Image_Downloader/WordPress_Importer.php',
'KadenceWP\\KadenceBlocks\\Log\\Log_Provider' => __DIR__ . '/../..' . '/includes/resources/Log/Log_Provider.php',
'KadenceWP\\KadenceBlocks\\Notice\\Notice_Handler' => __DIR__ . '/../..' . '/includes/resources/Notice/Notice_Handler.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Analysis_Registry' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Analysis_Registry.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Asset\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Asset/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Asset_Loader' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Asset_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Optimizer_Query' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Database/Optimizer_Query.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Optimizer_Table' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Database/Optimizer_Table.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Database/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Viewport_Hash_Table' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Database/Viewport_Hash_Table.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Database\\Viewport_Query' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Database/Viewport_Query.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Enums\\Viewport' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Enums/Viewport.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Background_Processor' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Hash/Background_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Hash_Builder' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Hash/Hash_Builder.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Hash_Handler' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Hash/Hash_Handler.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Hash_Store' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Hash/Hash_Store.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Hash\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Hash/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Contracts\\Processor' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Image/Contracts/Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Image_Processor' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Image/Image_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Processors\\Lazy_Load_Processor' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Image/Processors/Lazy_Load_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Processors\\Sizes_Attribute_Processor' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Image/Processors/Sizes_Attribute_Processor.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Image/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Image\\Traits\\Image_Key_Generator_Trait' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Image/Traits/Image_Key_Generator_Trait.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Background_Lazy_Loader' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Lazy_Load/Background_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Element_Lazy_Loader' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Lazy_Load/Element_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Lazy_Load/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Sections\\Lazy_Render_Decider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Lazy_Load/Sections/Lazy_Render_Decider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Slider_Lazy_Loader' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Lazy_Load/Slider_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Lazy_Load\\Video_Poster_Lazy_Loader' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Lazy_Load/Video_Poster_Lazy_Loader.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Nonce\\Nonce' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Nonce/Nonce.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Nonce\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Nonce/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Optimizer_Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Optimizer_Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Path\\Path' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Path/Path.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Path\\Path_Factory' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Path/Path_Factory.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Bulk_Action_Manager' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Bulk_Action_Manager.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Column' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Column.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Column_Hook_Manager' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Column_Hook_Manager.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Column_Registrar' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Column_Registrar.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Contracts\\Renderable' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Contracts/Renderable.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Contracts\\Sort_Strategy' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Contracts/Sort_Strategy.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Contracts\\Table_Sorter' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Contracts/Table_Sorter.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Filter' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Filter.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Renderers\\Optimizer_Renderer' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Renderers/Optimizer_Renderer.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Row_Action' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Row_Action.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Sorters\\Meta_Sort_Exists' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Sorters/Meta_Sort_Exists.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Post_List_Table\\Sorters\\Optimizer_Sorter' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Post_List_Table/Sorters/Optimizer_Sorter.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Request\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Request/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Request\\Request' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Request/Request.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Request\\Request_Anonymizer' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Request/Request_Anonymizer.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Resource_Hints\\Google_Font_Preconnector' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Resource_Hints/Google_Font_Preconnector.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Resource_Hints\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Resource_Hints/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\ComputedStyle' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Response/ComputedStyle.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\DeviceAnalysis' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Response/DeviceAnalysis.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\ImageAnalysis' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Response/ImageAnalysis.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\Section' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Response/Section.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\SrcsetEntry' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Response/SrcsetEntry.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Response\\WebsiteAnalysis' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Response/WebsiteAnalysis.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Rest\\Optimize_Rest_Controller' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Rest/Optimize_Rest_Controller.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Rest\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Rest/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Rest\\Schema' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Rest/Schema.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rule_Collection' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Rule_Collection.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Ignored_Query_Var_Rule' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Rules/Ignored_Query_Var_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Logged_In_Rule' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Rules/Logged_In_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Not_Found_Rule' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Rules/Not_Found_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Optimizer_Request_Rule' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Rules/Optimizer_Request_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Rules\\Post_Excluded_Rule' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Rules/Post_Excluded_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Skip_Rules\\Skip_Rule' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Skip_Rules/Skip_Rule.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\State' => __DIR__ . '/../..' . '/includes/resources/Optimizer/State.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Status\\Meta' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Status/Meta.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Status\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Status/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Status\\Status' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Status/Status.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Cached_Store_Decorator' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Cached_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Contracts\\Store' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Contracts/Store.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Excluded_Store_Decorator' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Excluded_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Expired_Store_Decorator' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Expired_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Status_Sync_Store_Decorator' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Status_Sync_Store_Decorator.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Store\\Table_Store' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Store/Table_Store.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Translation\\Provider' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Translation/Provider.php',
'KadenceWP\\KadenceBlocks\\Optimizer\\Translation\\Text_Repository' => __DIR__ . '/../..' . '/includes/resources/Optimizer/Translation/Text_Repository.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Contracts\\Terminable' => __DIR__ . '/../..' . '/includes/resources/Shutdown/Contracts/Terminable.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Shutdown_Collection' => __DIR__ . '/../..' . '/includes/resources/Shutdown/Shutdown_Collection.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Shutdown_Handler' => __DIR__ . '/../..' . '/includes/resources/Shutdown/Shutdown_Handler.php',
'KadenceWP\\KadenceBlocks\\Shutdown\\Shutdown_Provider' => __DIR__ . '/../..' . '/includes/resources/Shutdown/Shutdown_Provider.php',
'KadenceWP\\KadenceBlocks\\Traits\\Image_Size_Trait' => __DIR__ . '/../..' . '/includes/resources/Traits/Image_Size_Trait.php',
'KadenceWP\\KadenceBlocks\\Traits\\Permalink_Trait' => __DIR__ . '/../..' . '/includes/resources/Traits/Permalink_Trait.php',
'KadenceWP\\KadenceBlocks\\Traits\\Rest\\Image_Trait' => __DIR__ . '/../..' . '/includes/resources/Traits/Rest/Image_Trait.php',
'KadenceWP\\KadenceBlocks\\Traits\\Viewport_Trait' => __DIR__ . '/../..' . '/includes/resources/Traits/Viewport_Trait.php',
'KadenceWP\\KadenceBlocks\\Uplink\\Uplink_Provider' => __DIR__ . '/../..' . '/includes/resources/Uplink/Uplink_Provider.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit2b363a563784ab73a27482ad263c7374::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit2b363a563784ab73a27482ad263c7374::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit2b363a563784ab73a27482ad263c7374::$classMap;
}, null, ClassLoader::class);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,467 @@
<?php return array(
'root' => array(
'name' => 'kadencewp/kadence-blocks',
'pretty_version' => '3.7.2',
'version' => '3.7.2.0',
'reference' => '13ba08414eb64b84cd48d1ae7c7ebd08f259a341',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => false,
),
'versions' => array(
'adbario/php-dot-notation' => array(
'pretty_version' => '3.5.0',
'version' => '3.5.0.0',
'reference' => 'aa09db5a7a365a8d2d8dd7edfa3cd501d1a8acb0',
'type' => 'library',
'install_path' => __DIR__ . '/../adbario/php-dot-notation',
'aliases' => array(),
'dev_requirement' => false,
),
'composer/installers' => array(
'pretty_version' => 'v2.3.0',
'version' => '2.3.0.0',
'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/./installers',
'aliases' => array(),
'dev_requirement' => false,
),
'enshrined/svg-sanitize' => array(
'pretty_version' => '0.22.0',
'version' => '0.22.0.0',
'reference' => '0afa95ea74be155a7bcd6c6fb60c276c39984500',
'type' => 'library',
'install_path' => __DIR__ . '/../enshrined/svg-sanitize',
'aliases' => array(),
'dev_requirement' => false,
),
'graham-campbell/result-type' => array(
'pretty_version' => 'v1.1.4',
'version' => '1.1.4.0',
'reference' => 'e01f4a821471308ba86aa202fed6698b6b695e3b',
'type' => 'library',
'install_path' => __DIR__ . '/../graham-campbell/result-type',
'aliases' => array(),
'dev_requirement' => false,
),
'kadencewp/kadence-blocks' => array(
'pretty_version' => '3.7.2',
'version' => '3.7.2.0',
'reference' => '13ba08414eb64b84cd48d1ae7c7ebd08f259a341',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'lucatume/di52' => array(
'pretty_version' => '4.0.1',
'version' => '4.0.1.0',
'reference' => '1552a86bf17db4cb098db368d2e4cbb508dcaec0',
'type' => 'library',
'install_path' => __DIR__ . '/../lucatume/di52',
'aliases' => array(),
'dev_requirement' => false,
),
'monolog/monolog' => array(
'pretty_version' => '2.11.0',
'version' => '2.11.0.0',
'reference' => '37308608e599f34a1a4845b16440047ec98a172a',
'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' => array(),
'dev_requirement' => false,
),
'nyholm/psr7' => array(
'pretty_version' => '1.8.2',
'version' => '1.8.2.0',
'reference' => 'a71f2b11690f4b24d099d6b16690a90ae14fc6f3',
'type' => 'library',
'install_path' => __DIR__ . '/../nyholm/psr7',
'aliases' => array(),
'dev_requirement' => false,
),
'php-http/async-client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '*',
),
),
'php-http/client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '*',
),
),
'php-http/message-factory-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'phpoption/phpoption' => array(
'pretty_version' => '1.9.5',
'version' => '1.9.5.0',
'reference' => '75365b91986c2405cf5e1e012c5595cd487a98be',
'type' => 'library',
'install_path' => __DIR__ . '/../phpoption/phpoption',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/container' => array(
'pretty_version' => '1.1.2',
'version' => '1.1.2.0',
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/container',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/http-client' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/http-client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'psr/http-factory' => array(
'pretty_version' => '1.1.0',
'version' => '1.1.0.0',
'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-factory',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/http-factory-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'psr/http-message' => array(
'pretty_version' => '1.1',
'version' => '1.1.0.0',
'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/http-message-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'psr/log' => array(
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/log-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0.0 || 2.0.0 || 3.0.0',
),
),
'stellarwp/arrays' => array(
'pretty_version' => '1.3.2',
'version' => '1.3.2.0',
'reference' => 'e994abcdb5d76fb5fdea7f2e1549d0603c13f91e',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/arrays',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/container-contract' => array(
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'reference' => 'b2c42c76681db314e4edbb2af0a312b6c06b495e',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/container-contract',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/db' => array(
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'reference' => '34d6c66adf323f4839c2199d6e1119c79fc87a4f',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/db',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/harbor' => array(
'pretty_version' => 'v1.2.0',
'version' => '1.2.0.0',
'reference' => 'f22783d0d79597d5b1acf6cce73e6f3ddb701334',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/harbor',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/licensing-api-client' => array(
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => '6f9e0b3e49831f49b735a9544c5fb2fea4eeedeb',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/licensing-api-client',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/licensing-api-client-wordpress' => array(
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => 'f4ece66587cd6de175ffd35d0fbc3dc06c76a1f8',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/licensing-api-client-wordpress',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/prophecy-container' => array(
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => '12f1909a47e6a43dfc7e9b9c7a5724ef326c02e5',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-container',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/prophecy-image-downloader' => array(
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => '588d74d03ed1aa81079d8bc2d15ff6bdcf940130',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-image-downloader',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/prophecy-log' => array(
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => 'b0722b8362877638cc9c19eac4c1de23fb260a4c',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-log',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/prophecy-storage' => array(
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => 'e6489144f9cd27fc353e793ae2f4bc55b5dcabf9',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-storage',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/schema' => array(
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'reference' => 'b80c02c6ee6cebcf9c21b642a7b20db5480f0cd6',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/schema',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/superglobals' => array(
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'reference' => 'a43ffa491c171f46d81a26d55e096bc8eaddfb3e',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/superglobals',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/telemetry' => array(
'pretty_version' => '2.4.1',
'version' => '2.4.1.0',
'reference' => 'c1b3a43359475460a17589dd0442310a81f51b24',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/telemetry',
'aliases' => array(),
'dev_requirement' => false,
),
'stellarwp/uplink' => array(
'pretty_version' => 'dev-bugfix/multisite-token-logic',
'version' => 'dev-bugfix/multisite-token-logic',
'reference' => '12f341b9a83011f5ece3f7f0c7fa7a96a89d1ffc',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/uplink',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'v2.5.4',
'version' => '2.5.4.0',
'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/filesystem' => array(
'pretty_version' => 'v5.4.45',
'version' => '5.4.45.0',
'reference' => '57c8294ed37d4a055b77057827c67f9558c95c54',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client' => array(
'pretty_version' => 'v5.4.49',
'version' => '5.4.49.0',
'reference' => 'd77d8e212cde7b5c4a64142bf431522f19487c28',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client-contracts' => array(
'pretty_version' => 'v2.5.5',
'version' => '2.5.5.0',
'reference' => '48ef1d0a082885877b664332b9427662065a360c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/http-client-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '2.4',
),
),
'symfony/http-foundation' => array(
'pretty_version' => 'v5.4.50',
'version' => '5.4.50.0',
'reference' => '1a0706e8b8041046052ea2695eb8aeee04f97609',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/mime' => array(
'pretty_version' => 'v5.4.45',
'version' => '5.4.45.0',
'reference' => '8c1b9b3e5b52981551fc6044539af1d974e39064',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/mime',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '141046a8f9477948ff284fa65be2095baafb94f2',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-intl-grapheme' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => 'ad1b7b9092976d6c948b8a187cec9faaea9ec1df',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-intl-idn' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '9614ac4d8061dc257ecc64cba1b140873dce8ad3',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '3833d7255cc303546435cb650316bff708a1c75c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '6a21eb99c6973357967f6ce3708cd55a6bec6315',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-php73' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '0f68c03565dcaaf25a890667542e8bd75fe7e5bb',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => 'dfb55726c3a76ea3b6459fcfda1ec2d80a682411',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/service-contracts' => array(
'pretty_version' => 'v2.5.4',
'version' => '2.5.4.0',
'reference' => 'f37b419f7aea2e9abf10abd261832cace12e3300',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/service-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/string' => array(
'pretty_version' => 'v5.4.47',
'version' => '5.4.47.0',
'reference' => '136ca7d72f72b599f2631aca474a4f8e26719799',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),
'dev_requirement' => false,
),
'symfony/translation-contracts' => array(
'pretty_version' => 'v2.5.4',
'version' => '2.5.4.0',
'reference' => '450d4172653f38818657022252f9d81be89ee9a8',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation-contracts',
'aliases' => array(),
'dev_requirement' => false,
),
'vlucas/phpdotenv' => array(
'pretty_version' => 'v5.6.3',
'version' => '5.6.3.0',
'reference' => '955e7815d677a3eaa7075231212f2110983adecc',
'type' => 'library',
'install_path' => __DIR__ . '/../vlucas/phpdotenv',
'aliases' => array(),
'dev_requirement' => false,
),
),
);

View File

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

View File

@@ -0,0 +1,675 @@
<?php
/**
* Dot - PHP dot notation access to arrays
*
* @author Riku Särkinen <riku@adbar.io>
* @link https://github.com/adbario/php-dot-notation
* @license https://github.com/adbario/php-dot-notation/blob/3.x/LICENSE.md (MIT License)
*/
namespace KadenceWP\KadenceBlocks\Adbar;
use Countable;
use ArrayAccess;
use ArrayIterator;
use JsonSerializable;
use IteratorAggregate;
use Traversable;
/**
* Dot
*
* This class provides a dot notation access and helper functions for
* working with arrays of data. Inspired by Laravel Collection.
*
* @template TKey of array-key
* @template TValue mixed
*
* @implements \ArrayAccess<TKey, TValue>
* @implements \IteratorAggregate<TKey, TValue>
*/
class Dot implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable
{
/**
* The stored items
*
* @var array<TKey, TValue>
*/
protected $items = [];
/**
* The character to use as a delimiter, defaults to dot (.)
*
* @var non-empty-string
*/
protected $delimiter = ".";
/**
* Create a new Dot instance
*
* @param mixed $items
* @param bool $parse
* @param non-empty-string $delimiter
* @return void
*/
public function __construct($items = [], $parse = false, $delimiter = ".")
{
$items = $this->getArrayItems($items);
$this->delimiter = $delimiter ?: ".";
if ($parse) {
$this->set($items);
} else {
$this->items = $items;
}
}
/**
* Set a given key / value pair or pairs
* if the key doesn't exist already
*
* @param array<TKey, TValue>|int|string $keys
* @param mixed $value
* @return $this
*/
public function add($keys, $value = null)
{
if (is_array($keys)) {
foreach ($keys as $key => $value) {
$this->add($key, $value);
}
} elseif ($this->get($keys) === null) {
$this->set($keys, $value);
}
return $this;
}
/**
* Return all the stored items
*
* @return array<TKey, TValue>
*/
public function all()
{
return $this->items;
}
/**
* Delete the contents of a given key or keys
*
* @param array<TKey>|int|string|null $keys
* @return $this
*/
public function clear($keys = null)
{
if ($keys === null) {
$this->items = [];
return $this;
}
$keys = (array) $keys;
foreach ($keys as $key) {
$this->set($key, []);
}
return $this;
}
/**
* Delete the given key or keys
*
* @param array<TKey>|array<TKey, TValue>|int|string $keys
* @return $this
*/
public function delete($keys)
{
$keys = (array) $keys;
foreach ($keys as $key) {
if ($this->exists($this->items, $key)) {
unset($this->items[$key]);
continue;
}
$items = &$this->items;
$segments = explode($this->delimiter, $key);
$lastSegment = array_pop($segments);
foreach ($segments as $segment) {
if (!isset($items[$segment]) || !is_array($items[$segment])) {
continue 2;
}
$items = &$items[$segment];
}
unset($items[$lastSegment]);
}
return $this;
}
/**
* Checks if the given key exists in the provided array.
*
* @param array<TKey, TValue> $array Array to validate
* @param int|string $key The key to look for
* @return bool
*/
protected function exists($array, $key)
{
return array_key_exists($key, $array);
}
/**
* Flatten an array with the given character as a key delimiter
*
* @param string $delimiter
* @param mixed $items
* @param string $prepend
* @return array<TKey, TValue>
*/
public function flatten($delimiter = '.', $items = null, $prepend = '')
{
$flatten = [];
if ($items === null) {
$items = $this->items;
}
foreach ($items as $key => $value) {
if (is_array($value) && !empty($value)) {
$flatten[] = $this->flatten($delimiter, $value, $prepend . $key . $delimiter);
} else {
$flatten[] = [$prepend . $key => $value];
}
}
return array_merge(...$flatten);
}
/**
* Return the value of a given key
*
* @param int|string|null $key
* @param mixed $default
* @return mixed
*/
public function get($key = null, $default = null)
{
if ($key === null) {
return $this->items;
}
if ($this->exists($this->items, $key)) {
return $this->items[$key];
}
if (!is_string($key) || strpos($key, $this->delimiter) === false) {
return $default;
}
$items = $this->items;
foreach (explode($this->delimiter, $key) as $segment) {
if (!is_array($items) || !$this->exists($items, $segment)) {
return $default;
}
$items = &$items[$segment];
}
return $items;
}
/**
* Return the given items as an array
*
* @param array<TKey, TValue>|self<TKey, TValue>|object|string $items
* @return array<TKey, TValue>
*/
protected function getArrayItems($items)
{
if (is_array($items)) {
return $items;
}
if ($items instanceof self) {
return $items->all();
}
return (array) $items;
}
/**
* Check if a given key or keys exists
*
* @param array<TKey>|int|string $keys
* @return bool
*/
public function has($keys)
{
$keys = (array) $keys;
if (!$this->items || $keys === []) {
return false;
}
foreach ($keys as $key) {
$items = $this->items;
if ($this->exists($items, $key)) {
continue;
}
foreach (explode($this->delimiter, $key) as $segment) {
if (!is_array($items) || !$this->exists($items, $segment)) {
return false;
}
$items = $items[$segment];
}
}
return true;
}
/**
* Check if a given key or keys are empty
*
* @param array<TKey>|int|string|null $keys
* @return bool
*/
public function isEmpty($keys = null)
{
if ($keys === null) {
return empty($this->items);
}
$keys = (array) $keys;
foreach ($keys as $key) {
if (!empty($this->get($key))) {
return false;
}
}
return true;
}
/**
* Merge a given array or a Dot object with the given key
* or with the whole Dot object
*
* @param array<TKey, TValue>|self<TKey, TValue>|string $key
* @param array<TKey, TValue>|self<TKey, TValue> $value
* @return $this
*/
public function merge($key, $value = [])
{
if (is_array($key)) {
$this->items = array_merge($this->items, $key);
} elseif (is_string($key)) {
$items = (array) $this->get($key);
$value = array_merge($items, $this->getArrayItems($value));
$this->set($key, $value);
} elseif ($key instanceof self) {
$this->items = array_merge($this->items, $key->all());
}
return $this;
}
/**
* Recursively merge a given array or a Dot object with the given key
* or with the whole Dot object.
*
* Duplicate keys are converted to arrays.
*
* @param array<TKey, TValue>|self<TKey, TValue>|string $key
* @param array<TKey, TValue>|self<TKey, TValue> $value
* @return $this
*/
public function mergeRecursive($key, $value = [])
{
if (is_array($key)) {
$this->items = array_merge_recursive($this->items, $key);
} elseif (is_string($key)) {
$items = (array) $this->get($key);
$value = array_merge_recursive($items, $this->getArrayItems($value));
$this->set($key, $value);
} elseif ($key instanceof self) {
$this->items = array_merge_recursive($this->items, $key->all());
}
return $this;
}
/**
* Recursively merge a given array or a Dot object with the given key
* or with the whole Dot object.
*
* Instead of converting duplicate keys to arrays, the value from
* given array will replace the value in Dot object.
*
* @param array<TKey, TValue>|self<TKey, TValue>|string $key
* @param array<TKey, TValue>|self<TKey, TValue> $value
* @return $this
*/
public function mergeRecursiveDistinct($key, $value = [])
{
if (is_array($key)) {
$this->items = $this->arrayMergeRecursiveDistinct($this->items, $key);
} elseif (is_string($key)) {
$items = (array) $this->get($key);
$value = $this->arrayMergeRecursiveDistinct($items, $this->getArrayItems($value));
$this->set($key, $value);
} elseif ($key instanceof self) {
$this->items = $this->arrayMergeRecursiveDistinct($this->items, $key->all());
}
return $this;
}
/**
* Merges two arrays recursively. In contrast to array_merge_recursive,
* duplicate keys are not converted to arrays but rather overwrite the
* value in the first array with the duplicate value in the second array.
*
* @param array<TKey, TValue>|array<TKey, array<TKey, TValue>> $array1 Initial array to merge
* @param array<TKey, TValue>|array<TKey, array<TKey, TValue>> $array2 Array to recursively merge
* @return array<TKey, TValue>|array<TKey, array<TKey, TValue>>
*/
protected function arrayMergeRecursiveDistinct(array $array1, array $array2)
{
$merged = &$array1;
foreach ($array2 as $key => $value) {
if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) {
$merged[$key] = $this->arrayMergeRecursiveDistinct($merged[$key], $value);
} else {
$merged[$key] = $value;
}
}
return $merged;
}
/**
* Return the value of a given key and
* delete the key
*
* @param int|string|null $key
* @param mixed $default
* @return mixed
*/
public function pull($key = null, $default = null)
{
if ($key === null) {
$value = $this->all();
$this->clear();
return $value;
}
$value = $this->get($key, $default);
$this->delete($key);
return $value;
}
/**
* Push a given value to the end of the array
* in a given key
*
* @param mixed $key
* @param mixed $value
* @return $this
*/
public function push($key, $value = null)
{
if ($value === null) {
$this->items[] = $key;
return $this;
}
$items = $this->get($key);
if (is_array($items) || $items === null) {
$items[] = $value;
$this->set($key, $items);
}
return $this;
}
/**
* Replace all values or values within the given key
* with an array or Dot object
*
* @param array<TKey, TValue>|self<TKey, TValue>|string $key
* @param array<TKey, TValue>|self<TKey, TValue> $value
* @return $this
*/
public function replace($key, $value = [])
{
if (is_array($key)) {
$this->items = array_replace($this->items, $key);
} elseif (is_string($key)) {
$items = (array) $this->get($key);
$value = array_replace($items, $this->getArrayItems($value));
$this->set($key, $value);
} elseif ($key instanceof self) {
$this->items = array_replace($this->items, $key->all());
}
return $this;
}
/**
* Set a given key / value pair or pairs
*
* @param array<TKey, TValue>|int|string $keys
* @param mixed $value
* @return $this
*/
public function set($keys, $value = null)
{
if (is_array($keys)) {
foreach ($keys as $key => $value) {
$this->set($key, $value);
}
return $this;
}
$items = &$this->items;
if (is_string($keys)) {
foreach (explode($this->delimiter, $keys) as $key) {
if (!isset($items[$key]) || !is_array($items[$key])) {
$items[$key] = [];
}
$items = &$items[$key];
}
}
$items = $value;
return $this;
}
/**
* Replace all items with a given array
*
* @param mixed $items
* @return $this
*/
public function setArray($items)
{
$this->items = $this->getArrayItems($items);
return $this;
}
/**
* Replace all items with a given array as a reference
*
* @param array<TKey, TValue> $items
* @return $this
*/
public function setReference(array &$items)
{
$this->items = &$items;
return $this;
}
/**
* Return the value of a given key or all the values as JSON
*
* @param mixed $key
* @param int $options
* @return string|false
*/
public function toJson($key = null, $options = 0)
{
if (is_string($key)) {
return json_encode($this->get($key), $options);
}
$options = $key === null ? 0 : $key;
return json_encode($this->items, $options);
}
/**
* Output or return a parsable string representation of the
* given array when exported by var_export()
*
* @param array<TKey, TValue> $items
* @return object
*/
public static function __set_state(array $items): object
{
return (object) $items;
}
/*
* --------------------------------------------------------------
* ArrayAccess interface
* --------------------------------------------------------------
*/
/**
* Check if a given key exists
*
* @param int|string $key
* @return bool
*/
public function offsetExists($key): bool
{
return $this->has($key);
}
/**
* Return the value of a given key
*
* @param int|string $key
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($key)
{
return $this->get($key);
}
/**
* Set a given value to the given key
*
* @param int|string|null $key
* @param mixed $value
*/
public function offsetSet($key, $value): void
{
if ($key === null) {
$this->items[] = $value;
return;
}
$this->set($key, $value);
}
/**
* Delete the given key
*
* @param int|string $key
* @return void
*/
public function offsetUnset($key): void
{
$this->delete($key);
}
/*
* --------------------------------------------------------------
* Countable interface
* --------------------------------------------------------------
*/
/**
* Return the number of items in a given key
*
* @param int|string|null $key
* @return int
*/
public function count($key = null): int
{
return count($this->get($key));
}
/*
* --------------------------------------------------------------
* IteratorAggregate interface
* --------------------------------------------------------------
*/
/**
* Get an iterator for the stored items
*
* @return \ArrayIterator<TKey, TValue>
*/
public function getIterator(): Traversable
{
return new ArrayIterator($this->items);
}
/*
* --------------------------------------------------------------
* JsonSerializable interface
* --------------------------------------------------------------
*/
/**
* Return items for JSON serialization
*
* @return array<TKey, TValue>
*/
public function jsonSerialize(): array
{
return $this->items;
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Dot - PHP dot notation access to arrays
*
* @author Riku Särkinen <riku@adbar.io>
* @link https://github.com/adbario/php-dot-notation
* @license https://github.com/adbario/php-dot-notation/blob/3.x/LICENSE.md (MIT License)
*/
use KadenceWP\KadenceBlocks\Adbar\Dot;
if (! function_exists('kadence_blocks_dot')) {
/**
* Create a new Dot object with the given items
*
* @param mixed $items
* @param bool $parse
* @param non-empty-string $delimiter
* @return \KadenceWP\KadenceBlocks\Adbar\Dot<array-key, mixed>
*/
function kadence_blocks_dot($items, $parse = false, $delimiter = ".")
{
return new Dot($items, $parse, $delimiter);
}
}

View File

@@ -0,0 +1,22 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = '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;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
throw new RuntimeException($err);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitf8363dcbecfc635007ef1656f823925a::getLoader();

View File

@@ -0,0 +1,579 @@
<?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 KadenceWP\KadenceBlocks\Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \KadenceWP\KadenceBlocks\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 \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array<string, string> $classMap Class to filename map
*
* @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 list<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)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$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 list<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)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$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] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$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 list<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 list<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 = self::$includeFile;
$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 keyed by their corresponding vendor directories.
*
* @return array<string, 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;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View File

@@ -0,0 +1,396 @@
<?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 KadenceWP\KadenceBlocks\Composer;
use KadenceWP\KadenceBlocks\Composer\Autoload\ClassLoader;
use KadenceWP\KadenceBlocks\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 string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/**
* @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
*/
private static $installedIsLocalDir;
/**
* @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 || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
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((string) $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();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
}
/**
* @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('KadenceWP\KadenceBlocks\Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @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[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
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') {
/** @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[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}
return $installed;
}
}

View File

@@ -0,0 +1,19 @@
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.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
return array(
'dfdcea4d84cc56c3d81598b2472a5a5d' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'5a419b4bb2f7a5965040d8efc8953966' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'875386c80f2a5a3cf277ace33fe8da93' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'65103efc328c252437019714646d78d6' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'927d8e7a765d7bc623222efb62a91b97' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'd5d056b9306ea8097e7737112a4134a7' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php',
'8ece15cfd601e8106a2efdbbc61f694b' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'585187f7e2ec935c3a4476894cd354f6' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php',
'f01718859281b41292746277f19290c9' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'd6163e12a8b950dfa08a2509ff6c6a91' => $vendorDir . '/symfony/string/Resources/functions.php',
);

View File

@@ -0,0 +1,9 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
return array(
);

View File

@@ -0,0 +1,59 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname(dirname($vendorDir));
return array(
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Intl\\Normalizer\\' => array($vendorDir . '/symfony/polyfill-intl-normalizer'),
'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'),
'Symfony\\Polyfill\\Intl\\Grapheme\\' => array($vendorDir . '/symfony/polyfill-intl-grapheme'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'KadenceWP\\KadenceBlocks\\lucatume\\DI52\\' => array($vendorDir . '/lucatume/di52/src'),
'KadenceWP\\KadenceBlocks\\enshrined\\svgSanitize\\' => array($vendorDir . '/enshrined/svg-sanitize/src'),
'KadenceWP\\KadenceBlocks\\Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
'KadenceWP\\KadenceBlocks\\Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'),
'KadenceWP\\KadenceBlocks\\Symfony\\Contracts\\HttpClient\\' => array($vendorDir . '/symfony/http-client-contracts'),
'KadenceWP\\KadenceBlocks\\Symfony\\Component\\String\\' => array($vendorDir . '/symfony/string'),
'KadenceWP\\KadenceBlocks\\Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'),
'KadenceWP\\KadenceBlocks\\Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'),
'KadenceWP\\KadenceBlocks\\Symfony\\Component\\HttpClient\\' => array($vendorDir . '/symfony/http-client'),
'KadenceWP\\KadenceBlocks\\Symfony\\Component\\Filesystem\\' => array($vendorDir . '/symfony/filesystem'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Uplink\\Views\\' => array($vendorDir . '/stellarwp/uplink/src/views'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Uplink\\Assets_Dir\\' => array($vendorDir . '/stellarwp/uplink/src/assets'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Uplink\\Admin_Views\\' => array($vendorDir . '/stellarwp/uplink/src/admin-views'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Uplink\\' => array($vendorDir . '/stellarwp/uplink/src/Uplink'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Telemetry\\Views_Dir\\' => array($vendorDir . '/stellarwp/telemetry/src/views'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Telemetry\\Assets_Dir\\' => array($vendorDir . '/stellarwp/telemetry/src/resources'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Telemetry\\' => array($vendorDir . '/stellarwp/telemetry/src/Telemetry'),
'KadenceWP\\KadenceBlocks\\StellarWP\\SuperGlobals\\' => array($vendorDir . '/stellarwp/superglobals/src/SuperGlobals'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Schema\\' => array($vendorDir . '/stellarwp/schema/src/Schema'),
'KadenceWP\\KadenceBlocks\\StellarWP\\ProphecyMonorepo\\Storage\\' => array($vendorDir . '/stellarwp/prophecy-storage'),
'KadenceWP\\KadenceBlocks\\StellarWP\\ProphecyMonorepo\\Log\\' => array($vendorDir . '/stellarwp/prophecy-log'),
'KadenceWP\\KadenceBlocks\\StellarWP\\ProphecyMonorepo\\ImageDownloader\\' => array($vendorDir . '/stellarwp/prophecy-image-downloader'),
'KadenceWP\\KadenceBlocks\\StellarWP\\ProphecyMonorepo\\Container\\' => array($vendorDir . '/stellarwp/prophecy-container'),
'KadenceWP\\KadenceBlocks\\StellarWP\\DB\\' => array($vendorDir . '/stellarwp/db/src/DB'),
'KadenceWP\\KadenceBlocks\\StellarWP\\ContainerContract\\' => array($vendorDir . '/stellarwp/container-contract/src'),
'KadenceWP\\KadenceBlocks\\StellarWP\\Arrays\\' => array($vendorDir . '/stellarwp/arrays/src/Arrays'),
'KadenceWP\\KadenceBlocks\\Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
'KadenceWP\\KadenceBlocks\\Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-factory/src', $vendorDir . '/psr/http-message/src'),
'KadenceWP\\KadenceBlocks\\Psr\\Http\\Client\\' => array($vendorDir . '/psr/http-client/src'),
'KadenceWP\\KadenceBlocks\\Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'KadenceWP\\KadenceBlocks\\PhpOption\\' => array($vendorDir . '/phpoption/phpoption/src/PhpOption'),
'KadenceWP\\KadenceBlocks\\Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'),
'KadenceWP\\KadenceBlocks\\Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'),
'KadenceWP\\KadenceBlocks\\LiquidWeb\\LicensingApiClient\\' => array($vendorDir . '/stellarwp/licensing-api-client/src'),
'KadenceWP\\KadenceBlocks\\LiquidWeb\\LicensingApiClientWordPress\\' => array($vendorDir . '/stellarwp/licensing-api-client-wordpress/src'),
'KadenceWP\\KadenceBlocks\\LiquidWeb\\Harbor\\Views\\' => array($vendorDir . '/stellarwp/harbor/src/views'),
'KadenceWP\\KadenceBlocks\\LiquidWeb\\Harbor\\Build_Dir\\' => array($vendorDir . '/stellarwp/harbor/build'),
'KadenceWP\\KadenceBlocks\\LiquidWeb\\Harbor\\Build_Dev_Dir\\' => array($vendorDir . '/stellarwp/harbor/build-dev'),
'KadenceWP\\KadenceBlocks\\LiquidWeb\\Harbor\\' => array($vendorDir . '/stellarwp/harbor/src/Harbor'),
'KadenceWP\\KadenceBlocks\\GrahamCampbell\\ResultType\\' => array($vendorDir . '/graham-campbell/result-type/src'),
'KadenceWP\\KadenceBlocks\\Dotenv\\' => array($vendorDir . '/vlucas/phpdotenv/src'),
'KadenceWP\\KadenceBlocks\\Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
'KadenceWP\\KadenceBlocks\\Adbar\\' => array($vendorDir . '/adbario/php-dot-notation/src'),
);

View File

@@ -0,0 +1,51 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitf8363dcbecfc635007ef1656f823925a
{
private static $loader;
public static function loadClassLoader($class)
{
if ('KadenceWP\KadenceBlocks\Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \KadenceWP\KadenceBlocks\Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitf8363dcbecfc635007ef1656f823925a', 'loadClassLoader'), true, true);
self::$loader = $loader = new \KadenceWP\KadenceBlocks\Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitf8363dcbecfc635007ef1656f823925a', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\KadenceWP\KadenceBlocks\Composer\Autoload\ComposerStaticInitf8363dcbecfc635007ef1656f823925a::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \KadenceWP\KadenceBlocks\Composer\Autoload\ComposerStaticInitf8363dcbecfc635007ef1656f823925a::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,546 @@
<?php return array (
'root' =>
array (
'name' => 'kadencewp/kadence-blocks',
'pretty_version' => '3.7.2',
'version' => '3.7.2.0',
'reference' => '13ba08414eb64b84cd48d1ae7c7ebd08f259a341',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../',
'aliases' =>
array (
),
'dev' => false,
),
'versions' =>
array (
'adbario/php-dot-notation' =>
array (
'pretty_version' => '3.5.0',
'version' => '3.5.0.0',
'reference' => 'aa09db5a7a365a8d2d8dd7edfa3cd501d1a8acb0',
'type' => 'library',
'install_path' => __DIR__ . '/../adbario/php-dot-notation',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'composer/installers' =>
array (
'pretty_version' => 'v2.3.0',
'version' => '2.3.0.0',
'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e',
'type' => 'composer-plugin',
'install_path' => 'phar:///home/runner/work/kadence-blocks/kadence-blocks/bin/strauss.phar/src/Pipeline/Autoload/./installers',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'enshrined/svg-sanitize' =>
array (
'pretty_version' => '0.22.0',
'version' => '0.22.0.0',
'reference' => '0afa95ea74be155a7bcd6c6fb60c276c39984500',
'type' => 'library',
'install_path' => __DIR__ . '/../enshrined/svg-sanitize',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'graham-campbell/result-type' =>
array (
'pretty_version' => 'v1.1.4',
'version' => '1.1.4.0',
'reference' => 'e01f4a821471308ba86aa202fed6698b6b695e3b',
'type' => 'library',
'install_path' => __DIR__ . '/../graham-campbell/result-type',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'lucatume/di52' =>
array (
'pretty_version' => '4.0.1',
'version' => '4.0.1.0',
'reference' => '1552a86bf17db4cb098db368d2e4cbb508dcaec0',
'type' => 'library',
'install_path' => __DIR__ . '/../lucatume/di52',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'monolog/monolog' =>
array (
'pretty_version' => '2.11.0',
'version' => '2.11.0.0',
'reference' => '37308608e599f34a1a4845b16440047ec98a172a',
'type' => 'library',
'install_path' => __DIR__ . '/../monolog/monolog',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'nyholm/psr7' =>
array (
'pretty_version' => '1.8.2',
'version' => '1.8.2.0',
'reference' => 'a71f2b11690f4b24d099d6b16690a90ae14fc6f3',
'type' => 'library',
'install_path' => __DIR__ . '/../nyholm/psr7',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'phpoption/phpoption' =>
array (
'pretty_version' => '1.9.5',
'version' => '1.9.5.0',
'reference' => '75365b91986c2405cf5e1e012c5595cd487a98be',
'type' => 'library',
'install_path' => __DIR__ . '/../phpoption/phpoption',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'psr/container' =>
array (
'pretty_version' => '1.1.2',
'version' => '1.1.2.0',
'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/container',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'psr/http-client' =>
array (
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-client',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'psr/http-factory' =>
array (
'pretty_version' => '1.1.0',
'version' => '1.1.0.0',
'reference' => '2b4765fddfe3b508ac62f829e852b1501d3f6e8a',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-factory',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'psr/http-message' =>
array (
'pretty_version' => '1.1',
'version' => '1.1.0.0',
'reference' => 'cb6ce4845ce34a8ad9e68117c10ee90a29919eba',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'psr/log' =>
array (
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/arrays' =>
array (
'pretty_version' => '1.3.2',
'version' => '1.3.2.0',
'reference' => 'e994abcdb5d76fb5fdea7f2e1549d0603c13f91e',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/arrays',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/container-contract' =>
array (
'pretty_version' => '1.1.1',
'version' => '1.1.1.0',
'reference' => 'b2c42c76681db314e4edbb2af0a312b6c06b495e',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/container-contract',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/db' =>
array (
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'reference' => '34d6c66adf323f4839c2199d6e1119c79fc87a4f',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/db',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/harbor' =>
array (
'pretty_version' => 'v1.2.0',
'version' => '1.2.0.0',
'reference' => 'f22783d0d79597d5b1acf6cce73e6f3ddb701334',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/harbor',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/licensing-api-client' =>
array (
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => '6f9e0b3e49831f49b735a9544c5fb2fea4eeedeb',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/licensing-api-client',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/licensing-api-client-wordpress' =>
array (
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => 'f4ece66587cd6de175ffd35d0fbc3dc06c76a1f8',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/licensing-api-client-wordpress',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/prophecy-container' =>
array (
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => '12f1909a47e6a43dfc7e9b9c7a5724ef326c02e5',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-container',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/prophecy-image-downloader' =>
array (
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => '588d74d03ed1aa81079d8bc2d15ff6bdcf940130',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-image-downloader',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/prophecy-log' =>
array (
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => 'b0722b8362877638cc9c19eac4c1de23fb260a4c',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-log',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/prophecy-storage' =>
array (
'pretty_version' => '3.0.0.74',
'version' => '3.0.0.74',
'reference' => 'e6489144f9cd27fc353e793ae2f4bc55b5dcabf9',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/prophecy-storage',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/schema' =>
array (
'pretty_version' => '2.0.1',
'version' => '2.0.1.0',
'reference' => 'b80c02c6ee6cebcf9c21b642a7b20db5480f0cd6',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/schema',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/superglobals' =>
array (
'pretty_version' => '1.3.0',
'version' => '1.3.0.0',
'reference' => 'a43ffa491c171f46d81a26d55e096bc8eaddfb3e',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/superglobals',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/telemetry' =>
array (
'pretty_version' => '2.4.1',
'version' => '2.4.1.0',
'reference' => 'c1b3a43359475460a17589dd0442310a81f51b24',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/telemetry',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'stellarwp/uplink' =>
array (
'pretty_version' => 'dev-bugfix/multisite-token-logic',
'version' => 'dev-bugfix/multisite-token-logic',
'reference' => '12f341b9a83011f5ece3f7f0c7fa7a96a89d1ffc',
'type' => 'library',
'install_path' => __DIR__ . '/../stellarwp/uplink',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/deprecation-contracts' =>
array (
'pretty_version' => 'v2.5.4',
'version' => '2.5.4.0',
'reference' => '605389f2a7e5625f273b53960dc46aeaf9c62918',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/filesystem' =>
array (
'pretty_version' => 'v5.4.45',
'version' => '5.4.45.0',
'reference' => '57c8294ed37d4a055b77057827c67f9558c95c54',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/filesystem',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/http-client' =>
array (
'pretty_version' => 'v5.4.49',
'version' => '5.4.49.0',
'reference' => 'd77d8e212cde7b5c4a64142bf431522f19487c28',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/http-client-contracts' =>
array (
'pretty_version' => 'v2.5.5',
'version' => '2.5.5.0',
'reference' => '48ef1d0a082885877b664332b9427662065a360c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-client-contracts',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/http-foundation' =>
array (
'pretty_version' => 'v5.4.50',
'version' => '5.4.50.0',
'reference' => '1a0706e8b8041046052ea2695eb8aeee04f97609',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/http-foundation',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/mime' =>
array (
'pretty_version' => 'v5.4.45',
'version' => '5.4.45.0',
'reference' => '8c1b9b3e5b52981551fc6044539af1d974e39064',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/mime',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '141046a8f9477948ff284fa65be2095baafb94f2',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-intl-grapheme' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => 'ad1b7b9092976d6c948b8a187cec9faaea9ec1df',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-intl-idn' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '9614ac4d8061dc257ecc64cba1b140873dce8ad3',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '3833d7255cc303546435cb650316bff708a1c75c',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '6a21eb99c6973357967f6ce3708cd55a6bec6315',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-php73' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => '0f68c03565dcaaf25a890667542e8bd75fe7e5bb',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'v1.36.0',
'version' => '1.36.0.0',
'reference' => 'dfb55726c3a76ea3b6459fcfda1ec2d80a682411',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/service-contracts' =>
array (
'pretty_version' => 'v2.5.4',
'version' => '2.5.4.0',
'reference' => 'f37b419f7aea2e9abf10abd261832cace12e3300',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/service-contracts',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/string' =>
array (
'pretty_version' => 'v5.4.47',
'version' => '5.4.47.0',
'reference' => '136ca7d72f72b599f2631aca474a4f8e26719799',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'symfony/translation-contracts' =>
array (
'pretty_version' => 'v2.5.4',
'version' => '2.5.4.0',
'reference' => '450d4172653f38818657022252f9d81be89ee9a8',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/translation-contracts',
'aliases' =>
array (
),
'dev_requirement' => false,
),
'vlucas/phpdotenv' =>
array (
'pretty_version' => 'v5.6.3',
'version' => '5.6.3.0',
'reference' => '955e7815d677a3eaa7075231212f2110983adecc',
'type' => 'library',
'install_path' => __DIR__ . '/../vlucas/phpdotenv',
'aliases' =>
array (
),
'dev_requirement' => false,
),
),
);

View File

@@ -0,0 +1,65 @@
name: "Continuous Integration"
on:
- push
- pull_request
env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT: "1"
permissions:
contents: read
jobs:
tests:
name: "CI"
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
dependencies: [locked]
include:
- php-version: "7.2"
dependencies: lowest
- php-version: "8.1"
dependencies: lowest
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: composer:snapshot
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: "Handle lowest dependencies update"
if: "contains(matrix.dependencies, 'lowest')"
run: "echo \"COMPOSER_FLAGS=$COMPOSER_FLAGS --prefer-lowest\" >> $GITHUB_ENV"
- name: "Install latest dependencies"
run: "composer update ${{ env.COMPOSER_FLAGS }}"
- name: "Run tests"
run: "vendor/bin/simple-phpunit --verbose"

View File

@@ -0,0 +1,33 @@
name: "PHP Lint"
on:
- push
- pull_request
permissions:
contents: read
jobs:
tests:
name: "Lint"
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: "Lint PHP files"
run: "find src/ -type f -name '*.php' -print0 | xargs -0 -L1 -P4 -- php -l -f"

View File

@@ -0,0 +1,52 @@
name: "PHPStan"
on:
- push
- pull_request
env:
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
SYMFONY_PHPUNIT_VERSION: ""
permissions:
contents: read
jobs:
tests:
name: "PHPStan"
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "8.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: "Install latest dependencies"
run: "composer update ${{ env.COMPOSER_FLAGS }}"
- name: Run PHPStan
run: |
composer require --dev phpunit/phpunit:^8.5.18 --with-all-dependencies ${{ env.COMPOSER_FLAGS }}
vendor/bin/phpstan analyse

View File

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

View File

@@ -0,0 +1,29 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class AglInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'More/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$name = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
return strtoupper($matches[1]);
}, $vars['name']);
if (null === $name) {
throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
}
$vars['name'] = $name;
return $vars;
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class AkauntingInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class AnnotateCmsInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'addons/modules/{$name}/',
'component' => 'addons/components/{$name}/',
'service' => 'addons/services/{$name}/',
);
}

View File

@@ -0,0 +1,58 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class AsgardInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'Modules/{$name}/',
'theme' => 'Themes/{$name}/'
);
/**
* Format package name.
*
* For package type asgard-module, cut off a trailing '-plugin' if present.
*
* For package type asgard-theme, cut off a trailing '-theme' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'asgard-module') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'asgard-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectPluginVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class AttogramInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
);
}

View File

@@ -0,0 +1,120 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\IO\IOInterface;
use KadenceWP\KadenceBlocks\Composer\Composer;
use KadenceWP\KadenceBlocks\Composer\Package\PackageInterface;
abstract class BaseInstaller
{
/** @var array<string, string> */
protected $locations = array();
/** @var \Composer */
protected $composer;
/** @var PackageInterface */
protected $package;
/** @var IOInterface */
protected $io;
/**
* Initializes base installer.
*/
public function __construct(PackageInterface $package, Composer $composer, IOInterface $io)
{
$this->composer = $composer;
$this->package = $package;
$this->io = $io;
}
/**
* Return the install path based on package type.
*/
public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
{
$type = $this->package->getType();
$prettyName = $this->package->getPrettyName();
if (strpos($prettyName, '/') !== false) {
list($vendor, $name) = explode('/', $prettyName);
} else {
$vendor = '';
$name = $prettyName;
}
$availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
$extra = $package->getExtra();
if (!empty($extra['installer-name'])) {
$availableVars['name'] = $extra['installer-name'];
}
$extra = $this->composer->getPackage()->getExtra();
if (!empty($extra['installer-paths'])) {
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
if ($customPath !== false) {
return $this->templatePath($customPath, $availableVars);
}
}
$packageType = substr($type, strlen($frameworkType) + 1);
$locations = $this->getLocations($frameworkType);
if (!isset($locations[$packageType])) {
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
}
return $this->templatePath($locations[$packageType], $availableVars);
}
/**
* For an installer to override to modify the vars per installer.
*
* @param array<string, string> $vars This will normally receive array{name: string, vendor: string, type: string}
* @return array<string, string>
*/
public function inflectPackageVars(array $vars): array
{
return $vars;
}
/**
* Gets the installer's locations
*
* @return array<string, string> map of package types => install path
*/
public function getLocations(string $frameworkType)
{
return $this->locations;
}
/**
* Replace vars in a path
*
* @param array<string, string> $vars
*/
protected function templatePath(string $path, array $vars = array()): string
{
if (strpos($path, '{') !== false) {
extract($vars);
preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
if (!empty($matches[1])) {
foreach ($matches[1] as $var) {
$path = str_replace('{$' . $var . '}', ${$var}, $path);
}
}
}
return $path;
}
/**
* Search through a passed paths array for a custom install path.
*
* @param array<string, string[]|string> $paths
* @return string|false
*/
protected function mapCustomInstallPaths(array $paths, string $name, string $type, ?string $vendor = null)
{
foreach ($paths as $path => $names) {
$names = (array) $names;
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
return $path;
}
}
return false;
}
protected function pregReplace(string $pattern, string $replacement, string $subject): string
{
$result = preg_replace($pattern, $replacement, $subject);
if (null === $result) {
throw new \RuntimeException('Failed to run preg_replace with ' . $pattern . ': ' . preg_last_error());
}
return $result;
}
}

View File

@@ -0,0 +1,123 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\Util\Filesystem;
/**
* Installer for Bitrix Framework. Supported types of extensions:
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
*
* You can set custom path to directory with Bitrix kernel in `composer.json`:
*
* ```json
* {
* "extra": {
* "bitrix-dir": "s1/bitrix"
* }
* }
* ```
*
* @author Nik Samokhvalov <nik@samokhvalov.info>
* @author Denis Kulichkin <onexhovia@gmail.com>
*/
class BitrixInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
);
/**
* @var string[] Storage for informations about duplicates at all the time of installation packages.
*/
private static $checkedDuplicates = array();
public function inflectPackageVars(array $vars): array
{
/** @phpstan-ignore-next-line */
if ($this->composer->getPackage()) {
$extra = $this->composer->getPackage()->getExtra();
if (isset($extra['bitrix-dir'])) {
$vars['bitrix_dir'] = $extra['bitrix-dir'];
}
}
if (!isset($vars['bitrix_dir'])) {
$vars['bitrix_dir'] = 'bitrix';
}
return parent::inflectPackageVars($vars);
}
/**
* {@inheritdoc}
*/
protected function templatePath(string $path, array $vars = array()): string
{
$templatePath = parent::templatePath($path, $vars);
$this->checkDuplicates($templatePath, $vars);
return $templatePath;
}
/**
* Duplicates search packages.
*
* @param array<string, string> $vars
*/
protected function checkDuplicates(string $path, array $vars = array()): void
{
$packageType = substr($vars['type'], strlen('bitrix') + 1);
$localDir = explode('/', $vars['bitrix_dir']);
array_pop($localDir);
$localDir[] = 'local';
$localDir = implode('/', $localDir);
$oldPath = str_replace(
array('{$bitrix_dir}', '{$name}'),
array($localDir, $vars['name']),
$this->locations[$packageType]
);
if (in_array($oldPath, static::$checkedDuplicates)) {
return;
}
if ($oldPath !== $path && file_exists($oldPath) && $this->io->isInteractive()) {
$this->io->writeError(' <error>Duplication of packages:</error>');
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
while (true) {
switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
case 'y':
$fs = new Filesystem();
$fs->removeDirectory($oldPath);
break 2;
case 'n':
break 2;
case '?':
default:
$this->io->writeError(array(
' y - delete package ' . $oldPath . ' and to continue with the installation',
' n - don\'t delete and to continue with the installation',
));
$this->io->writeError(' ? - print help');
break;
}
}
}
static::$checkedDuplicates[] = $oldPath;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class BonefishInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'package' => 'Packages/{$vendor}/{$name}/'
);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class BotbleInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'platform/plugins/{$name}/',
'theme' => 'platform/themes/{$name}/',
);
}

View File

@@ -0,0 +1,67 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\DependencyResolver\Pool;
use KadenceWP\KadenceBlocks\Composer\Semver\Constraint\Constraint;
class CakePHPInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'Plugin/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
return $vars;
}
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
$value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
$vars['name'] = implode('/', $nameParts);
return $vars;
}
/**
* Change the default plugin location when cakephp >= 3.0
*/
public function getLocations(string $frameworkType): array
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
}
return $this->locations;
}
/**
* Check if CakePHP version matches against a version
*
* @phpstan-param '='|'=='|'<'|'<='|'>'|'>='|'<>'|'!=' $matcher
*/
protected function matchesCakeVersion(string $matcher, string $version): bool
{
$repositoryManager = $this->composer->getRepositoryManager();
/** @phpstan-ignore-next-line */
if (!$repositoryManager) {
return false;
}
$repos = $repositoryManager->getLocalRepository();
/** @phpstan-ignore-next-line */
if (!$repos) {
return false;
}
return $repos->findPackage('cakephp/cakephp', new Constraint($matcher, $version)) !== null;
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ChefInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'cookbook' => 'Chef/{$vendor}/{$name}/',
'role' => 'Chef/roles/{$name}/',
);
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class CiviCrmInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'ext' => 'ext/{$name}/'
);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ClanCatsFrameworkInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'ship' => 'CCF/orbit/{$name}/',
'theme' => 'CCF/app/themes/{$name}/',
);
}

View File

@@ -0,0 +1,36 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class CockpitInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'cockpit/modules/addons/{$name}/',
);
/**
* Format module name.
*
* Strip `module-` prefix from package name.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] == 'cockpit-module') {
return $this->inflectModuleVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
public function inflectModuleVars(array $vars): array
{
$vars['name'] = ucfirst($this->pregReplace('/cockpit-/i', '', $vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class CodeIgniterInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'library' => 'application/libraries/{$name}/',
'third-party' => 'application/third_party/{$name}/',
'module' => 'application/modules/{$name}/',
);
}

View File

@@ -0,0 +1,15 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class Concrete5Installer extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'core' => 'concrete/',
'block' => 'application/blocks/{$name}/',
'package' => 'packages/{$name}/',
'theme' => 'application/themes/{$name}/',
'update' => 'updates/{$name}/',
);
}

View File

@@ -0,0 +1,15 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ConcreteCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'core' => 'concrete/',
'block' => 'application/blocks/{$name}/',
'package' => 'packages/{$name}/',
'theme' => 'application/themes/{$name}/',
'update' => 'updates/{$name}/',
);
}

View File

@@ -0,0 +1,23 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class CroogoInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'Plugin/{$name}/',
'theme' => 'View/Themed/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class DecibelInstaller extends BaseInstaller
{
/** @var array */
/** @var array<string, string> */
protected $locations = array(
'app' => 'app/{$name}/',
);
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class DframeInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/',
);
}

View File

@@ -0,0 +1,57 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class DokuWikiInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'lib/plugins/{$name}/',
'template' => 'lib/tpl/{$name}/',
);
/**
* Format package name.
*
* For package type dokuwiki-plugin, cut off a trailing '-plugin',
* or leading dokuwiki_ if present.
*
* For package type dokuwiki-template, cut off a trailing '-template' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'dokuwiki-plugin') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'dokuwiki-template') {
return $this->inflectTemplateVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectPluginVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-plugin$/', '', $vars['name']);
$vars['name'] = $this->pregReplace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectTemplateVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-template$/', '', $vars['name']);
$vars['name'] = $this->pregReplace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars;
}
}

View File

@@ -0,0 +1,16 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
* Class DolibarrInstaller
*
* @package \KadenceWP\KadenceBlocks\Composer\Installers
* @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*/
class DolibarrInstaller extends BaseInstaller
{
//TODO: Add support for scripts and themes
/** @var array<string, string> */
protected $locations = array('module' => 'htdocs/custom/{$name}/');
}

View File

@@ -0,0 +1,25 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class DrupalInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'core' => 'core/',
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
'library' => 'libraries/{$name}/',
'profile' => 'profiles/{$name}/',
'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/',
'drush' => 'drush/{$name}/',
'custom-theme' => 'themes/custom/{$name}/',
'custom-module' => 'modules/custom/{$name}/',
'custom-profile' => 'profiles/custom/{$name}/',
'drupal-multisite' => 'sites/{$name}/',
'console' => 'console/{$name}/',
'console-language' => 'console/language/{$name}/',
'config' => 'config/sync/',
'recipe' => 'recipes/{$name}',
);
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ElggInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'mod/{$name}/',
);
}

View File

@@ -0,0 +1,14 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class EliasisInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'component' => 'components/{$name}/',
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$name}/',
'template' => 'templates/{$name}/',
);
}

View File

@@ -0,0 +1,31 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\Package\PackageInterface;
class ExpressionEngineInstaller extends BaseInstaller
{
/** @var array<string, string> */
private $ee2Locations = array(
'addon' => 'system/expressionengine/third_party/{$name}/',
'theme' => 'themes/third_party/{$name}/',
);
/** @var array<string, string> */
private $ee3Locations = array(
'addon' => 'system/user/addons/{$name}/',
'theme' => 'themes/user/{$name}/',
);
public function getLocations(string $frameworkType): array
{
if ($frameworkType === 'ee2') {
$this->locations = $this->ee2Locations;
} else {
$this->locations = $this->ee3Locations;
}
return $this->locations;
}
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class EzPlatformInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'meta-assets' => 'web/assets/ezplatform/',
'assets' => 'web/assets/ezplatform/{$name}/',
);
}

View File

@@ -0,0 +1,58 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ForkCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = [
'module' => 'src/Modules/{$name}/',
'theme' => 'src/Themes/{$name}/'
];
/**
* Format package name.
*
* For package type fork-cms-module, cut off a trailing '-plugin' if present.
*
* For package type fork-cms-theme, cut off a trailing '-theme' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'fork-cms-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'fork-cms-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^fork-cms-|-module|ForkCMS|ForkCms|Forkcms|forkcms|Module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make module name camelcased
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^fork-cms-|-theme|ForkCMS|ForkCms|Forkcms|forkcms|Theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
$vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make theme name camelcased
return $vars;
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class FuelInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'fuel/app/modules/{$name}/',
'package' => 'fuel/packages/{$name}/',
'theme' => 'fuel/app/themes/{$name}/',
);
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class FuelphpInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'component' => 'components/{$name}/',
);
}

View File

@@ -0,0 +1,29 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class GravInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'user/plugins/{$name}/',
'theme' => 'user/themes/{$name}/',
);
/**
* Format package name
*/
public function inflectPackageVars(array $vars): array
{
$restrictedWords = implode('|', array_keys($this->locations));
$vars['name'] = strtolower($vars['name']);
$vars['name'] = $this->pregReplace(
'/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
'$1',
$vars['name']
);
return $vars;
}
}

View File

@@ -0,0 +1,27 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class HuradInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
$value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
$vars['name'] = implode('/', $nameParts);
return $vars;
}
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ImageCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'template' => 'templates/{$name}/',
'module' => 'application/modules/{$name}/',
'library' => 'application/libraries/{$name}/',
);
}

View File

@@ -0,0 +1,288 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\Composer;
use KadenceWP\KadenceBlocks\Composer\Installer\BinaryInstaller;
use KadenceWP\KadenceBlocks\Composer\Installer\LibraryInstaller;
use KadenceWP\KadenceBlocks\Composer\IO\IOInterface;
use KadenceWP\KadenceBlocks\Composer\Package\Package;
use KadenceWP\KadenceBlocks\Composer\Package\PackageInterface;
use KadenceWP\KadenceBlocks\Composer\Repository\InstalledRepositoryInterface;
use KadenceWP\KadenceBlocks\Composer\Util\Filesystem;
use React\Promise\PromiseInterface;
class Installer extends LibraryInstaller
{
/**
* Package types to installer class map
*
* @var array<string, string>
*/
private $supportedTypes = array(
'akaunting' => 'AkauntingInstaller',
'asgard' => 'AsgardInstaller',
'attogram' => 'AttogramInstaller',
'agl' => 'AglInstaller',
'annotatecms' => 'AnnotateCmsInstaller',
'bitrix' => 'BitrixInstaller',
'botble' => 'BotbleInstaller',
'bonefish' => 'BonefishInstaller',
'cakephp' => 'CakePHPInstaller',
'chef' => 'ChefInstaller',
'civicrm' => 'CiviCrmInstaller',
'ccframework' => 'ClanCatsFrameworkInstaller',
'cockpit' => 'CockpitInstaller',
'codeigniter' => 'CodeIgniterInstaller',
'concrete5' => 'Concrete5Installer',
'concretecms' => 'ConcreteCMSInstaller',
'croogo' => 'CroogoInstaller',
'dframe' => 'DframeInstaller',
'dokuwiki' => 'DokuWikiInstaller',
'dolibarr' => 'DolibarrInstaller',
'decibel' => 'DecibelInstaller',
'drupal' => 'DrupalInstaller',
'elgg' => 'ElggInstaller',
'eliasis' => 'EliasisInstaller',
'ee3' => 'ExpressionEngineInstaller',
'ee2' => 'ExpressionEngineInstaller',
'ezplatform' => 'EzPlatformInstaller',
'fork' => 'ForkCMSInstaller',
'fuel' => 'FuelInstaller',
'fuelphp' => 'FuelphpInstaller',
'grav' => 'GravInstaller',
'hurad' => 'HuradInstaller',
'tastyigniter' => 'TastyIgniterInstaller',
'imagecms' => 'ImageCMSInstaller',
'itop' => 'ItopInstaller',
'kanboard' => 'KanboardInstaller',
'known' => 'KnownInstaller',
'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller',
'lms' => 'LanManagementSystemInstaller',
'laravel' => 'LaravelInstaller',
'lavalite' => 'LavaLiteInstaller',
'lithium' => 'LithiumInstaller',
'magento' => 'MagentoInstaller',
'majima' => 'MajimaInstaller',
'mantisbt' => 'MantisBTInstaller',
'mako' => 'MakoInstaller',
'matomo' => 'MatomoInstaller',
'maya' => 'MayaInstaller',
'mautic' => 'MauticInstaller',
'mediawiki' => 'MediaWikiInstaller',
'miaoxing' => 'MiaoxingInstaller',
'microweber' => 'MicroweberInstaller',
'modulework' => 'MODULEWorkInstaller',
'modx' => 'ModxInstaller',
'modxevo' => 'MODXEvoInstaller',
'moodle' => 'MoodleInstaller',
'october' => 'OctoberInstaller',
'ontowiki' => 'OntoWikiInstaller',
'oxid' => 'OxidInstaller',
'osclass' => 'OsclassInstaller',
'pxcms' => 'PxcmsInstaller',
'phpbb' => 'PhpBBInstaller',
'piwik' => 'PiwikInstaller',
'plentymarkets'=> 'PlentymarketsInstaller',
'ppi' => 'PPIInstaller',
'puppet' => 'PuppetInstaller',
'radphp' => 'RadPHPInstaller',
'phifty' => 'PhiftyInstaller',
'porto' => 'PortoInstaller',
'processwire' => 'ProcessWireInstaller',
'quicksilver' => 'PantheonInstaller',
'redaxo' => 'RedaxoInstaller',
'redaxo5' => 'Redaxo5Installer',
'reindex' => 'ReIndexInstaller',
'roundcube' => 'RoundcubeInstaller',
'shopware' => 'ShopwareInstaller',
'sitedirect' => 'SiteDirectInstaller',
'silverstripe' => 'SilverStripeInstaller',
'smf' => 'SMFInstaller',
'starbug' => 'StarbugInstaller',
'sydes' => 'SyDESInstaller',
'sylius' => 'SyliusInstaller',
'tao' => 'TaoInstaller',
'thelia' => 'TheliaInstaller',
'tusk' => 'TuskInstaller',
'userfrosting' => 'UserFrostingInstaller',
'vanilla' => 'VanillaInstaller',
'whmcs' => 'WHMCSInstaller',
'winter' => 'WinterInstaller',
'wolfcms' => 'WolfCMSInstaller',
'wordpress' => 'WordPressInstaller',
'yawik' => 'YawikInstaller',
'zend' => 'ZendInstaller',
'zikula' => 'ZikulaInstaller',
'prestashop' => 'PrestashopInstaller'
);
/**
* Disables installers specified in main composer extra installer-disable
* list
*/
public function __construct(
IOInterface $io,
Composer $composer,
string $type = 'library',
?Filesystem $filesystem = null,
?BinaryInstaller $binaryInstaller = null
) {
parent::__construct($io, $composer, $type, $filesystem, $binaryInstaller);
$this->removeDisabledInstallers();
}
/**
* {@inheritDoc}
*/
public function getInstallPath(PackageInterface $package)
{
$type = $package->getType();
$frameworkType = $this->findFrameworkType($type);
if ($frameworkType === false) {
throw new \InvalidArgumentException(
'Sorry the package type of this package is not yet supported.'
);
}
$class = 'KadenceWP\\KadenceBlocks\\Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/**
* @var BaseInstaller
*/
$installer = new $class($package, $this->composer, $this->getIO());
$path = $installer->getInstallPath($package, $frameworkType);
if (!$this->filesystem->isAbsolutePath($path)) {
$path = getcwd() . '/' . $path;
}
return $path;
}
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
{
$installPath = $this->getPackageBasePath($package);
$io = $this->io;
$outputStatus = function () use ($io, $installPath) {
$io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
};
$promise = parent::uninstall($repo, $package);
// Composer v2 might return a promise here
if ($promise instanceof PromiseInterface) {
return $promise->then($outputStatus);
}
// If not, execute the code right away as parent::uninstall executed synchronously (composer v1, or v2 without async)
$outputStatus();
return null;
}
/**
* {@inheritDoc}
*
* @param string $packageType
*/
public function supports($packageType)
{
$frameworkType = $this->findFrameworkType($packageType);
if ($frameworkType === false) {
return false;
}
$locationPattern = $this->getLocationPattern($frameworkType);
return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
}
/**
* Finds a supported framework type if it exists and returns it
*
* @return string|false
*/
protected function findFrameworkType(string $type)
{
krsort($this->supportedTypes);
foreach ($this->supportedTypes as $key => $val) {
if ($key === substr($type, 0, strlen($key))) {
return substr($type, 0, strlen($key));
}
}
return false;
}
/**
* Get the second part of the regular expression to check for support of a
* package type
*/
protected function getLocationPattern(string $frameworkType): string
{
$pattern = null;
if (!empty($this->supportedTypes[$frameworkType])) {
$frameworkClass = 'KadenceWP\\KadenceBlocks\\Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/** @var BaseInstaller $framework */
$framework = new $frameworkClass(new Package('dummy/pkg', '1.0.0.0', '1.0.0'), $this->composer, $this->getIO());
$locations = array_keys($framework->getLocations($frameworkType));
if ($locations) {
$pattern = '(' . implode('|', $locations) . ')';
}
}
return $pattern ?: '(\w+)';
}
private function getIO(): IOInterface
{
return $this->io;
}
/**
* Look for installers set to be disabled in composer's extra config and
* remove them from the list of supported installers.
*
* Globals:
* - true, "all", and "*" - disable all installers.
* - false - enable all installers (useful with
* wikimedia/composer-merge-plugin or similar)
*/
protected function removeDisabledInstallers(): void
{
$extra = $this->composer->getPackage()->getExtra();
if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
// No installers are disabled
return;
}
// Get installers to disable
$disable = $extra['installer-disable'];
// Ensure $disabled is an array
if (!is_array($disable)) {
$disable = array($disable);
}
// Check which installers should be disabled
$all = array(true, "all", "*");
$intersect = array_intersect($all, $disable);
if (!empty($intersect)) {
// Disable all installers
$this->supportedTypes = array();
return;
}
// Disable specified installers
foreach ($disable as $key => $installer) {
if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
unset($this->supportedTypes[$installer]);
}
}
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class ItopInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'extension' => 'extensions/{$name}/',
);
}

View File

@@ -0,0 +1,18 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
*
* Installer for kanboard plugins
*
* kanboard.net
*
* Class KanboardInstaller
* @package \KadenceWP\KadenceBlocks\Composer\Installers
*/
class KanboardInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array('plugin' => 'plugins/{$name}/');
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class KnownInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'IdnoPlugins/{$name}/',
'theme' => 'Themes/{$name}/',
'console' => 'ConsolePlugins/{$name}/',
);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class KodiCMSInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'cms/plugins/{$name}/',
'media' => 'cms/media/vendor/{$name}/'
);
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class KohanaInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
);
}

View File

@@ -0,0 +1,27 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class LanManagementSystemInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'template' => 'templates/{$name}/',
'document-template' => 'documents/templates/{$name}/',
'userpanel-module' => 'userpanel/modules/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class LaravelInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'library' => 'libraries/{$name}/',
);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class LavaLiteInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'package' => 'packages/{$vendor}/{$name}/',
'theme' => 'public/themes/{$name}/',
);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class LithiumInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'library' => 'libraries/{$name}/',
'source' => 'libraries/_source/{$name}/',
);
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MODULEWorkInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
);
}

View File

@@ -0,0 +1,18 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
* An installer to handle MODX Evolution specifics when installing packages.
*/
class MODXEvoInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'snippet' => 'assets/snippets/{$name}/',
'plugin' => 'assets/plugins/{$name}/',
'module' => 'assets/modules/{$name}/',
'template' => 'assets/templates/{$name}/',
'lib' => 'assets/lib/{$name}/'
);
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MagentoInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'theme' => 'app/design/frontend/{$name}/',
'skin' => 'skin/frontend/default/{$name}/',
'library' => 'lib/{$name}/',
);
}

View File

@@ -0,0 +1,46 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
* Plugin/theme installer for majima
* @author David Neustadt
*/
class MajimaInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Transforms the names
*
* @param array<string, string> $vars
* @return array<string, string>
*/
public function inflectPackageVars(array $vars): array
{
return $this->correctPluginName($vars);
}
/**
* Change hyphenated names to camelcase
*
* @param array<string, string> $vars
* @return array<string, string>
*/
private function correctPluginName(array $vars): array
{
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]);
}, $vars['name']);
if (null === $camelCasedName) {
throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
}
$vars['name'] = ucfirst($camelCasedName);
return $vars;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MakoInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'package' => 'app/packages/{$name}/',
);
}

View File

@@ -0,0 +1,25 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\DependencyResolver\Pool;
class MantisBTInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
* Class MatomoInstaller
*
* @package \KadenceWP\KadenceBlocks\Composer\Installers
*/
class MatomoInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array('plugin' => 'plugins/{$name}/');
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\w)([A-Z])/', '_\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\Package\PackageInterface;
class MauticInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'themes/{$name}/',
'core' => 'app/',
);
private function getDirectoryName(): string
{
$extra = $this->package->getExtra();
if (!empty($extra['install-directory-name'])) {
return $extra['install-directory-name'];
}
return $this->toCamelCase($this->package->getPrettyName());
}
private function toCamelCase(string $packageName): string
{
return str_replace(' ', '', ucwords(str_replace('-', ' ', basename($packageName))));
}
/**
* Format package name of mautic-plugins to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] == 'mautic-plugin' || $vars['type'] == 'mautic-theme') {
$directoryName = $this->getDirectoryName();
$vars['name'] = $directoryName;
}
return $vars;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MayaInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
);
/**
* Format package name.
*
* For package type maya-module, cut off a trailing '-module' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'maya-module') {
return $this->inflectModuleVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,58 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MediaWikiInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'core' => 'core/',
'extension' => 'extensions/{$name}/',
'skin' => 'skins/{$name}/',
);
/**
* Format package name.
*
* For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
* to CamelCase keeping existing uppercase chars.
*
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'mediawiki-extension') {
return $this->inflectExtensionVars($vars);
}
if ($vars['type'] === 'mediawiki-skin') {
return $this->inflectSkinVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectExtensionVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-extension$/', '', $vars['name']);
$vars['name'] = str_replace('-', ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectSkinVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/-skin$/', '', $vars['name']);
return $vars;
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MiaoxingInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
}

View File

@@ -0,0 +1,145 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MicroweberInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'userfiles/modules/{$install_item_dir}/',
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
'template' => 'userfiles/templates/{$install_item_dir}/',
'element' => 'userfiles/elements/{$install_item_dir}/',
'vendor' => 'vendor/{$install_item_dir}/',
'components' => 'components/{$install_item_dir}/'
);
/**
* Format package name.
*
* For package type microweber-module, cut off a trailing '-module' if present
*
* For package type microweber-template, cut off a trailing '-template' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($this->package->getTargetDir() !== null && $this->package->getTargetDir() !== '') {
$vars['install_item_dir'] = $this->package->getTargetDir();
} else {
$vars['install_item_dir'] = $vars['name'];
if ($vars['type'] === 'microweber-template') {
return $this->inflectTemplateVars($vars);
}
if ($vars['type'] === 'microweber-templates') {
return $this->inflectTemplatesVars($vars);
}
if ($vars['type'] === 'microweber-core') {
return $this->inflectCoreVars($vars);
}
if ($vars['type'] === 'microweber-adapter') {
return $this->inflectCoreVars($vars);
}
if ($vars['type'] === 'microweber-module') {
return $this->inflectModuleVars($vars);
}
if ($vars['type'] === 'microweber-modules') {
return $this->inflectModulesVars($vars);
}
if ($vars['type'] === 'microweber-skin') {
return $this->inflectSkinVars($vars);
}
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
return $this->inflectElementVars($vars);
}
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectTemplateVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-template$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/template-$/', '', $vars['install_item_dir']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectTemplatesVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-templates$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/templates-$/', '', $vars['install_item_dir']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectCoreVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-providers$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/-provider$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/-adapter$/', '', $vars['install_item_dir']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModuleVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-module$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/module-$/', '', $vars['install_item_dir']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectModulesVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-modules$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/modules-$/', '', $vars['install_item_dir']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectSkinVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-skin$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/skin-$/', '', $vars['install_item_dir']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectElementVars(array $vars): array
{
$vars['install_item_dir'] = $this->pregReplace('/-elements$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/elements-$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/-element$/', '', $vars['install_item_dir']);
$vars['install_item_dir'] = $this->pregReplace('/element-$/', '', $vars['install_item_dir']);
return $vars;
}
}

View File

@@ -0,0 +1,14 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
* An installer to handle MODX specifics when installing packages.
*/
class ModxInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'extra' => 'core/packages/{$name}/'
);
}

View File

@@ -0,0 +1,73 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class MoodleInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'mod' => 'mod/{$name}/',
'admin_report' => 'admin/report/{$name}/',
'atto' => 'lib/editor/atto/plugins/{$name}/',
'tool' => 'admin/tool/{$name}/',
'assignment' => 'mod/assignment/type/{$name}/',
'assignsubmission' => 'mod/assign/submission/{$name}/',
'assignfeedback' => 'mod/assign/feedback/{$name}/',
'antivirus' => 'lib/antivirus/{$name}/',
'auth' => 'auth/{$name}/',
'availability' => 'availability/condition/{$name}/',
'block' => 'blocks/{$name}/',
'booktool' => 'mod/book/tool/{$name}/',
'cachestore' => 'cache/stores/{$name}/',
'cachelock' => 'cache/locks/{$name}/',
'calendartype' => 'calendar/type/{$name}/',
'communication' => 'communication/provider/{$name}/',
'customfield' => 'customfield/field/{$name}/',
'fileconverter' => 'files/converter/{$name}/',
'format' => 'course/format/{$name}/',
'coursereport' => 'course/report/{$name}/',
'contenttype' => 'contentbank/contenttype/{$name}/',
'customcertelement' => 'mod/customcert/element/{$name}/',
'datafield' => 'mod/data/field/{$name}/',
'dataformat' => 'dataformat/{$name}/',
'datapreset' => 'mod/data/preset/{$name}/',
'editor' => 'lib/editor/{$name}/',
'enrol' => 'enrol/{$name}/',
'filter' => 'filter/{$name}/',
'forumreport' => 'mod/forum/report/{$name}/',
'gradeexport' => 'grade/export/{$name}/',
'gradeimport' => 'grade/import/{$name}/',
'gradereport' => 'grade/report/{$name}/',
'gradingform' => 'grade/grading/form/{$name}/',
'h5plib' => 'h5p/h5plib/{$name}/',
'local' => 'local/{$name}/',
'logstore' => 'admin/tool/log/store/{$name}/',
'ltisource' => 'mod/lti/source/{$name}/',
'ltiservice' => 'mod/lti/service/{$name}/',
'media' => 'media/player/{$name}/',
'message' => 'message/output/{$name}/',
'mlbackend' => 'lib/mlbackend/{$name}/',
'mnetservice' => 'mnet/service/{$name}/',
'paygw' => 'payment/gateway/{$name}/',
'plagiarism' => 'plagiarism/{$name}/',
'portfolio' => 'portfolio/{$name}/',
'qbank' => 'question/bank/{$name}/',
'qbehaviour' => 'question/behaviour/{$name}/',
'qformat' => 'question/format/{$name}/',
'qtype' => 'question/type/{$name}/',
'quizaccess' => 'mod/quiz/accessrule/{$name}/',
'quiz' => 'mod/quiz/report/{$name}/',
'report' => 'report/{$name}/',
'repository' => 'repository/{$name}/',
'scormreport' => 'mod/scorm/report/{$name}/',
'search' => 'search/engine/{$name}/',
'theme' => 'theme/{$name}/',
'tiny' => 'lib/editor/tiny/plugins/{$name}/',
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
'profilefield' => 'user/profile/field/{$name}/',
'webservice' => 'webservice/{$name}/',
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
'workshopeval' => 'mod/workshop/eval/{$name}/',
'workshopform' => 'mod/workshop/form/{$name}/'
);
}

View File

@@ -0,0 +1,57 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class OctoberInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/',
'theme' => 'themes/{$vendor}-{$name}/'
);
/**
* Format package name.
*
* For package type october-plugin, cut off a trailing '-plugin' if present.
*
* For package type october-theme, cut off a trailing '-theme' if present.
*/
public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'october-plugin') {
return $this->inflectPluginVars($vars);
}
if ($vars['type'] === 'october-theme') {
return $this->inflectThemeVars($vars);
}
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectPluginVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^oc-|-plugin$/', '', $vars['name']);
$vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
/**
* @param array<string, string> $vars
* @return array<string, string>
*/
protected function inflectThemeVars(array $vars): array
{
$vars['name'] = $this->pregReplace('/^oc-|-theme$/', '', $vars['name']);
$vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class OntoWikiInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'extension' => 'extensions/{$name}/',
'theme' => 'extensions/themes/{$name}/',
'translation' => 'extensions/translations/{$name}/',
);
/**
* Format package name to lower case and remove ".ontowiki" suffix
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($vars['name']);
$vars['name'] = $this->pregReplace('/.ontowiki$/', '', $vars['name']);
$vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
$vars['name'] = $this->pregReplace('/-translation$/', '', $vars['name']);
return $vars;
}
}

View File

@@ -0,0 +1,14 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class OsclassInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => 'oc-content/plugins/{$name}/',
'theme' => 'oc-content/themes/{$name}/',
'language' => 'oc-content/languages/{$name}/',
);
}

View File

@@ -0,0 +1,49 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
use KadenceWP\KadenceBlocks\Composer\Package\PackageInterface;
class OxidInstaller extends BaseInstaller
{
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'application/views/{$name}/',
'out' => 'out/{$name}/',
);
public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
{
$installPath = parent::getInstallPath($package, $frameworkType);
$type = $this->package->getType();
if ($type === 'oxid-module') {
$this->prepareVendorDirectory($installPath);
}
return $installPath;
}
/**
* Makes sure there is a vendormetadata.php file inside
* the vendor folder if there is a vendor folder.
*/
protected function prepareVendorDirectory(string $installPath): void
{
$matches = '';
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
if (!$hasVendorDirectory) {
return;
}
$vendorDirectory = $matches['vendor'];
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
if (!file_exists($vendorPath)) {
mkdir($vendorPath, 0755, true);
}
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
touch($vendorMetaDataPath);
}
}

View File

@@ -0,0 +1,11 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class PPIInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'module' => 'modules/{$name}/',
);
}

View File

@@ -0,0 +1,12 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class PantheonInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'script' => 'web/private/scripts/quicksilver/{$name}',
'module' => 'web/private/scripts/quicksilver/{$name}',
);
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class PhiftyInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'bundle' => 'bundles/{$name}/',
'library' => 'libraries/{$name}/',
'framework' => 'frameworks/{$name}/',
);
}

View File

@@ -0,0 +1,13 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class PhpBBInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'extension' => 'ext/{$vendor}/{$name}/',
'language' => 'language/{$name}/',
'style' => 'styles/{$name}/',
);
}

View File

@@ -0,0 +1,24 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
/**
* Class PiwikInstaller
*
* @package \KadenceWP\KadenceBlocks\Composer\Installers
*/
class PiwikInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array('plugin' => 'plugins/{$name}/');
/**
* Format package name to CamelCase
*/
public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($this->pregReplace('/(?<=\w)([A-Z])/', '_\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
}

View File

@@ -0,0 +1,28 @@
<?php
namespace KadenceWP\KadenceBlocks\Composer\Installers;
class PlentymarketsInstaller extends BaseInstaller
{
/** @var array<string, string> */
protected $locations = array(
'plugin' => '{$name}/'
);
/**
* Remove hyphen, "plugin" and format to camelcase
*/
public function inflectPackageVars(array $vars): array
{
$nameBits = explode("-", $vars['name']);
foreach ($nameBits as $key => $name) {
$nameBits[$key] = ucfirst($name);
if (strcasecmp($name, "Plugin") == 0) {
unset($nameBits[$key]);
}
}
$vars['name'] = implode('', $nameBits);
return $vars;
}
}

Some files were not shown because too many files have changed in this diff Show More