Version Description
Download this release
Release Info
Developer | wp_media |
Plugin | Lazy Load by WP Rocket |
Version | 2.3.6 |
Comparing to | |
See all releases |
Code changes from version 2.3.5 to 2.3.6
- readme.txt +1 -1
- rocket-lazy-load.php +2 -2
- vendor/autoload.php +12 -0
- vendor/composer/ClassLoader.php +572 -0
- vendor/composer/InstalledVersions.php +352 -0
- vendor/composer/autoload_classmap.php +166 -0
- vendor/composer/autoload_namespaces.php +9 -0
- vendor/composer/autoload_psr4.php +12 -0
- vendor/composer/autoload_real.php +38 -0
- vendor/composer/autoload_static.php +205 -0
- vendor/composer/installed.json +197 -0
- vendor/composer/installed.php +53 -0
- vendor/composer/installers/composer.json +112 -0
- vendor/composer/installers/src/Composer/Installers/AglInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php +49 -0
- vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/BaseInstaller.php +137 -0
- vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php +126 -0
- vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +72 -0
- vendor/composer/installers/src/Composer/Installers/ChefInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php +34 -0
- vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php +13 -0
- vendor/composer/installers/src/Composer/Installers/CraftInstaller.php +35 -0
- vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/DframeInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php +50 -0
- vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php +22 -0
- vendor/composer/installers/src/Composer/Installers/ElggInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php +29 -0
- vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/FuelInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/GravInstaller.php +30 -0
- vendor/composer/installers/src/Composer/Installers/HuradInstaller.php +25 -0
- vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/Installer.php +280 -0
- vendor/composer/installers/src/Composer/Installers/ItopInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php +15 -0
- vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php +18 -0
- vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/KnownInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php +27 -0
- vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php +37 -0
- vendor/composer/installers/src/Composer/Installers/MakoInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php +23 -0
- vendor/composer/installers/src/Composer/Installers/MauticInstaller.php +25 -0
- vendor/composer/installers/src/Composer/Installers/MayaInstaller.php +33 -0
- vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php +51 -0
- vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php +119 -0
- vendor/composer/installers/src/Composer/Installers/ModxInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php +58 -0
- vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +47 -0
- vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php +24 -0
- vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php +14 -0
- vendor/composer/installers/src/Composer/Installers/OxidInstaller.php +59 -0
- vendor/composer/installers/src/Composer/Installers/PPIInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php +32 -0
- vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php +29 -0
- vendor/composer/installers/src/Composer/Installers/Plugin.php +27 -0
- vendor/composer/installers/src/Composer/Installers/PortoInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php +63 -0
- vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php +24 -0
- vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php +10 -0
- vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php +22 -0
- vendor/composer/installers/src/Composer/Installers/SMFInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +60 -0
- vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +35 -0
- vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php +25 -0
- vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php +49 -0
- vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php +26 -0
- vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php +16 -0
- vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php +38 -0
- vendor/composer/installers/src/Composer/Installers/TaoInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/TuskInstaller.php +14 -0
- vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php +10 -0
- vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php +49 -0
- vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php +21 -0
- vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php +9 -0
- vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +12 -0
- vendor/composer/installers/src/Composer/Installers/YawikInstaller.php +32 -0
- vendor/composer/installers/src/Composer/Installers/ZendInstaller.php +11 -0
- vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php +10 -0
- vendor/composer/installers/src/bootstrap.php +13 -0
- vendor/composer/platform_check.php +26 -0
- vendor/wp-media/rocket-lazyload-common/composer.json +49 -0
- vendor/wp-media/rocket-lazyload-common/src/Assets.php +290 -0
- vendor/wp-media/rocket-lazyload-common/src/Iframe.php +232 -0
- vendor/wp-media/rocket-lazyload-common/src/Image.php +602 -0
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smili
|
|
4 |
Â
Requires at least: 4.7
|
5 |
Â
Tested up to: 5.9.3
|
6 |
Â
Requires PHP: 5.6
|
7 |
-
Stable tag: 2.3.
|
8 |
Â
Tags: lazy load, lazy loading, defer offscreen images, lazy load plugin, lazy load images, image lazy loading, iframe lazy load, video lazy load
|
9 |
Â
|
10 |
Â
The best free lazy load plugin for WordPress. Lazy load images, videos, and iframes to improve performance and Core Web Vitals scores.
|
4 |
Â
Requires at least: 4.7
|
5 |
Â
Tested up to: 5.9.3
|
6 |
Â
Requires PHP: 5.6
|
7 |
+
Stable tag: 2.3.6
|
8 |
Â
Tags: lazy load, lazy loading, defer offscreen images, lazy load plugin, lazy load images, image lazy loading, iframe lazy load, video lazy load
|
9 |
Â
|
10 |
Â
The best free lazy load plugin for WordPress. Lazy load images, videos, and iframes to improve performance and Core Web Vitals scores.
|
rocket-lazy-load.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Â
* Plugin Name: Lazy Load - Optimize Images
|
4 |
Â
* Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
|
5 |
Â
* Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
|
6 |
-
* Version: 2.3.
|
7 |
Â
* Requires PHP: 5.6
|
8 |
Â
* Author: WP Rocket
|
9 |
Â
* Author URI: https://wp-rocket.me
|
@@ -30,7 +30,7 @@
|
|
30 |
Â
|
31 |
Â
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
32 |
Â
|
33 |
-
define( 'ROCKET_LL_VERSION', '2.3.
|
34 |
Â
define( 'ROCKET_LL_WP_VERSION', '4.9' );
|
35 |
Â
define( 'ROCKET_LL_PHP_VERSION', '5.6' );
|
36 |
Â
define( 'ROCKET_LL_BASENAME', plugin_basename( __FILE__ ) );
|
3 |
Â
* Plugin Name: Lazy Load - Optimize Images
|
4 |
Â
* Plugin URI: http://wordpress.org/plugins/rocket-lazy-load/
|
5 |
Â
* Description: The tiny Lazy Load script for WordPress without jQuery or others libraries.
|
6 |
+
* Version: 2.3.6
|
7 |
Â
* Requires PHP: 5.6
|
8 |
Â
* Author: WP Rocket
|
9 |
Â
* Author URI: https://wp-rocket.me
|
30 |
Â
|
31 |
Â
defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
32 |
Â
|
33 |
+
define( 'ROCKET_LL_VERSION', '2.3.6' );
|
34 |
Â
define( 'ROCKET_LL_WP_VERSION', '4.9' );
|
35 |
Â
define( 'ROCKET_LL_PHP_VERSION', '5.6' );
|
36 |
Â
define( 'ROCKET_LL_BASENAME', plugin_basename( __FILE__ ) );
|
vendor/autoload.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload.php @generated by Composer
|
4 |
+
|
5 |
+
if (PHP_VERSION_ID < 50600) {
|
6 |
+
echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
7 |
+
exit(1);
|
8 |
+
}
|
9 |
+
|
10 |
+
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
+
|
12 |
+
return ComposerAutoloaderInitcbaaeb9a2ec271273e02d69450aa69d8::getLoader();
|
vendor/composer/ClassLoader.php
ADDED
@@ -0,0 +1,572 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer\Autoload;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
|
17 |
+
*
|
18 |
+
* $loader = new \Composer\Autoload\ClassLoader();
|
19 |
+
*
|
20 |
+
* // register classes with namespaces
|
21 |
+
* $loader->add('Symfony\Component', __DIR__.'/component');
|
22 |
+
* $loader->add('Symfony', __DIR__.'/framework');
|
23 |
+
*
|
24 |
+
* // activate the autoloader
|
25 |
+
* $loader->register();
|
26 |
+
*
|
27 |
+
* // to enable searching the include path (eg. for PEAR packages)
|
28 |
+
* $loader->setUseIncludePath(true);
|
29 |
+
*
|
30 |
+
* In this example, if you try to use a class in the Symfony\Component
|
31 |
+
* namespace or one of its children (Symfony\Component\Console for instance),
|
32 |
+
* the autoloader will first look for the class under the component/
|
33 |
+
* directory, and it will then fallback to the framework/ directory if not
|
34 |
+
* found before giving up.
|
35 |
+
*
|
36 |
+
* This class is loosely based on the Symfony UniversalClassLoader.
|
37 |
+
*
|
38 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
39 |
+
* @author Jordi Boggiano <j.boggiano@seld.be>
|
40 |
+
* @see https://www.php-fig.org/psr/psr-0/
|
41 |
+
* @see https://www.php-fig.org/psr/psr-4/
|
42 |
+
*/
|
43 |
+
class ClassLoader
|
44 |
+
{
|
45 |
+
/** @var ?string */
|
46 |
+
private $vendorDir;
|
47 |
+
|
48 |
+
// PSR-4
|
49 |
+
/**
|
50 |
+
* @var array[]
|
51 |
+
* @psalm-var array<string, array<string, int>>
|
52 |
+
*/
|
53 |
+
private $prefixLengthsPsr4 = array();
|
54 |
+
/**
|
55 |
+
* @var array[]
|
56 |
+
* @psalm-var array<string, array<int, string>>
|
57 |
+
*/
|
58 |
+
private $prefixDirsPsr4 = array();
|
59 |
+
/**
|
60 |
+
* @var array[]
|
61 |
+
* @psalm-var array<string, string>
|
62 |
+
*/
|
63 |
+
private $fallbackDirsPsr4 = array();
|
64 |
+
|
65 |
+
// PSR-0
|
66 |
+
/**
|
67 |
+
* @var array[]
|
68 |
+
* @psalm-var array<string, array<string, string[]>>
|
69 |
+
*/
|
70 |
+
private $prefixesPsr0 = array();
|
71 |
+
/**
|
72 |
+
* @var array[]
|
73 |
+
* @psalm-var array<string, string>
|
74 |
+
*/
|
75 |
+
private $fallbackDirsPsr0 = array();
|
76 |
+
|
77 |
+
/** @var bool */
|
78 |
+
private $useIncludePath = false;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @var string[]
|
82 |
+
* @psalm-var array<string, string>
|
83 |
+
*/
|
84 |
+
private $classMap = array();
|
85 |
+
|
86 |
+
/** @var bool */
|
87 |
+
private $classMapAuthoritative = false;
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @var bool[]
|
91 |
+
* @psalm-var array<string, bool>
|
92 |
+
*/
|
93 |
+
private $missingClasses = array();
|
94 |
+
|
95 |
+
/** @var ?string */
|
96 |
+
private $apcuPrefix;
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @var self[]
|
100 |
+
*/
|
101 |
+
private static $registeredLoaders = array();
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param ?string $vendorDir
|
105 |
+
*/
|
106 |
+
public function __construct($vendorDir = null)
|
107 |
+
{
|
108 |
+
$this->vendorDir = $vendorDir;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return string[]
|
113 |
+
*/
|
114 |
+
public function getPrefixes()
|
115 |
+
{
|
116 |
+
if (!empty($this->prefixesPsr0)) {
|
117 |
+
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
|
118 |
+
}
|
119 |
+
|
120 |
+
return array();
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @return array[]
|
125 |
+
* @psalm-return array<string, array<int, string>>
|
126 |
+
*/
|
127 |
+
public function getPrefixesPsr4()
|
128 |
+
{
|
129 |
+
return $this->prefixDirsPsr4;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* @return array[]
|
134 |
+
* @psalm-return array<string, string>
|
135 |
+
*/
|
136 |
+
public function getFallbackDirs()
|
137 |
+
{
|
138 |
+
return $this->fallbackDirsPsr0;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* @return array[]
|
143 |
+
* @psalm-return array<string, string>
|
144 |
+
*/
|
145 |
+
public function getFallbackDirsPsr4()
|
146 |
+
{
|
147 |
+
return $this->fallbackDirsPsr4;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @return string[] Array of classname => path
|
152 |
+
* @psalm-return array<string, string>
|
153 |
+
*/
|
154 |
+
public function getClassMap()
|
155 |
+
{
|
156 |
+
return $this->classMap;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* @param string[] $classMap Class to filename map
|
161 |
+
* @psalm-param array<string, string> $classMap
|
162 |
+
*
|
163 |
+
* @return void
|
164 |
+
*/
|
165 |
+
public function addClassMap(array $classMap)
|
166 |
+
{
|
167 |
+
if ($this->classMap) {
|
168 |
+
$this->classMap = array_merge($this->classMap, $classMap);
|
169 |
+
} else {
|
170 |
+
$this->classMap = $classMap;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Registers a set of PSR-0 directories for a given prefix, either
|
176 |
+
* appending or prepending to the ones previously set for this prefix.
|
177 |
+
*
|
178 |
+
* @param string $prefix The prefix
|
179 |
+
* @param string[]|string $paths The PSR-0 root directories
|
180 |
+
* @param bool $prepend Whether to prepend the directories
|
181 |
+
*
|
182 |
+
* @return void
|
183 |
+
*/
|
184 |
+
public function add($prefix, $paths, $prepend = false)
|
185 |
+
{
|
186 |
+
if (!$prefix) {
|
187 |
+
if ($prepend) {
|
188 |
+
$this->fallbackDirsPsr0 = array_merge(
|
189 |
+
(array) $paths,
|
190 |
+
$this->fallbackDirsPsr0
|
191 |
+
);
|
192 |
+
} else {
|
193 |
+
$this->fallbackDirsPsr0 = array_merge(
|
194 |
+
$this->fallbackDirsPsr0,
|
195 |
+
(array) $paths
|
196 |
+
);
|
197 |
+
}
|
198 |
+
|
199 |
+
return;
|
200 |
+
}
|
201 |
+
|
202 |
+
$first = $prefix[0];
|
203 |
+
if (!isset($this->prefixesPsr0[$first][$prefix])) {
|
204 |
+
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
|
205 |
+
|
206 |
+
return;
|
207 |
+
}
|
208 |
+
if ($prepend) {
|
209 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
210 |
+
(array) $paths,
|
211 |
+
$this->prefixesPsr0[$first][$prefix]
|
212 |
+
);
|
213 |
+
} else {
|
214 |
+
$this->prefixesPsr0[$first][$prefix] = array_merge(
|
215 |
+
$this->prefixesPsr0[$first][$prefix],
|
216 |
+
(array) $paths
|
217 |
+
);
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Registers a set of PSR-4 directories for a given namespace, either
|
223 |
+
* appending or prepending to the ones previously set for this namespace.
|
224 |
+
*
|
225 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
226 |
+
* @param string[]|string $paths The PSR-4 base directories
|
227 |
+
* @param bool $prepend Whether to prepend the directories
|
228 |
+
*
|
229 |
+
* @throws \InvalidArgumentException
|
230 |
+
*
|
231 |
+
* @return void
|
232 |
+
*/
|
233 |
+
public function addPsr4($prefix, $paths, $prepend = false)
|
234 |
+
{
|
235 |
+
if (!$prefix) {
|
236 |
+
// Register directories for the root namespace.
|
237 |
+
if ($prepend) {
|
238 |
+
$this->fallbackDirsPsr4 = array_merge(
|
239 |
+
(array) $paths,
|
240 |
+
$this->fallbackDirsPsr4
|
241 |
+
);
|
242 |
+
} else {
|
243 |
+
$this->fallbackDirsPsr4 = array_merge(
|
244 |
+
$this->fallbackDirsPsr4,
|
245 |
+
(array) $paths
|
246 |
+
);
|
247 |
+
}
|
248 |
+
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
249 |
+
// Register directories for a new namespace.
|
250 |
+
$length = strlen($prefix);
|
251 |
+
if ('\\' !== $prefix[$length - 1]) {
|
252 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
253 |
+
}
|
254 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
255 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
256 |
+
} elseif ($prepend) {
|
257 |
+
// Prepend directories for an already registered namespace.
|
258 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
259 |
+
(array) $paths,
|
260 |
+
$this->prefixDirsPsr4[$prefix]
|
261 |
+
);
|
262 |
+
} else {
|
263 |
+
// Append directories for an already registered namespace.
|
264 |
+
$this->prefixDirsPsr4[$prefix] = array_merge(
|
265 |
+
$this->prefixDirsPsr4[$prefix],
|
266 |
+
(array) $paths
|
267 |
+
);
|
268 |
+
}
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Registers a set of PSR-0 directories for a given prefix,
|
273 |
+
* replacing any others previously set for this prefix.
|
274 |
+
*
|
275 |
+
* @param string $prefix The prefix
|
276 |
+
* @param string[]|string $paths The PSR-0 base directories
|
277 |
+
*
|
278 |
+
* @return void
|
279 |
+
*/
|
280 |
+
public function set($prefix, $paths)
|
281 |
+
{
|
282 |
+
if (!$prefix) {
|
283 |
+
$this->fallbackDirsPsr0 = (array) $paths;
|
284 |
+
} else {
|
285 |
+
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Registers a set of PSR-4 directories for a given namespace,
|
291 |
+
* replacing any others previously set for this namespace.
|
292 |
+
*
|
293 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
294 |
+
* @param string[]|string $paths The PSR-4 base directories
|
295 |
+
*
|
296 |
+
* @throws \InvalidArgumentException
|
297 |
+
*
|
298 |
+
* @return void
|
299 |
+
*/
|
300 |
+
public function setPsr4($prefix, $paths)
|
301 |
+
{
|
302 |
+
if (!$prefix) {
|
303 |
+
$this->fallbackDirsPsr4 = (array) $paths;
|
304 |
+
} else {
|
305 |
+
$length = strlen($prefix);
|
306 |
+
if ('\\' !== $prefix[$length - 1]) {
|
307 |
+
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
308 |
+
}
|
309 |
+
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
310 |
+
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Turns on searching the include path for class files.
|
316 |
+
*
|
317 |
+
* @param bool $useIncludePath
|
318 |
+
*
|
319 |
+
* @return void
|
320 |
+
*/
|
321 |
+
public function setUseIncludePath($useIncludePath)
|
322 |
+
{
|
323 |
+
$this->useIncludePath = $useIncludePath;
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Can be used to check if the autoloader uses the include path to check
|
328 |
+
* for classes.
|
329 |
+
*
|
330 |
+
* @return bool
|
331 |
+
*/
|
332 |
+
public function getUseIncludePath()
|
333 |
+
{
|
334 |
+
return $this->useIncludePath;
|
335 |
+
}
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Turns off searching the prefix and fallback directories for classes
|
339 |
+
* that have not been registered with the class map.
|
340 |
+
*
|
341 |
+
* @param bool $classMapAuthoritative
|
342 |
+
*
|
343 |
+
* @return void
|
344 |
+
*/
|
345 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
346 |
+
{
|
347 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
348 |
+
}
|
349 |
+
|
350 |
+
/**
|
351 |
+
* Should class lookup fail if not found in the current class map?
|
352 |
+
*
|
353 |
+
* @return bool
|
354 |
+
*/
|
355 |
+
public function isClassMapAuthoritative()
|
356 |
+
{
|
357 |
+
return $this->classMapAuthoritative;
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
|
362 |
+
*
|
363 |
+
* @param string|null $apcuPrefix
|
364 |
+
*
|
365 |
+
* @return void
|
366 |
+
*/
|
367 |
+
public function setApcuPrefix($apcuPrefix)
|
368 |
+
{
|
369 |
+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* The APCu prefix in use, or null if APCu caching is not enabled.
|
374 |
+
*
|
375 |
+
* @return string|null
|
376 |
+
*/
|
377 |
+
public function getApcuPrefix()
|
378 |
+
{
|
379 |
+
return $this->apcuPrefix;
|
380 |
+
}
|
381 |
+
|
382 |
+
/**
|
383 |
+
* Registers this instance as an autoloader.
|
384 |
+
*
|
385 |
+
* @param bool $prepend Whether to prepend the autoloader or not
|
386 |
+
*
|
387 |
+
* @return void
|
388 |
+
*/
|
389 |
+
public function register($prepend = false)
|
390 |
+
{
|
391 |
+
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
|
392 |
+
|
393 |
+
if (null === $this->vendorDir) {
|
394 |
+
return;
|
395 |
+
}
|
396 |
+
|
397 |
+
if ($prepend) {
|
398 |
+
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
|
399 |
+
} else {
|
400 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
401 |
+
self::$registeredLoaders[$this->vendorDir] = $this;
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Unregisters this instance as an autoloader.
|
407 |
+
*
|
408 |
+
* @return void
|
409 |
+
*/
|
410 |
+
public function unregister()
|
411 |
+
{
|
412 |
+
spl_autoload_unregister(array($this, 'loadClass'));
|
413 |
+
|
414 |
+
if (null !== $this->vendorDir) {
|
415 |
+
unset(self::$registeredLoaders[$this->vendorDir]);
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Loads the given class or interface.
|
421 |
+
*
|
422 |
+
* @param string $class The name of the class
|
423 |
+
* @return true|null True if loaded, null otherwise
|
424 |
+
*/
|
425 |
+
public function loadClass($class)
|
426 |
+
{
|
427 |
+
if ($file = $this->findFile($class)) {
|
428 |
+
includeFile($file);
|
429 |
+
|
430 |
+
return true;
|
431 |
+
}
|
432 |
+
|
433 |
+
return null;
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Finds the path to the file where the class is defined.
|
438 |
+
*
|
439 |
+
* @param string $class The name of the class
|
440 |
+
*
|
441 |
+
* @return string|false The path if found, false otherwise
|
442 |
+
*/
|
443 |
+
public function findFile($class)
|
444 |
+
{
|
445 |
+
// class map lookup
|
446 |
+
if (isset($this->classMap[$class])) {
|
447 |
+
return $this->classMap[$class];
|
448 |
+
}
|
449 |
+
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
450 |
+
return false;
|
451 |
+
}
|
452 |
+
if (null !== $this->apcuPrefix) {
|
453 |
+
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
|
454 |
+
if ($hit) {
|
455 |
+
return $file;
|
456 |
+
}
|
457 |
+
}
|
458 |
+
|
459 |
+
$file = $this->findFileWithExtension($class, '.php');
|
460 |
+
|
461 |
+
// Search for Hack files if we are running on HHVM
|
462 |
+
if (false === $file && defined('HHVM_VERSION')) {
|
463 |
+
$file = $this->findFileWithExtension($class, '.hh');
|
464 |
+
}
|
465 |
+
|
466 |
+
if (null !== $this->apcuPrefix) {
|
467 |
+
apcu_add($this->apcuPrefix.$class, $file);
|
468 |
+
}
|
469 |
+
|
470 |
+
if (false === $file) {
|
471 |
+
// Remember that this class does not exist.
|
472 |
+
$this->missingClasses[$class] = true;
|
473 |
+
}
|
474 |
+
|
475 |
+
return $file;
|
476 |
+
}
|
477 |
+
|
478 |
+
/**
|
479 |
+
* Returns the currently registered loaders indexed by their corresponding vendor directories.
|
480 |
+
*
|
481 |
+
* @return self[]
|
482 |
+
*/
|
483 |
+
public static function getRegisteredLoaders()
|
484 |
+
{
|
485 |
+
return self::$registeredLoaders;
|
486 |
+
}
|
487 |
+
|
488 |
+
/**
|
489 |
+
* @param string $class
|
490 |
+
* @param string $ext
|
491 |
+
* @return string|false
|
492 |
+
*/
|
493 |
+
private function findFileWithExtension($class, $ext)
|
494 |
+
{
|
495 |
+
// PSR-4 lookup
|
496 |
+
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
497 |
+
|
498 |
+
$first = $class[0];
|
499 |
+
if (isset($this->prefixLengthsPsr4[$first])) {
|
500 |
+
$subPath = $class;
|
501 |
+
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
502 |
+
$subPath = substr($subPath, 0, $lastPos);
|
503 |
+
$search = $subPath . '\\';
|
504 |
+
if (isset($this->prefixDirsPsr4[$search])) {
|
505 |
+
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
506 |
+
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
507 |
+
if (file_exists($file = $dir . $pathEnd)) {
|
508 |
+
return $file;
|
509 |
+
}
|
510 |
+
}
|
511 |
+
}
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
// PSR-4 fallback dirs
|
516 |
+
foreach ($this->fallbackDirsPsr4 as $dir) {
|
517 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
|
518 |
+
return $file;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
|
522 |
+
// PSR-0 lookup
|
523 |
+
if (false !== $pos = strrpos($class, '\\')) {
|
524 |
+
// namespaced class name
|
525 |
+
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
|
526 |
+
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
|
527 |
+
} else {
|
528 |
+
// PEAR-like class name
|
529 |
+
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
|
530 |
+
}
|
531 |
+
|
532 |
+
if (isset($this->prefixesPsr0[$first])) {
|
533 |
+
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
|
534 |
+
if (0 === strpos($class, $prefix)) {
|
535 |
+
foreach ($dirs as $dir) {
|
536 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
537 |
+
return $file;
|
538 |
+
}
|
539 |
+
}
|
540 |
+
}
|
541 |
+
}
|
542 |
+
}
|
543 |
+
|
544 |
+
// PSR-0 fallback dirs
|
545 |
+
foreach ($this->fallbackDirsPsr0 as $dir) {
|
546 |
+
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
|
547 |
+
return $file;
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
// PSR-0 include paths.
|
552 |
+
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
553 |
+
return $file;
|
554 |
+
}
|
555 |
+
|
556 |
+
return false;
|
557 |
+
}
|
558 |
+
}
|
559 |
+
|
560 |
+
/**
|
561 |
+
* Scope isolated include.
|
562 |
+
*
|
563 |
+
* Prevents access to $this/self from included files.
|
564 |
+
*
|
565 |
+
* @param string $file
|
566 |
+
* @return void
|
567 |
+
* @private
|
568 |
+
*/
|
569 |
+
function includeFile($file)
|
570 |
+
{
|
571 |
+
include $file;
|
572 |
+
}
|
vendor/composer/InstalledVersions.php
ADDED
@@ -0,0 +1,352 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Composer.
|
5 |
+
*
|
6 |
+
* (c) Nils Adermann <naderman@naderman.de>
|
7 |
+
* Jordi Boggiano <j.boggiano@seld.be>
|
8 |
+
*
|
9 |
+
* For the full copyright and license information, please view the LICENSE
|
10 |
+
* file that was distributed with this source code.
|
11 |
+
*/
|
12 |
+
|
13 |
+
namespace Composer;
|
14 |
+
|
15 |
+
use Composer\Autoload\ClassLoader;
|
16 |
+
use Composer\Semver\VersionParser;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* This class is copied in every Composer installed project and available to all
|
20 |
+
*
|
21 |
+
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
|
22 |
+
*
|
23 |
+
* To require its presence, you can require `composer-runtime-api ^2.0`
|
24 |
+
*
|
25 |
+
* @final
|
26 |
+
*/
|
27 |
+
class InstalledVersions
|
28 |
+
{
|
29 |
+
/**
|
30 |
+
* @var mixed[]|null
|
31 |
+
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
|
32 |
+
*/
|
33 |
+
private static $installed;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var bool|null
|
37 |
+
*/
|
38 |
+
private static $canGetVendors;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var array[]
|
42 |
+
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
43 |
+
*/
|
44 |
+
private static $installedByVendor = array();
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Returns a list of all package names which are present, either by being installed, replaced or provided
|
48 |
+
*
|
49 |
+
* @return string[]
|
50 |
+
* @psalm-return list<string>
|
51 |
+
*/
|
52 |
+
public static function getInstalledPackages()
|
53 |
+
{
|
54 |
+
$packages = array();
|
55 |
+
foreach (self::getInstalled() as $installed) {
|
56 |
+
$packages[] = array_keys($installed['versions']);
|
57 |
+
}
|
58 |
+
|
59 |
+
if (1 === \count($packages)) {
|
60 |
+
return $packages[0];
|
61 |
+
}
|
62 |
+
|
63 |
+
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Returns a list of all package names with a specific type e.g. 'library'
|
68 |
+
*
|
69 |
+
* @param string $type
|
70 |
+
* @return string[]
|
71 |
+
* @psalm-return list<string>
|
72 |
+
*/
|
73 |
+
public static function getInstalledPackagesByType($type)
|
74 |
+
{
|
75 |
+
$packagesByType = array();
|
76 |
+
|
77 |
+
foreach (self::getInstalled() as $installed) {
|
78 |
+
foreach ($installed['versions'] as $name => $package) {
|
79 |
+
if (isset($package['type']) && $package['type'] === $type) {
|
80 |
+
$packagesByType[] = $name;
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
return $packagesByType;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Checks whether the given package is installed
|
90 |
+
*
|
91 |
+
* This also returns true if the package name is provided or replaced by another package
|
92 |
+
*
|
93 |
+
* @param string $packageName
|
94 |
+
* @param bool $includeDevRequirements
|
95 |
+
* @return bool
|
96 |
+
*/
|
97 |
+
public static function isInstalled($packageName, $includeDevRequirements = true)
|
98 |
+
{
|
99 |
+
foreach (self::getInstalled() as $installed) {
|
100 |
+
if (isset($installed['versions'][$packageName])) {
|
101 |
+
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
return false;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Checks whether the given package satisfies a version constraint
|
110 |
+
*
|
111 |
+
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
|
112 |
+
*
|
113 |
+
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
|
114 |
+
*
|
115 |
+
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
|
116 |
+
* @param string $packageName
|
117 |
+
* @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
|
118 |
+
* @return bool
|
119 |
+
*/
|
120 |
+
public static function satisfies(VersionParser $parser, $packageName, $constraint)
|
121 |
+
{
|
122 |
+
$constraint = $parser->parseConstraints($constraint);
|
123 |
+
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
|
124 |
+
|
125 |
+
return $provided->matches($constraint);
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Returns a version constraint representing all the range(s) which are installed for a given package
|
130 |
+
*
|
131 |
+
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
|
132 |
+
* whether a given version of a package is installed, and not just whether it exists
|
133 |
+
*
|
134 |
+
* @param string $packageName
|
135 |
+
* @return string Version constraint usable with composer/semver
|
136 |
+
*/
|
137 |
+
public static function getVersionRanges($packageName)
|
138 |
+
{
|
139 |
+
foreach (self::getInstalled() as $installed) {
|
140 |
+
if (!isset($installed['versions'][$packageName])) {
|
141 |
+
continue;
|
142 |
+
}
|
143 |
+
|
144 |
+
$ranges = array();
|
145 |
+
if (isset($installed['versions'][$packageName]['pretty_version'])) {
|
146 |
+
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
|
147 |
+
}
|
148 |
+
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
|
149 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
|
150 |
+
}
|
151 |
+
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
|
152 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
|
153 |
+
}
|
154 |
+
if (array_key_exists('provided', $installed['versions'][$packageName])) {
|
155 |
+
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
|
156 |
+
}
|
157 |
+
|
158 |
+
return implode(' || ', $ranges);
|
159 |
+
}
|
160 |
+
|
161 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* @param string $packageName
|
166 |
+
* @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
|
167 |
+
*/
|
168 |
+
public static function getVersion($packageName)
|
169 |
+
{
|
170 |
+
foreach (self::getInstalled() as $installed) {
|
171 |
+
if (!isset($installed['versions'][$packageName])) {
|
172 |
+
continue;
|
173 |
+
}
|
174 |
+
|
175 |
+
if (!isset($installed['versions'][$packageName]['version'])) {
|
176 |
+
return null;
|
177 |
+
}
|
178 |
+
|
179 |
+
return $installed['versions'][$packageName]['version'];
|
180 |
+
}
|
181 |
+
|
182 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* @param string $packageName
|
187 |
+
* @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
|
188 |
+
*/
|
189 |
+
public static function getPrettyVersion($packageName)
|
190 |
+
{
|
191 |
+
foreach (self::getInstalled() as $installed) {
|
192 |
+
if (!isset($installed['versions'][$packageName])) {
|
193 |
+
continue;
|
194 |
+
}
|
195 |
+
|
196 |
+
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
|
197 |
+
return null;
|
198 |
+
}
|
199 |
+
|
200 |
+
return $installed['versions'][$packageName]['pretty_version'];
|
201 |
+
}
|
202 |
+
|
203 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* @param string $packageName
|
208 |
+
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
|
209 |
+
*/
|
210 |
+
public static function getReference($packageName)
|
211 |
+
{
|
212 |
+
foreach (self::getInstalled() as $installed) {
|
213 |
+
if (!isset($installed['versions'][$packageName])) {
|
214 |
+
continue;
|
215 |
+
}
|
216 |
+
|
217 |
+
if (!isset($installed['versions'][$packageName]['reference'])) {
|
218 |
+
return null;
|
219 |
+
}
|
220 |
+
|
221 |
+
return $installed['versions'][$packageName]['reference'];
|
222 |
+
}
|
223 |
+
|
224 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* @param string $packageName
|
229 |
+
* @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.
|
230 |
+
*/
|
231 |
+
public static function getInstallPath($packageName)
|
232 |
+
{
|
233 |
+
foreach (self::getInstalled() as $installed) {
|
234 |
+
if (!isset($installed['versions'][$packageName])) {
|
235 |
+
continue;
|
236 |
+
}
|
237 |
+
|
238 |
+
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
|
239 |
+
}
|
240 |
+
|
241 |
+
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* @return array
|
246 |
+
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
|
247 |
+
*/
|
248 |
+
public static function getRootPackage()
|
249 |
+
{
|
250 |
+
$installed = self::getInstalled();
|
251 |
+
|
252 |
+
return $installed[0]['root'];
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Returns the raw installed.php data for custom implementations
|
257 |
+
*
|
258 |
+
* @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.
|
259 |
+
* @return array[]
|
260 |
+
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
|
261 |
+
*/
|
262 |
+
public static function getRawData()
|
263 |
+
{
|
264 |
+
@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);
|
265 |
+
|
266 |
+
if (null === self::$installed) {
|
267 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
268 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
269 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
270 |
+
self::$installed = include __DIR__ . '/installed.php';
|
271 |
+
} else {
|
272 |
+
self::$installed = array();
|
273 |
+
}
|
274 |
+
}
|
275 |
+
|
276 |
+
return self::$installed;
|
277 |
+
}
|
278 |
+
|
279 |
+
/**
|
280 |
+
* Returns the raw data of all installed.php which are currently loaded for custom implementations
|
281 |
+
*
|
282 |
+
* @return array[]
|
283 |
+
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
284 |
+
*/
|
285 |
+
public static function getAllRawData()
|
286 |
+
{
|
287 |
+
return self::getInstalled();
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Lets you reload the static array from another file
|
292 |
+
*
|
293 |
+
* This is only useful for complex integrations in which a project needs to use
|
294 |
+
* this class but then also needs to execute another project's autoloader in process,
|
295 |
+
* and wants to ensure both projects have access to their version of installed.php.
|
296 |
+
*
|
297 |
+
* A typical case would be PHPUnit, where it would need to make sure it reads all
|
298 |
+
* the data it needs from this class, then call reload() with
|
299 |
+
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
|
300 |
+
* the project in which it runs can then also use this class safely, without
|
301 |
+
* interference between PHPUnit's dependencies and the project's dependencies.
|
302 |
+
*
|
303 |
+
* @param array[] $data A vendor/composer/installed.php data set
|
304 |
+
* @return void
|
305 |
+
*
|
306 |
+
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
|
307 |
+
*/
|
308 |
+
public static function reload($data)
|
309 |
+
{
|
310 |
+
self::$installed = $data;
|
311 |
+
self::$installedByVendor = array();
|
312 |
+
}
|
313 |
+
|
314 |
+
/**
|
315 |
+
* @return array[]
|
316 |
+
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
|
317 |
+
*/
|
318 |
+
private static function getInstalled()
|
319 |
+
{
|
320 |
+
if (null === self::$canGetVendors) {
|
321 |
+
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
|
322 |
+
}
|
323 |
+
|
324 |
+
$installed = array();
|
325 |
+
|
326 |
+
if (self::$canGetVendors) {
|
327 |
+
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
328 |
+
if (isset(self::$installedByVendor[$vendorDir])) {
|
329 |
+
$installed[] = self::$installedByVendor[$vendorDir];
|
330 |
+
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
331 |
+
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
|
332 |
+
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
333 |
+
self::$installed = $installed[count($installed) - 1];
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
if (null === self::$installed) {
|
340 |
+
// only require the installed.php file if this file is loaded from its dumped location,
|
341 |
+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
342 |
+
if (substr(__DIR__, -8, 1) !== 'C') {
|
343 |
+
self::$installed = require __DIR__ . '/installed.php';
|
344 |
+
} else {
|
345 |
+
self::$installed = array();
|
346 |
+
}
|
347 |
+
}
|
348 |
+
$installed[] = self::$installed;
|
349 |
+
|
350 |
+
return $installed;
|
351 |
+
}
|
352 |
+
}
|
vendor/composer/autoload_classmap.php
ADDED
@@ -0,0 +1,166 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_classmap.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
10 |
+
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
|
11 |
+
'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
|
12 |
+
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
|
13 |
+
'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
|
14 |
+
'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
|
15 |
+
'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
|
16 |
+
'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
|
17 |
+
'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
|
18 |
+
'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
|
19 |
+
'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
|
20 |
+
'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
|
21 |
+
'Composer\\Installers\\ClanCatsFrameworkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
|
22 |
+
'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
|
23 |
+
'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
|
24 |
+
'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
|
25 |
+
'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
|
26 |
+
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
|
27 |
+
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
|
28 |
+
'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
|
29 |
+
'Composer\\Installers\\DokuWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
|
30 |
+
'Composer\\Installers\\DolibarrInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
|
31 |
+
'Composer\\Installers\\DrupalInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
|
32 |
+
'Composer\\Installers\\ElggInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
|
33 |
+
'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
|
34 |
+
'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
|
35 |
+
'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
|
36 |
+
'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
|
37 |
+
'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
|
38 |
+
'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
|
39 |
+
'Composer\\Installers\\HuradInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
|
40 |
+
'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
|
41 |
+
'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
|
42 |
+
'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
|
43 |
+
'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
|
44 |
+
'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
|
45 |
+
'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
|
46 |
+
'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
|
47 |
+
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
|
48 |
+
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
|
49 |
+
'Composer\\Installers\\LanManagementSystemInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
|
50 |
+
'Composer\\Installers\\LaravelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
|
51 |
+
'Composer\\Installers\\LavaLiteInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
|
52 |
+
'Composer\\Installers\\LithiumInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
|
53 |
+
'Composer\\Installers\\MODULEWorkInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
|
54 |
+
'Composer\\Installers\\MODXEvoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
|
55 |
+
'Composer\\Installers\\MagentoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
|
56 |
+
'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
|
57 |
+
'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
|
58 |
+
'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
|
59 |
+
'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
|
60 |
+
'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
|
61 |
+
'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
|
62 |
+
'Composer\\Installers\\MicroweberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
|
63 |
+
'Composer\\Installers\\ModxInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
|
64 |
+
'Composer\\Installers\\MoodleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
|
65 |
+
'Composer\\Installers\\OctoberInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
|
66 |
+
'Composer\\Installers\\OntoWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
|
67 |
+
'Composer\\Installers\\OsclassInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
|
68 |
+
'Composer\\Installers\\OxidInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
|
69 |
+
'Composer\\Installers\\PPIInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
|
70 |
+
'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
|
71 |
+
'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
|
72 |
+
'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
|
73 |
+
'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
|
74 |
+
'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
|
75 |
+
'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
|
76 |
+
'Composer\\Installers\\PortoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
|
77 |
+
'Composer\\Installers\\PrestashopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
|
78 |
+
'Composer\\Installers\\PuppetInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
|
79 |
+
'Composer\\Installers\\PxcmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
|
80 |
+
'Composer\\Installers\\RadPHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
|
81 |
+
'Composer\\Installers\\ReIndexInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
|
82 |
+
'Composer\\Installers\\Redaxo5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
|
83 |
+
'Composer\\Installers\\RedaxoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
|
84 |
+
'Composer\\Installers\\RoundcubeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
|
85 |
+
'Composer\\Installers\\SMFInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
|
86 |
+
'Composer\\Installers\\ShopwareInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
|
87 |
+
'Composer\\Installers\\SilverStripeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
|
88 |
+
'Composer\\Installers\\SiteDirectInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
|
89 |
+
'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
|
90 |
+
'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
|
91 |
+
'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
|
92 |
+
'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
|
93 |
+
'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
|
94 |
+
'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
|
95 |
+
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
|
96 |
+
'Composer\\Installers\\TuskInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
|
97 |
+
'Composer\\Installers\\UserFrostingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
|
98 |
+
'Composer\\Installers\\VanillaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
|
99 |
+
'Composer\\Installers\\VgmcpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
|
100 |
+
'Composer\\Installers\\WHMCSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
|
101 |
+
'Composer\\Installers\\WolfCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
|
102 |
+
'Composer\\Installers\\WordPressInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
|
103 |
+
'Composer\\Installers\\YawikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
|
104 |
+
'Composer\\Installers\\ZendInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
|
105 |
+
'Composer\\Installers\\ZikulaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
|
106 |
+
'RocketLazyLoadPlugin\\Admin\\AdminPage' => $baseDir . '/src/Admin/AdminPage.php',
|
107 |
+
'RocketLazyLoadPlugin\\Admin\\ImagifyNotice' => $baseDir . '/src/Admin/ImagifyNotice.php',
|
108 |
+
'RocketLazyLoadPlugin\\Dependencies\\Interop\\Container\\ContainerInterface' => $baseDir . '/src/Dependencies/Interop/Container/ContainerInterface.php',
|
109 |
+
'RocketLazyLoadPlugin\\Dependencies\\Interop\\Container\\Exception\\ContainerException' => $baseDir . '/src/Dependencies/Interop/Container/Exception/ContainerException.php',
|
110 |
+
'RocketLazyLoadPlugin\\Dependencies\\Interop\\Container\\Exception\\NotFoundException' => $baseDir . '/src/Dependencies/Interop/Container/Exception/NotFoundException.php',
|
111 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\ArgumentResolverInterface' => $baseDir . '/src/Dependencies/League/Container/Argument/ArgumentResolverInterface.php',
|
112 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\ArgumentResolverTrait' => $baseDir . '/src/Dependencies/League/Container/Argument/ArgumentResolverTrait.php',
|
113 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\RawArgument' => $baseDir . '/src/Dependencies/League/Container/Argument/RawArgument.php',
|
114 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\RawArgumentInterface' => $baseDir . '/src/Dependencies/League/Container/Argument/RawArgumentInterface.php',
|
115 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Container' => $baseDir . '/src/Dependencies/League/Container/Container.php',
|
116 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ContainerAwareInterface' => $baseDir . '/src/Dependencies/League/Container/ContainerAwareInterface.php',
|
117 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ContainerAwareTrait' => $baseDir . '/src/Dependencies/League/Container/ContainerAwareTrait.php',
|
118 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ContainerInterface' => $baseDir . '/src/Dependencies/League/Container/ContainerInterface.php',
|
119 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\AbstractDefinition' => $baseDir . '/src/Dependencies/League/Container/Definition/AbstractDefinition.php',
|
120 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\CallableDefinition' => $baseDir . '/src/Dependencies/League/Container/Definition/CallableDefinition.php',
|
121 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\ClassDefinition' => $baseDir . '/src/Dependencies/League/Container/Definition/ClassDefinition.php',
|
122 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\ClassDefinitionInterface' => $baseDir . '/src/Dependencies/League/Container/Definition/ClassDefinitionInterface.php',
|
123 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\DefinitionFactory' => $baseDir . '/src/Dependencies/League/Container/Definition/DefinitionFactory.php',
|
124 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\DefinitionFactoryInterface' => $baseDir . '/src/Dependencies/League/Container/Definition/DefinitionFactoryInterface.php',
|
125 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\DefinitionInterface' => $baseDir . '/src/Dependencies/League/Container/Definition/DefinitionInterface.php',
|
126 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Exception\\NotFoundException' => $baseDir . '/src/Dependencies/League/Container/Exception/NotFoundException.php',
|
127 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerAwareInterface' => $baseDir . '/src/Dependencies/League/Container/ImmutableContainerAwareInterface.php',
|
128 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerAwareTrait' => $baseDir . '/src/Dependencies/League/Container/ImmutableContainerAwareTrait.php',
|
129 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerInterface' => $baseDir . '/src/Dependencies/League/Container/ImmutableContainerInterface.php',
|
130 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Inflector\\Inflector' => $baseDir . '/src/Dependencies/League/Container/Inflector/Inflector.php',
|
131 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Inflector\\InflectorAggregate' => $baseDir . '/src/Dependencies/League/Container/Inflector/InflectorAggregate.php',
|
132 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Inflector\\InflectorAggregateInterface' => $baseDir . '/src/Dependencies/League/Container/Inflector/InflectorAggregateInterface.php',
|
133 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ReflectionContainer' => $baseDir . '/src/Dependencies/League/Container/ReflectionContainer.php',
|
134 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\AbstractServiceProvider' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/AbstractServiceProvider.php',
|
135 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\AbstractSignatureServiceProvider' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/AbstractSignatureServiceProvider.php',
|
136 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\BootableServiceProviderInterface' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/BootableServiceProviderInterface.php',
|
137 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderAggregate' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregate.php',
|
138 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderAggregateInterface' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregateInterface.php',
|
139 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderInterface' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php',
|
140 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\SignatureServiceProviderInterface' => $baseDir . '/src/Dependencies/League/Container/ServiceProvider/SignatureServiceProviderInterface.php',
|
141 |
+
'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\ContainerExceptionInterface' => $baseDir . '/src/Dependencies/Psr/Container/ContainerExceptionInterface.php',
|
142 |
+
'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\ContainerInterface' => $baseDir . '/src/Dependencies/Psr/Container/ContainerInterface.php',
|
143 |
+
'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface' => $baseDir . '/src/Dependencies/Psr/Container/NotFoundExceptionInterface.php',
|
144 |
+
'RocketLazyLoadPlugin\\Dependencies\\RocketLazyload\\Assets' => $baseDir . '/src/Dependencies/RocketLazyload/Assets.php',
|
145 |
+
'RocketLazyLoadPlugin\\Dependencies\\RocketLazyload\\Iframe' => $baseDir . '/src/Dependencies/RocketLazyload/Iframe.php',
|
146 |
+
'RocketLazyLoadPlugin\\Dependencies\\RocketLazyload\\Image' => $baseDir . '/src/Dependencies/RocketLazyload/Image.php',
|
147 |
+
'RocketLazyLoadPlugin\\EventManagement\\EventManager' => $baseDir . '/src/EventManagement/EventManager.php',
|
148 |
+
'RocketLazyLoadPlugin\\EventManagement\\EventManagerAwareSubscriberInterface' => $baseDir . '/src/EventManagement/EventManagerAwareSubscriberInterface.php',
|
149 |
+
'RocketLazyLoadPlugin\\EventManagement\\SubscriberInterface' => $baseDir . '/src/EventManagement/SubscriberInterface.php',
|
150 |
+
'RocketLazyLoadPlugin\\Options\\AbstractOptions' => $baseDir . '/src/Options/AbstractOptions.php',
|
151 |
+
'RocketLazyLoadPlugin\\Options\\OptionArray' => $baseDir . '/src/Options/OptionArray.php',
|
152 |
+
'RocketLazyLoadPlugin\\Options\\Options' => $baseDir . '/src/Options/Options.php',
|
153 |
+
'RocketLazyLoadPlugin\\Plugin' => $baseDir . '/src/Plugin.php',
|
154 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\AdminServiceProvider' => $baseDir . '/src/ServiceProvider/AdminServiceProvider.php',
|
155 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\ImagifyNoticeServiceProvider' => $baseDir . '/src/ServiceProvider/ImagifyNoticeServiceProvider.php',
|
156 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\LazyloadServiceProvider' => $baseDir . '/src/ServiceProvider/LazyloadServiceProvider.php',
|
157 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\OptionServiceProvider' => $baseDir . '/src/ServiceProvider/OptionServiceProvider.php',
|
158 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\SubscribersServiceProvider' => $baseDir . '/src/ServiceProvider/SubscribersServiceProvider.php',
|
159 |
+
'RocketLazyLoadPlugin\\Subscriber\\AdminPageSubscriber' => $baseDir . '/src/Subscriber/AdminPageSubscriber.php',
|
160 |
+
'RocketLazyLoadPlugin\\Subscriber\\ImagifyNoticeSubscriber' => $baseDir . '/src/Subscriber/ImagifyNoticeSubscriber.php',
|
161 |
+
'RocketLazyLoadPlugin\\Subscriber\\LazyloadSubscriber' => $baseDir . '/src/Subscriber/LazyloadSubscriber.php',
|
162 |
+
'RocketLazyLoadPlugin\\Subscriber\\ThirdParty\\AMPSubscriber' => $baseDir . '/src/Subscriber/ThirdParty/AMPSubscriber.php',
|
163 |
+
'RocketLazyload\\Assets' => $vendorDir . '/wp-media/rocket-lazyload-common/src/Assets.php',
|
164 |
+
'RocketLazyload\\Iframe' => $vendorDir . '/wp-media/rocket-lazyload-common/src/Iframe.php',
|
165 |
+
'RocketLazyload\\Image' => $vendorDir . '/wp-media/rocket-lazyload-common/src/Image.php',
|
166 |
+
);
|
vendor/composer/autoload_namespaces.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_namespaces.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
);
|
vendor/composer/autoload_psr4.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_psr4.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(__DIR__);
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'RocketLazyload\\' => array($vendorDir . '/wp-media/rocket-lazyload-common/src'),
|
10 |
+
'RocketLazyLoadPlugin\\' => array($baseDir . '/src'),
|
11 |
+
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
12 |
+
);
|
vendor/composer/autoload_real.php
ADDED
@@ -0,0 +1,38 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_real.php @generated by Composer
|
4 |
+
|
5 |
+
class ComposerAutoloaderInitcbaaeb9a2ec271273e02d69450aa69d8
|
6 |
+
{
|
7 |
+
private static $loader;
|
8 |
+
|
9 |
+
public static function loadClassLoader($class)
|
10 |
+
{
|
11 |
+
if ('Composer\Autoload\ClassLoader' === $class) {
|
12 |
+
require __DIR__ . '/ClassLoader.php';
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @return \Composer\Autoload\ClassLoader
|
18 |
+
*/
|
19 |
+
public static function getLoader()
|
20 |
+
{
|
21 |
+
if (null !== self::$loader) {
|
22 |
+
return self::$loader;
|
23 |
+
}
|
24 |
+
|
25 |
+
require __DIR__ . '/platform_check.php';
|
26 |
+
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInitcbaaeb9a2ec271273e02d69450aa69d8', 'loadClassLoader'), true, true);
|
28 |
+
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitcbaaeb9a2ec271273e02d69450aa69d8', 'loadClassLoader'));
|
30 |
+
|
31 |
+
require __DIR__ . '/autoload_static.php';
|
32 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitcbaaeb9a2ec271273e02d69450aa69d8::getInitializer($loader));
|
33 |
+
|
34 |
+
$loader->register(true);
|
35 |
+
|
36 |
+
return $loader;
|
37 |
+
}
|
38 |
+
}
|
vendor/composer/autoload_static.php
ADDED
@@ -0,0 +1,205 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_static.php @generated by Composer
|
4 |
+
|
5 |
+
namespace Composer\Autoload;
|
6 |
+
|
7 |
+
class ComposerStaticInitcbaaeb9a2ec271273e02d69450aa69d8
|
8 |
+
{
|
9 |
+
public static $prefixLengthsPsr4 = array (
|
10 |
+
'R' =>
|
11 |
+
array (
|
12 |
+
'RocketLazyload\\' => 15,
|
13 |
+
'RocketLazyLoadPlugin\\' => 21,
|
14 |
+
),
|
15 |
+
'C' =>
|
16 |
+
array (
|
17 |
+
'Composer\\Installers\\' => 20,
|
18 |
+
),
|
19 |
+
);
|
20 |
+
|
21 |
+
public static $prefixDirsPsr4 = array (
|
22 |
+
'RocketLazyload\\' =>
|
23 |
+
array (
|
24 |
+
0 => __DIR__ . '/..' . '/wp-media/rocket-lazyload-common/src',
|
25 |
+
),
|
26 |
+
'RocketLazyLoadPlugin\\' =>
|
27 |
+
array (
|
28 |
+
0 => __DIR__ . '/../..' . '/src',
|
29 |
+
),
|
30 |
+
'Composer\\Installers\\' =>
|
31 |
+
array (
|
32 |
+
0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
|
33 |
+
),
|
34 |
+
);
|
35 |
+
|
36 |
+
public static $classMap = array (
|
37 |
+
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
38 |
+
'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
|
39 |
+
'Composer\\Installers\\AimeosInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
|
40 |
+
'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
|
41 |
+
'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
|
42 |
+
'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
|
43 |
+
'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
|
44 |
+
'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
|
45 |
+
'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
|
46 |
+
'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
|
47 |
+
'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
|
48 |
+
'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
|
49 |
+
'Composer\\Installers\\ClanCatsFrameworkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php',
|
50 |
+
'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
|
51 |
+
'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
|
52 |
+
'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
|
53 |
+
'Composer\\Installers\\CraftInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
|
54 |
+
'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
|
55 |
+
'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
|
56 |
+
'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
|
57 |
+
'Composer\\Installers\\DokuWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DokuWikiInstaller.php',
|
58 |
+
'Composer\\Installers\\DolibarrInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DolibarrInstaller.php',
|
59 |
+
'Composer\\Installers\\DrupalInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DrupalInstaller.php',
|
60 |
+
'Composer\\Installers\\ElggInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ElggInstaller.php',
|
61 |
+
'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
|
62 |
+
'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
|
63 |
+
'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
|
64 |
+
'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
|
65 |
+
'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
|
66 |
+
'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
|
67 |
+
'Composer\\Installers\\HuradInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/HuradInstaller.php',
|
68 |
+
'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
|
69 |
+
'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
|
70 |
+
'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
|
71 |
+
'Composer\\Installers\\JoomlaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
|
72 |
+
'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
|
73 |
+
'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
|
74 |
+
'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
|
75 |
+
'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
|
76 |
+
'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
|
77 |
+
'Composer\\Installers\\LanManagementSystemInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php',
|
78 |
+
'Composer\\Installers\\LaravelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LaravelInstaller.php',
|
79 |
+
'Composer\\Installers\\LavaLiteInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LavaLiteInstaller.php',
|
80 |
+
'Composer\\Installers\\LithiumInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/LithiumInstaller.php',
|
81 |
+
'Composer\\Installers\\MODULEWorkInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php',
|
82 |
+
'Composer\\Installers\\MODXEvoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MODXEvoInstaller.php',
|
83 |
+
'Composer\\Installers\\MagentoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MagentoInstaller.php',
|
84 |
+
'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
|
85 |
+
'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
|
86 |
+
'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
|
87 |
+
'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
|
88 |
+
'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
|
89 |
+
'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
|
90 |
+
'Composer\\Installers\\MicroweberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MicroweberInstaller.php',
|
91 |
+
'Composer\\Installers\\ModxInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ModxInstaller.php',
|
92 |
+
'Composer\\Installers\\MoodleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MoodleInstaller.php',
|
93 |
+
'Composer\\Installers\\OctoberInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OctoberInstaller.php',
|
94 |
+
'Composer\\Installers\\OntoWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OntoWikiInstaller.php',
|
95 |
+
'Composer\\Installers\\OsclassInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OsclassInstaller.php',
|
96 |
+
'Composer\\Installers\\OxidInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/OxidInstaller.php',
|
97 |
+
'Composer\\Installers\\PPIInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PPIInstaller.php',
|
98 |
+
'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
|
99 |
+
'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
|
100 |
+
'Composer\\Installers\\PimcoreInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
|
101 |
+
'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
|
102 |
+
'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
|
103 |
+
'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
|
104 |
+
'Composer\\Installers\\PortoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PortoInstaller.php',
|
105 |
+
'Composer\\Installers\\PrestashopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PrestashopInstaller.php',
|
106 |
+
'Composer\\Installers\\PuppetInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PuppetInstaller.php',
|
107 |
+
'Composer\\Installers\\PxcmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PxcmsInstaller.php',
|
108 |
+
'Composer\\Installers\\RadPHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RadPHPInstaller.php',
|
109 |
+
'Composer\\Installers\\ReIndexInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ReIndexInstaller.php',
|
110 |
+
'Composer\\Installers\\Redaxo5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Redaxo5Installer.php',
|
111 |
+
'Composer\\Installers\\RedaxoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RedaxoInstaller.php',
|
112 |
+
'Composer\\Installers\\RoundcubeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/RoundcubeInstaller.php',
|
113 |
+
'Composer\\Installers\\SMFInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SMFInstaller.php',
|
114 |
+
'Composer\\Installers\\ShopwareInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ShopwareInstaller.php',
|
115 |
+
'Composer\\Installers\\SilverStripeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SilverStripeInstaller.php',
|
116 |
+
'Composer\\Installers\\SiteDirectInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SiteDirectInstaller.php',
|
117 |
+
'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
|
118 |
+
'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
|
119 |
+
'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
|
120 |
+
'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
|
121 |
+
'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
|
122 |
+
'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
|
123 |
+
'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
|
124 |
+
'Composer\\Installers\\TuskInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TuskInstaller.php',
|
125 |
+
'Composer\\Installers\\UserFrostingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/UserFrostingInstaller.php',
|
126 |
+
'Composer\\Installers\\VanillaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VanillaInstaller.php',
|
127 |
+
'Composer\\Installers\\VgmcpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/VgmcpInstaller.php',
|
128 |
+
'Composer\\Installers\\WHMCSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WHMCSInstaller.php',
|
129 |
+
'Composer\\Installers\\WolfCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WolfCMSInstaller.php',
|
130 |
+
'Composer\\Installers\\WordPressInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/WordPressInstaller.php',
|
131 |
+
'Composer\\Installers\\YawikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/YawikInstaller.php',
|
132 |
+
'Composer\\Installers\\ZendInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZendInstaller.php',
|
133 |
+
'Composer\\Installers\\ZikulaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php',
|
134 |
+
'RocketLazyLoadPlugin\\Admin\\AdminPage' => __DIR__ . '/../..' . '/src/Admin/AdminPage.php',
|
135 |
+
'RocketLazyLoadPlugin\\Admin\\ImagifyNotice' => __DIR__ . '/../..' . '/src/Admin/ImagifyNotice.php',
|
136 |
+
'RocketLazyLoadPlugin\\Dependencies\\Interop\\Container\\ContainerInterface' => __DIR__ . '/../..' . '/src/Dependencies/Interop/Container/ContainerInterface.php',
|
137 |
+
'RocketLazyLoadPlugin\\Dependencies\\Interop\\Container\\Exception\\ContainerException' => __DIR__ . '/../..' . '/src/Dependencies/Interop/Container/Exception/ContainerException.php',
|
138 |
+
'RocketLazyLoadPlugin\\Dependencies\\Interop\\Container\\Exception\\NotFoundException' => __DIR__ . '/../..' . '/src/Dependencies/Interop/Container/Exception/NotFoundException.php',
|
139 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\ArgumentResolverInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Argument/ArgumentResolverInterface.php',
|
140 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\ArgumentResolverTrait' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Argument/ArgumentResolverTrait.php',
|
141 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\RawArgument' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Argument/RawArgument.php',
|
142 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Argument\\RawArgumentInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Argument/RawArgumentInterface.php',
|
143 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Container' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Container.php',
|
144 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ContainerAwareInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ContainerAwareInterface.php',
|
145 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ContainerAwareTrait' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ContainerAwareTrait.php',
|
146 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ContainerInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ContainerInterface.php',
|
147 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\AbstractDefinition' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/AbstractDefinition.php',
|
148 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\CallableDefinition' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/CallableDefinition.php',
|
149 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\ClassDefinition' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/ClassDefinition.php',
|
150 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\ClassDefinitionInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/ClassDefinitionInterface.php',
|
151 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\DefinitionFactory' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/DefinitionFactory.php',
|
152 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\DefinitionFactoryInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/DefinitionFactoryInterface.php',
|
153 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Definition\\DefinitionInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Definition/DefinitionInterface.php',
|
154 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Exception\\NotFoundException' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Exception/NotFoundException.php',
|
155 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerAwareInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ImmutableContainerAwareInterface.php',
|
156 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerAwareTrait' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ImmutableContainerAwareTrait.php',
|
157 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ImmutableContainerInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ImmutableContainerInterface.php',
|
158 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Inflector\\Inflector' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Inflector/Inflector.php',
|
159 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Inflector\\InflectorAggregate' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Inflector/InflectorAggregate.php',
|
160 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\Inflector\\InflectorAggregateInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/Inflector/InflectorAggregateInterface.php',
|
161 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ReflectionContainer' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ReflectionContainer.php',
|
162 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\AbstractServiceProvider' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/AbstractServiceProvider.php',
|
163 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\AbstractSignatureServiceProvider' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/AbstractSignatureServiceProvider.php',
|
164 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\BootableServiceProviderInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/BootableServiceProviderInterface.php',
|
165 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderAggregate' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregate.php',
|
166 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderAggregateInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregateInterface.php',
|
167 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php',
|
168 |
+
'RocketLazyLoadPlugin\\Dependencies\\League\\Container\\ServiceProvider\\SignatureServiceProviderInterface' => __DIR__ . '/../..' . '/src/Dependencies/League/Container/ServiceProvider/SignatureServiceProviderInterface.php',
|
169 |
+
'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\ContainerExceptionInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/ContainerExceptionInterface.php',
|
170 |
+
'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\ContainerInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/ContainerInterface.php',
|
171 |
+
'RocketLazyLoadPlugin\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface' => __DIR__ . '/../..' . '/src/Dependencies/Psr/Container/NotFoundExceptionInterface.php',
|
172 |
+
'RocketLazyLoadPlugin\\Dependencies\\RocketLazyload\\Assets' => __DIR__ . '/../..' . '/src/Dependencies/RocketLazyload/Assets.php',
|
173 |
+
'RocketLazyLoadPlugin\\Dependencies\\RocketLazyload\\Iframe' => __DIR__ . '/../..' . '/src/Dependencies/RocketLazyload/Iframe.php',
|
174 |
+
'RocketLazyLoadPlugin\\Dependencies\\RocketLazyload\\Image' => __DIR__ . '/../..' . '/src/Dependencies/RocketLazyload/Image.php',
|
175 |
+
'RocketLazyLoadPlugin\\EventManagement\\EventManager' => __DIR__ . '/../..' . '/src/EventManagement/EventManager.php',
|
176 |
+
'RocketLazyLoadPlugin\\EventManagement\\EventManagerAwareSubscriberInterface' => __DIR__ . '/../..' . '/src/EventManagement/EventManagerAwareSubscriberInterface.php',
|
177 |
+
'RocketLazyLoadPlugin\\EventManagement\\SubscriberInterface' => __DIR__ . '/../..' . '/src/EventManagement/SubscriberInterface.php',
|
178 |
+
'RocketLazyLoadPlugin\\Options\\AbstractOptions' => __DIR__ . '/../..' . '/src/Options/AbstractOptions.php',
|
179 |
+
'RocketLazyLoadPlugin\\Options\\OptionArray' => __DIR__ . '/../..' . '/src/Options/OptionArray.php',
|
180 |
+
'RocketLazyLoadPlugin\\Options\\Options' => __DIR__ . '/../..' . '/src/Options/Options.php',
|
181 |
+
'RocketLazyLoadPlugin\\Plugin' => __DIR__ . '/../..' . '/src/Plugin.php',
|
182 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\AdminServiceProvider' => __DIR__ . '/../..' . '/src/ServiceProvider/AdminServiceProvider.php',
|
183 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\ImagifyNoticeServiceProvider' => __DIR__ . '/../..' . '/src/ServiceProvider/ImagifyNoticeServiceProvider.php',
|
184 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\LazyloadServiceProvider' => __DIR__ . '/../..' . '/src/ServiceProvider/LazyloadServiceProvider.php',
|
185 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\OptionServiceProvider' => __DIR__ . '/../..' . '/src/ServiceProvider/OptionServiceProvider.php',
|
186 |
+
'RocketLazyLoadPlugin\\ServiceProvider\\SubscribersServiceProvider' => __DIR__ . '/../..' . '/src/ServiceProvider/SubscribersServiceProvider.php',
|
187 |
+
'RocketLazyLoadPlugin\\Subscriber\\AdminPageSubscriber' => __DIR__ . '/../..' . '/src/Subscriber/AdminPageSubscriber.php',
|
188 |
+
'RocketLazyLoadPlugin\\Subscriber\\ImagifyNoticeSubscriber' => __DIR__ . '/../..' . '/src/Subscriber/ImagifyNoticeSubscriber.php',
|
189 |
+
'RocketLazyLoadPlugin\\Subscriber\\LazyloadSubscriber' => __DIR__ . '/../..' . '/src/Subscriber/LazyloadSubscriber.php',
|
190 |
+
'RocketLazyLoadPlugin\\Subscriber\\ThirdParty\\AMPSubscriber' => __DIR__ . '/../..' . '/src/Subscriber/ThirdParty/AMPSubscriber.php',
|
191 |
+
'RocketLazyload\\Assets' => __DIR__ . '/..' . '/wp-media/rocket-lazyload-common/src/Assets.php',
|
192 |
+
'RocketLazyload\\Iframe' => __DIR__ . '/..' . '/wp-media/rocket-lazyload-common/src/Iframe.php',
|
193 |
+
'RocketLazyload\\Image' => __DIR__ . '/..' . '/wp-media/rocket-lazyload-common/src/Image.php',
|
194 |
+
);
|
195 |
+
|
196 |
+
public static function getInitializer(ClassLoader $loader)
|
197 |
+
{
|
198 |
+
return \Closure::bind(function () use ($loader) {
|
199 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitcbaaeb9a2ec271273e02d69450aa69d8::$prefixLengthsPsr4;
|
200 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitcbaaeb9a2ec271273e02d69450aa69d8::$prefixDirsPsr4;
|
201 |
+
$loader->classMap = ComposerStaticInitcbaaeb9a2ec271273e02d69450aa69d8::$classMap;
|
202 |
+
|
203 |
+
}, null, ClassLoader::class);
|
204 |
+
}
|
205 |
+
}
|
vendor/composer/installed.json
ADDED
@@ -0,0 +1,197 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
{
|
2 |
+
"packages": [
|
3 |
+
{
|
4 |
+
"name": "composer/installers",
|
5 |
+
"version": "v1.9.0",
|
6 |
+
"version_normalized": "1.9.0.0",
|
7 |
+
"source": {
|
8 |
+
"type": "git",
|
9 |
+
"url": "https://github.com/composer/installers.git",
|
10 |
+
"reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
|
11 |
+
},
|
12 |
+
"dist": {
|
13 |
+
"type": "zip",
|
14 |
+
"url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
|
15 |
+
"reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
|
16 |
+
"shasum": ""
|
17 |
+
},
|
18 |
+
"require": {
|
19 |
+
"composer-plugin-api": "^1.0 || ^2.0"
|
20 |
+
},
|
21 |
+
"replace": {
|
22 |
+
"roundcube/plugin-installer": "*",
|
23 |
+
"shama/baton": "*"
|
24 |
+
},
|
25 |
+
"require-dev": {
|
26 |
+
"composer/composer": "1.6.* || 2.0.*@dev",
|
27 |
+
"composer/semver": "1.0.* || 2.0.*@dev",
|
28 |
+
"phpunit/phpunit": "^4.8.36",
|
29 |
+
"sebastian/comparator": "^1.2.4",
|
30 |
+
"symfony/process": "^2.3"
|
31 |
+
},
|
32 |
+
"time": "2020-04-07T06:57:05+00:00",
|
33 |
+
"type": "composer-plugin",
|
34 |
+
"extra": {
|
35 |
+
"class": "Composer\\Installers\\Plugin",
|
36 |
+
"branch-alias": {
|
37 |
+
"dev-master": "1.0-dev"
|
38 |
+
}
|
39 |
+
},
|
40 |
+
"installation-source": "dist",
|
41 |
+
"autoload": {
|
42 |
+
"psr-4": {
|
43 |
+
"Composer\\Installers\\": "src/Composer/Installers"
|
44 |
+
}
|
45 |
+
},
|
46 |
+
"notification-url": "https://packagist.org/downloads/",
|
47 |
+
"license": [
|
48 |
+
"MIT"
|
49 |
+
],
|
50 |
+
"authors": [
|
51 |
+
{
|
52 |
+
"name": "Kyle Robinson Young",
|
53 |
+
"email": "kyle@dontkry.com",
|
54 |
+
"homepage": "https://github.com/shama"
|
55 |
+
}
|
56 |
+
],
|
57 |
+
"description": "A multi-framework Composer library installer",
|
58 |
+
"homepage": "https://composer.github.io/installers/",
|
59 |
+
"keywords": [
|
60 |
+
"Craft",
|
61 |
+
"Dolibarr",
|
62 |
+
"Eliasis",
|
63 |
+
"Hurad",
|
64 |
+
"ImageCMS",
|
65 |
+
"Kanboard",
|
66 |
+
"Lan Management System",
|
67 |
+
"MODX Evo",
|
68 |
+
"MantisBT",
|
69 |
+
"Mautic",
|
70 |
+
"Maya",
|
71 |
+
"OXID",
|
72 |
+
"Plentymarkets",
|
73 |
+
"Porto",
|
74 |
+
"RadPHP",
|
75 |
+
"SMF",
|
76 |
+
"Thelia",
|
77 |
+
"Whmcs",
|
78 |
+
"WolfCMS",
|
79 |
+
"agl",
|
80 |
+
"aimeos",
|
81 |
+
"annotatecms",
|
82 |
+
"attogram",
|
83 |
+
"bitrix",
|
84 |
+
"cakephp",
|
85 |
+
"chef",
|
86 |
+
"cockpit",
|
87 |
+
"codeigniter",
|
88 |
+
"concrete5",
|
89 |
+
"croogo",
|
90 |
+
"dokuwiki",
|
91 |
+
"drupal",
|
92 |
+
"eZ Platform",
|
93 |
+
"elgg",
|
94 |
+
"expressionengine",
|
95 |
+
"fuelphp",
|
96 |
+
"grav",
|
97 |
+
"installer",
|
98 |
+
"itop",
|
99 |
+
"joomla",
|
100 |
+
"known",
|
101 |
+
"kohana",
|
102 |
+
"laravel",
|
103 |
+
"lavalite",
|
104 |
+
"lithium",
|
105 |
+
"magento",
|
106 |
+
"majima",
|
107 |
+
"mako",
|
108 |
+
"mediawiki",
|
109 |
+
"modulework",
|
110 |
+
"modx",
|
111 |
+
"moodle",
|
112 |
+
"osclass",
|
113 |
+
"phpbb",
|
114 |
+
"piwik",
|
115 |
+
"ppi",
|
116 |
+
"puppet",
|
117 |
+
"pxcms",
|
118 |
+
"reindex",
|
119 |
+
"roundcube",
|
120 |
+
"shopware",
|
121 |
+
"silverstripe",
|
122 |
+
"sydes",
|
123 |
+
"sylius",
|
124 |
+
"symfony",
|
125 |
+
"typo3",
|
126 |
+
"wordpress",
|
127 |
+
"yawik",
|
128 |
+
"zend",
|
129 |
+
"zikula"
|
130 |
+
],
|
131 |
+
"funding": [
|
132 |
+
{
|
133 |
+
"url": "https://packagist.com",
|
134 |
+
"type": "custom"
|
135 |
+
},
|
136 |
+
{
|
137 |
+
"url": "https://tidelift.com/funding/github/packagist/composer/composer",
|
138 |
+
"type": "tidelift"
|
139 |
+
}
|
140 |
+
],
|
141 |
+
"install-path": "./installers"
|
142 |
+
},
|
143 |
+
{
|
144 |
+
"name": "wp-media/rocket-lazyload-common",
|
145 |
+
"version": "v2.5.12",
|
146 |
+
"version_normalized": "2.5.12.0",
|
147 |
+
"source": {
|
148 |
+
"type": "git",
|
149 |
+
"url": "https://github.com/wp-media/rocket-lazyload-common.git",
|
150 |
+
"reference": "09bdc9a550b8bd1197c155a98e17c45adcb190af"
|
151 |
+
},
|
152 |
+
"dist": {
|
153 |
+
"type": "zip",
|
154 |
+
"url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/09bdc9a550b8bd1197c155a98e17c45adcb190af",
|
155 |
+
"reference": "09bdc9a550b8bd1197c155a98e17c45adcb190af",
|
156 |
+
"shasum": ""
|
157 |
+
},
|
158 |
+
"require": {
|
159 |
+
"php": ">=5.6"
|
160 |
+
},
|
161 |
+
"require-dev": {
|
162 |
+
"brain/monkey": "^2.0",
|
163 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
|
164 |
+
"doctrine/instantiator": "1.0.*",
|
165 |
+
"myclabs/deep-copy": "1.6.*",
|
166 |
+
"phpcompatibility/phpcompatibility-wp": "^2.0",
|
167 |
+
"phpdocumentor/reflection-docblock": "^3.3",
|
168 |
+
"phpunit/php-token-stream": "^1.4",
|
169 |
+
"phpunit/phpunit": "^5.7",
|
170 |
+
"symfony/yaml": "2.8.*",
|
171 |
+
"wp-coding-standards/wpcs": "^2.0.0"
|
172 |
+
},
|
173 |
+
"time": "2020-07-10T18:41:12+00:00",
|
174 |
+
"type": "library",
|
175 |
+
"installation-source": "dist",
|
176 |
+
"autoload": {
|
177 |
+
"psr-4": {
|
178 |
+
"RocketLazyload\\": "src"
|
179 |
+
}
|
180 |
+
},
|
181 |
+
"notification-url": "https://packagist.org/downloads/",
|
182 |
+
"license": [
|
183 |
+
"GPL-3.0-or-later"
|
184 |
+
],
|
185 |
+
"authors": [
|
186 |
+
{
|
187 |
+
"name": "WP Media",
|
188 |
+
"email": "contact@wp-media.me"
|
189 |
+
}
|
190 |
+
],
|
191 |
+
"description": "Common Code between WP Rocket and Lazyload by WP Rocket",
|
192 |
+
"install-path": "../wp-media/rocket-lazyload-common"
|
193 |
+
}
|
194 |
+
],
|
195 |
+
"dev": false,
|
196 |
+
"dev-package-names": []
|
197 |
+
}
|
vendor/composer/installed.php
ADDED
@@ -0,0 +1,53 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php return array(
|
2 |
+
'root' => array(
|
3 |
+
'pretty_version' => 'v2.3.6',
|
4 |
+
'version' => '2.3.6.0',
|
5 |
+
'type' => 'wordpress-plugin',
|
6 |
+
'install_path' => __DIR__ . '/../../',
|
7 |
+
'aliases' => array(),
|
8 |
+
'reference' => '196520995c756201b8f3b3a660cff14c241fd9a9',
|
9 |
+
'name' => 'wp-media/rocket-lazy-load',
|
10 |
+
'dev' => false,
|
11 |
+
),
|
12 |
+
'versions' => array(
|
13 |
+
'composer/installers' => array(
|
14 |
+
'pretty_version' => 'v1.9.0',
|
15 |
+
'version' => '1.9.0.0',
|
16 |
+
'type' => 'composer-plugin',
|
17 |
+
'install_path' => __DIR__ . '/./installers',
|
18 |
+
'aliases' => array(),
|
19 |
+
'reference' => 'b93bcf0fa1fccb0b7d176b0967d969691cd74cca',
|
20 |
+
'dev_requirement' => false,
|
21 |
+
),
|
22 |
+
'roundcube/plugin-installer' => array(
|
23 |
+
'dev_requirement' => false,
|
24 |
+
'replaced' => array(
|
25 |
+
0 => '*',
|
26 |
+
),
|
27 |
+
),
|
28 |
+
'shama/baton' => array(
|
29 |
+
'dev_requirement' => false,
|
30 |
+
'replaced' => array(
|
31 |
+
0 => '*',
|
32 |
+
),
|
33 |
+
),
|
34 |
+
'wp-media/rocket-lazy-load' => array(
|
35 |
+
'pretty_version' => 'v2.3.6',
|
36 |
+
'version' => '2.3.6.0',
|
37 |
+
'type' => 'wordpress-plugin',
|
38 |
+
'install_path' => __DIR__ . '/../../',
|
39 |
+
'aliases' => array(),
|
40 |
+
'reference' => '196520995c756201b8f3b3a660cff14c241fd9a9',
|
41 |
+
'dev_requirement' => false,
|
42 |
+
),
|
43 |
+
'wp-media/rocket-lazyload-common' => array(
|
44 |
+
'pretty_version' => 'v2.5.12',
|
45 |
+
'version' => '2.5.12.0',
|
46 |
+
'type' => 'library',
|
47 |
+
'install_path' => __DIR__ . '/../wp-media/rocket-lazyload-common',
|
48 |
+
'aliases' => array(),
|
49 |
+
'reference' => '09bdc9a550b8bd1197c155a98e17c45adcb190af',
|
50 |
+
'dev_requirement' => false,
|
51 |
+
),
|
52 |
+
),
|
53 |
+
);
|
vendor/composer/installers/composer.json
ADDED
@@ -0,0 +1,112 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
{
|
2 |
+
"name": "composer/installers",
|
3 |
+
"type": "composer-plugin",
|
4 |
+
"license": "MIT",
|
5 |
+
"description": "A multi-framework Composer library installer",
|
6 |
+
"keywords": [
|
7 |
+
"installer",
|
8 |
+
"Aimeos",
|
9 |
+
"AGL",
|
10 |
+
"AnnotateCms",
|
11 |
+
"Attogram",
|
12 |
+
"Bitrix",
|
13 |
+
"CakePHP",
|
14 |
+
"Chef",
|
15 |
+
"Cockpit",
|
16 |
+
"CodeIgniter",
|
17 |
+
"concrete5",
|
18 |
+
"Craft",
|
19 |
+
"Croogo",
|
20 |
+
"DokuWiki",
|
21 |
+
"Dolibarr",
|
22 |
+
"Drupal",
|
23 |
+
"Elgg",
|
24 |
+
"Eliasis",
|
25 |
+
"ExpressionEngine",
|
26 |
+
"eZ Platform",
|
27 |
+
"FuelPHP",
|
28 |
+
"Grav",
|
29 |
+
"Hurad",
|
30 |
+
"ImageCMS",
|
31 |
+
"iTop",
|
32 |
+
"Joomla",
|
33 |
+
"Kanboard",
|
34 |
+
"Known",
|
35 |
+
"Kohana",
|
36 |
+
"Lan Management System",
|
37 |
+
"Laravel",
|
38 |
+
"Lavalite",
|
39 |
+
"Lithium",
|
40 |
+
"Magento",
|
41 |
+
"majima",
|
42 |
+
"Mako",
|
43 |
+
"MantisBT",
|
44 |
+
"Mautic",
|
45 |
+
"Maya",
|
46 |
+
"MODX",
|
47 |
+
"MODX Evo",
|
48 |
+
"MediaWiki",
|
49 |
+
"OXID",
|
50 |
+
"osclass",
|
51 |
+
"MODULEWork",
|
52 |
+
"Moodle",
|
53 |
+
"Piwik",
|
54 |
+
"pxcms",
|
55 |
+
"phpBB",
|
56 |
+
"Plentymarkets",
|
57 |
+
"PPI",
|
58 |
+
"Puppet",
|
59 |
+
"Porto",
|
60 |
+
"RadPHP",
|
61 |
+
"ReIndex",
|
62 |
+
"Roundcube",
|
63 |
+
"shopware",
|
64 |
+
"SilverStripe",
|
65 |
+
"SMF",
|
66 |
+
"SyDES",
|
67 |
+
"Sylius",
|
68 |
+
"symfony",
|
69 |
+
"Thelia",
|
70 |
+
"TYPO3",
|
71 |
+
"WHMCS",
|
72 |
+
"WolfCMS",
|
73 |
+
"WordPress",
|
74 |
+
"YAWIK",
|
75 |
+
"Zend",
|
76 |
+
"Zikula"
|
77 |
+
],
|
78 |
+
"homepage": "https://composer.github.io/installers/",
|
79 |
+
"authors": [
|
80 |
+
{
|
81 |
+
"name": "Kyle Robinson Young",
|
82 |
+
"email": "kyle@dontkry.com",
|
83 |
+
"homepage": "https://github.com/shama"
|
84 |
+
}
|
85 |
+
],
|
86 |
+
"autoload": {
|
87 |
+
"psr-4": { "Composer\\Installers\\": "src/Composer/Installers" }
|
88 |
+
},
|
89 |
+
"extra": {
|
90 |
+
"class": "Composer\\Installers\\Plugin",
|
91 |
+
"branch-alias": {
|
92 |
+
"dev-master": "1.0-dev"
|
93 |
+
}
|
94 |
+
},
|
95 |
+
"replace": {
|
96 |
+
"shama/baton": "*",
|
97 |
+
"roundcube/plugin-installer": "*"
|
98 |
+
},
|
99 |
+
"require": {
|
100 |
+
"composer-plugin-api": "^1.0 || ^2.0"
|
101 |
+
},
|
102 |
+
"require-dev": {
|
103 |
+
"composer/composer": "1.6.* || 2.0.*@dev",
|
104 |
+
"composer/semver": "1.0.* || 2.0.*@dev",
|
105 |
+
"phpunit/phpunit": "^4.8.36",
|
106 |
+
"sebastian/comparator": "^1.2.4",
|
107 |
+
"symfony/process": "^2.3"
|
108 |
+
},
|
109 |
+
"scripts": {
|
110 |
+
"test": "phpunit"
|
111 |
+
}
|
112 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AglInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AglInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'More/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
|
16 |
+
return strtoupper($matches[1]);
|
17 |
+
}, $vars['name']);
|
18 |
+
|
19 |
+
return $vars;
|
20 |
+
}
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AimeosInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'ext/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AnnotateCmsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'addons/modules/{$name}/',
|
8 |
+
'component' => 'addons/components/{$name}/',
|
9 |
+
'service' => 'addons/services/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AsgardInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'Modules/{$name}/',
|
8 |
+
'theme' => 'Themes/{$name}/'
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type asgard-module, cut off a trailing '-plugin' if present.
|
15 |
+
*
|
16 |
+
* For package type asgard-theme, cut off a trailing '-theme' if present.
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] === 'asgard-module') {
|
22 |
+
return $this->inflectPluginVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
if ($vars['type'] === 'asgard-theme') {
|
26 |
+
return $this->inflectThemeVars($vars);
|
27 |
+
}
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function inflectPluginVars($vars)
|
33 |
+
{
|
34 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
+
|
38 |
+
return $vars;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function inflectThemeVars($vars)
|
42 |
+
{
|
43 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class AttogramInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
ADDED
@@ -0,0 +1,137 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\IO\IOInterface;
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\Package\PackageInterface;
|
7 |
+
|
8 |
+
abstract class BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array();
|
11 |
+
protected $composer;
|
12 |
+
protected $package;
|
13 |
+
protected $io;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Initializes base installer.
|
17 |
+
*
|
18 |
+
* @param PackageInterface $package
|
19 |
+
* @param Composer $composer
|
20 |
+
* @param IOInterface $io
|
21 |
+
*/
|
22 |
+
public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
|
23 |
+
{
|
24 |
+
$this->composer = $composer;
|
25 |
+
$this->package = $package;
|
26 |
+
$this->io = $io;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Return the install path based on package type.
|
31 |
+
*
|
32 |
+
* @param PackageInterface $package
|
33 |
+
* @param string $frameworkType
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
37 |
+
{
|
38 |
+
$type = $this->package->getType();
|
39 |
+
|
40 |
+
$prettyName = $this->package->getPrettyName();
|
41 |
+
if (strpos($prettyName, '/') !== false) {
|
42 |
+
list($vendor, $name) = explode('/', $prettyName);
|
43 |
+
} else {
|
44 |
+
$vendor = '';
|
45 |
+
$name = $prettyName;
|
46 |
+
}
|
47 |
+
|
48 |
+
$availableVars = $this->inflectPackageVars(compact('name', 'vendor', 'type'));
|
49 |
+
|
50 |
+
$extra = $package->getExtra();
|
51 |
+
if (!empty($extra['installer-name'])) {
|
52 |
+
$availableVars['name'] = $extra['installer-name'];
|
53 |
+
}
|
54 |
+
|
55 |
+
if ($this->composer->getPackage()) {
|
56 |
+
$extra = $this->composer->getPackage()->getExtra();
|
57 |
+
if (!empty($extra['installer-paths'])) {
|
58 |
+
$customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
|
59 |
+
if ($customPath !== false) {
|
60 |
+
return $this->templatePath($customPath, $availableVars);
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
$packageType = substr($type, strlen($frameworkType) + 1);
|
66 |
+
$locations = $this->getLocations();
|
67 |
+
if (!isset($locations[$packageType])) {
|
68 |
+
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
|
69 |
+
}
|
70 |
+
|
71 |
+
return $this->templatePath($locations[$packageType], $availableVars);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* For an installer to override to modify the vars per installer.
|
76 |
+
*
|
77 |
+
* @param array $vars
|
78 |
+
* @return array
|
79 |
+
*/
|
80 |
+
public function inflectPackageVars($vars)
|
81 |
+
{
|
82 |
+
return $vars;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Gets the installer's locations
|
87 |
+
*
|
88 |
+
* @return array
|
89 |
+
*/
|
90 |
+
public function getLocations()
|
91 |
+
{
|
92 |
+
return $this->locations;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Replace vars in a path
|
97 |
+
*
|
98 |
+
* @param string $path
|
99 |
+
* @param array $vars
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
protected function templatePath($path, array $vars = array())
|
103 |
+
{
|
104 |
+
if (strpos($path, '{') !== false) {
|
105 |
+
extract($vars);
|
106 |
+
preg_match_all('@\{\$([A-Za-z0-9_]*)\}@i', $path, $matches);
|
107 |
+
if (!empty($matches[1])) {
|
108 |
+
foreach ($matches[1] as $var) {
|
109 |
+
$path = str_replace('{$' . $var . '}', $$var, $path);
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
return $path;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Search through a passed paths array for a custom install path.
|
119 |
+
*
|
120 |
+
* @param array $paths
|
121 |
+
* @param string $name
|
122 |
+
* @param string $type
|
123 |
+
* @param string $vendor = NULL
|
124 |
+
* @return string
|
125 |
+
*/
|
126 |
+
protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
|
127 |
+
{
|
128 |
+
foreach ($paths as $path => $names) {
|
129 |
+
$names = (array) $names;
|
130 |
+
if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
|
131 |
+
return $path;
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
return false;
|
136 |
+
}
|
137 |
+
}
|
vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
ADDED
@@ -0,0 +1,126 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
use Composer\Util\Filesystem;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Installer for Bitrix Framework. Supported types of extensions:
|
9 |
+
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/<vendor>.<name>`.
|
10 |
+
* - `bitrix-d7-component` — copy the component to directory `bitrix/components/<vendor>/<name>`.
|
11 |
+
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/<vendor>_<name>`.
|
12 |
+
*
|
13 |
+
* You can set custom path to directory with Bitrix kernel in `composer.json`:
|
14 |
+
*
|
15 |
+
* ```json
|
16 |
+
* {
|
17 |
+
* "extra": {
|
18 |
+
* "bitrix-dir": "s1/bitrix"
|
19 |
+
* }
|
20 |
+
* }
|
21 |
+
* ```
|
22 |
+
*
|
23 |
+
* @author Nik Samokhvalov <nik@samokhvalov.info>
|
24 |
+
* @author Denis Kulichkin <onexhovia@gmail.com>
|
25 |
+
*/
|
26 |
+
class BitrixInstaller extends BaseInstaller
|
27 |
+
{
|
28 |
+
protected $locations = array(
|
29 |
+
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
30 |
+
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
31 |
+
'theme' => '{$bitrix_dir}/templates/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
|
32 |
+
'd7-module' => '{$bitrix_dir}/modules/{$vendor}.{$name}/',
|
33 |
+
'd7-component' => '{$bitrix_dir}/components/{$vendor}/{$name}/',
|
34 |
+
'd7-template' => '{$bitrix_dir}/templates/{$vendor}_{$name}/',
|
35 |
+
);
|
36 |
+
|
37 |
+
/**
|
38 |
+
* @var array Storage for informations about duplicates at all the time of installation packages.
|
39 |
+
*/
|
40 |
+
private static $checkedDuplicates = array();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* {@inheritdoc}
|
44 |
+
*/
|
45 |
+
public function inflectPackageVars($vars)
|
46 |
+
{
|
47 |
+
if ($this->composer->getPackage()) {
|
48 |
+
$extra = $this->composer->getPackage()->getExtra();
|
49 |
+
|
50 |
+
if (isset($extra['bitrix-dir'])) {
|
51 |
+
$vars['bitrix_dir'] = $extra['bitrix-dir'];
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
if (!isset($vars['bitrix_dir'])) {
|
56 |
+
$vars['bitrix_dir'] = 'bitrix';
|
57 |
+
}
|
58 |
+
|
59 |
+
return parent::inflectPackageVars($vars);
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* {@inheritdoc}
|
64 |
+
*/
|
65 |
+
protected function templatePath($path, array $vars = array())
|
66 |
+
{
|
67 |
+
$templatePath = parent::templatePath($path, $vars);
|
68 |
+
$this->checkDuplicates($templatePath, $vars);
|
69 |
+
|
70 |
+
return $templatePath;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Duplicates search packages.
|
75 |
+
*
|
76 |
+
* @param string $path
|
77 |
+
* @param array $vars
|
78 |
+
*/
|
79 |
+
protected function checkDuplicates($path, array $vars = array())
|
80 |
+
{
|
81 |
+
$packageType = substr($vars['type'], strlen('bitrix') + 1);
|
82 |
+
$localDir = explode('/', $vars['bitrix_dir']);
|
83 |
+
array_pop($localDir);
|
84 |
+
$localDir[] = 'local';
|
85 |
+
$localDir = implode('/', $localDir);
|
86 |
+
|
87 |
+
$oldPath = str_replace(
|
88 |
+
array('{$bitrix_dir}', '{$name}'),
|
89 |
+
array($localDir, $vars['name']),
|
90 |
+
$this->locations[$packageType]
|
91 |
+
);
|
92 |
+
|
93 |
+
if (in_array($oldPath, static::$checkedDuplicates)) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
+
if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
|
98 |
+
|
99 |
+
$this->io->writeError(' <error>Duplication of packages:</error>');
|
100 |
+
$this->io->writeError(' <info>Package ' . $oldPath . ' will be called instead package ' . $path . '</info>');
|
101 |
+
|
102 |
+
while (true) {
|
103 |
+
switch ($this->io->ask(' <info>Delete ' . $oldPath . ' [y,n,?]?</info> ', '?')) {
|
104 |
+
case 'y':
|
105 |
+
$fs = new Filesystem();
|
106 |
+
$fs->removeDirectory($oldPath);
|
107 |
+
break 2;
|
108 |
+
|
109 |
+
case 'n':
|
110 |
+
break 2;
|
111 |
+
|
112 |
+
case '?':
|
113 |
+
default:
|
114 |
+
$this->io->writeError(array(
|
115 |
+
' y - delete package ' . $oldPath . ' and to continue with the installation',
|
116 |
+
' n - don\'t delete and to continue with the installation',
|
117 |
+
));
|
118 |
+
$this->io->writeError(' ? - print help');
|
119 |
+
break;
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
static::$checkedDuplicates[] = $oldPath;
|
125 |
+
}
|
126 |
+
}
|
vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class BonefishInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'Packages/{$vendor}/{$name}/'
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
ADDED
@@ -0,0 +1,72 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\DependencyResolver\Pool;
|
5 |
+
|
6 |
+
class CakePHPInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'Plugin/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to CamelCase
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
18 |
+
return $vars;
|
19 |
+
}
|
20 |
+
|
21 |
+
$nameParts = explode('/', $vars['name']);
|
22 |
+
foreach ($nameParts as &$value) {
|
23 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
24 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
25 |
+
$value = str_replace(' ', '', ucwords($value));
|
26 |
+
}
|
27 |
+
$vars['name'] = implode('/', $nameParts);
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Change the default plugin location when cakephp >= 3.0
|
34 |
+
*/
|
35 |
+
public function getLocations()
|
36 |
+
{
|
37 |
+
if ($this->matchesCakeVersion('>=', '3.0.0')) {
|
38 |
+
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
|
39 |
+
}
|
40 |
+
return $this->locations;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Check if CakePHP version matches against a version
|
45 |
+
*
|
46 |
+
* @param string $matcher
|
47 |
+
* @param string $version
|
48 |
+
* @return bool
|
49 |
+
*/
|
50 |
+
protected function matchesCakeVersion($matcher, $version)
|
51 |
+
{
|
52 |
+
if (class_exists('Composer\Semver\Constraint\MultiConstraint')) {
|
53 |
+
$multiClass = 'Composer\Semver\Constraint\MultiConstraint';
|
54 |
+
$constraintClass = 'Composer\Semver\Constraint\Constraint';
|
55 |
+
} else {
|
56 |
+
$multiClass = 'Composer\Package\LinkConstraint\MultiConstraint';
|
57 |
+
$constraintClass = 'Composer\Package\LinkConstraint\VersionConstraint';
|
58 |
+
}
|
59 |
+
|
60 |
+
$repositoryManager = $this->composer->getRepositoryManager();
|
61 |
+
if (! $repositoryManager) {
|
62 |
+
return false;
|
63 |
+
}
|
64 |
+
|
65 |
+
$repos = $repositoryManager->getLocalRepository();
|
66 |
+
if (!$repos) {
|
67 |
+
return false;
|
68 |
+
}
|
69 |
+
|
70 |
+
return $repos->findPackage('cakephp/cakephp', new $constraintClass($matcher, $version)) !== null;
|
71 |
+
}
|
72 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ChefInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'cookbook' => 'Chef/{$vendor}/{$name}/',
|
8 |
+
'role' => 'Chef/roles/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
11 |
+
|
vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CiviCrmInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'ext' => 'ext/{$name}/'
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ClanCatsFrameworkInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'ship' => 'CCF/orbit/{$name}/',
|
8 |
+
'theme' => 'CCF/app/themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
ADDED
@@ -0,0 +1,34 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CockpitInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'cockpit/modules/addons/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format module name.
|
12 |
+
*
|
13 |
+
* Strip `module-` prefix from package name.
|
14 |
+
*
|
15 |
+
* @param array @vars
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] == 'cockpit-module') {
|
22 |
+
return $this->inflectModuleVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
return $vars;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function inflectModuleVars($vars)
|
29 |
+
{
|
30 |
+
$vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
|
31 |
+
|
32 |
+
return $vars;
|
33 |
+
}
|
34 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CodeIgniterInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'application/libraries/{$name}/',
|
8 |
+
'third-party' => 'application/third_party/{$name}/',
|
9 |
+
'module' => 'application/modules/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
ADDED
@@ -0,0 +1,13 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class Concrete5Installer extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'core' => 'concrete/',
|
8 |
+
'block' => 'application/blocks/{$name}/',
|
9 |
+
'package' => 'packages/{$name}/',
|
10 |
+
'theme' => 'application/themes/{$name}/',
|
11 |
+
'update' => 'updates/{$name}/',
|
12 |
+
);
|
13 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Installer for Craft Plugins
|
6 |
+
*/
|
7 |
+
class CraftInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
const NAME_PREFIX = 'craft';
|
10 |
+
const NAME_SUFFIX = 'plugin';
|
11 |
+
|
12 |
+
protected $locations = array(
|
13 |
+
'plugin' => 'craft/plugins/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Strip `craft-` prefix and/or `-plugin` suffix from package names
|
18 |
+
*
|
19 |
+
* @param array $vars
|
20 |
+
*
|
21 |
+
* @return array
|
22 |
+
*/
|
23 |
+
final public function inflectPackageVars($vars)
|
24 |
+
{
|
25 |
+
return $this->inflectPluginVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
private function inflectPluginVars($vars)
|
29 |
+
{
|
30 |
+
$vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
|
31 |
+
$vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
|
32 |
+
|
33 |
+
return $vars;
|
34 |
+
}
|
35 |
+
}
|
vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class CroogoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'Plugin/{$name}/',
|
8 |
+
'theme' => 'View/Themed/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
|
17 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
18 |
+
|
19 |
+
return $vars;
|
20 |
+
}
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DecibelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
/** @var array */
|
7 |
+
protected $locations = array(
|
8 |
+
'app' => 'app/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class DframeInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
ADDED
@@ -0,0 +1,50 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DokuWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'lib/plugins/{$name}/',
|
8 |
+
'template' => 'lib/tpl/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type dokuwiki-plugin, cut off a trailing '-plugin',
|
15 |
+
* or leading dokuwiki_ if present.
|
16 |
+
*
|
17 |
+
* For package type dokuwiki-template, cut off a trailing '-template' if present.
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
|
23 |
+
if ($vars['type'] === 'dokuwiki-plugin') {
|
24 |
+
return $this->inflectPluginVars($vars);
|
25 |
+
}
|
26 |
+
|
27 |
+
if ($vars['type'] === 'dokuwiki-template') {
|
28 |
+
return $this->inflectTemplateVars($vars);
|
29 |
+
}
|
30 |
+
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function inflectPluginVars($vars)
|
35 |
+
{
|
36 |
+
$vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
|
37 |
+
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
38 |
+
|
39 |
+
return $vars;
|
40 |
+
}
|
41 |
+
|
42 |
+
protected function inflectTemplateVars($vars)
|
43 |
+
{
|
44 |
+
$vars['name'] = preg_replace('/-template$/', '', $vars['name']);
|
45 |
+
$vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
|
50 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class DolibarrInstaller
|
6 |
+
*
|
7 |
+
* @package Composer\Installers
|
8 |
+
* @author Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
9 |
+
*/
|
10 |
+
class DolibarrInstaller extends BaseInstaller
|
11 |
+
{
|
12 |
+
//TODO: Add support for scripts and themes
|
13 |
+
protected $locations = array(
|
14 |
+
'module' => 'htdocs/custom/{$name}/',
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class DrupalInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'core' => 'core/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/',
|
10 |
+
'library' => 'libraries/{$name}/',
|
11 |
+
'profile' => 'profiles/{$name}/',
|
12 |
+
'database-driver' => 'drivers/lib/Drupal/Driver/Database/{$name}/',
|
13 |
+
'drush' => 'drush/{$name}/',
|
14 |
+
'custom-theme' => 'themes/custom/{$name}/',
|
15 |
+
'custom-module' => 'modules/custom/{$name}/',
|
16 |
+
'custom-profile' => 'profiles/custom/{$name}/',
|
17 |
+
'drupal-multisite' => 'sites/{$name}/',
|
18 |
+
'console' => 'console/{$name}/',
|
19 |
+
'console-language' => 'console/language/{$name}/',
|
20 |
+
'config' => 'config/sync/',
|
21 |
+
);
|
22 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ElggInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'mod/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class EliasisInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'template' => 'templates/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
ADDED
@@ -0,0 +1,29 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class ExpressionEngineInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
|
9 |
+
protected $locations = array();
|
10 |
+
|
11 |
+
private $ee2Locations = array(
|
12 |
+
'addon' => 'system/expressionengine/third_party/{$name}/',
|
13 |
+
'theme' => 'themes/third_party/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
private $ee3Locations = array(
|
17 |
+
'addon' => 'system/user/addons/{$name}/',
|
18 |
+
'theme' => 'themes/user/{$name}/',
|
19 |
+
);
|
20 |
+
|
21 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
22 |
+
{
|
23 |
+
|
24 |
+
$version = "{$frameworkType}Locations";
|
25 |
+
$this->locations = $this->$version;
|
26 |
+
|
27 |
+
return parent::getInstallPath($package, $frameworkType);
|
28 |
+
}
|
29 |
+
}
|
vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class EzPlatformInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'meta-assets' => 'web/assets/ezplatform/',
|
8 |
+
'assets' => 'web/assets/ezplatform/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class FuelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'fuel/app/modules/{$name}/',
|
8 |
+
'package' => 'fuel/packages/{$name}/',
|
9 |
+
'theme' => 'fuel/app/themes/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class FuelphpInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/GravInstaller.php
ADDED
@@ -0,0 +1,30 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class GravInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'user/plugins/{$name}/',
|
8 |
+
'theme' => 'user/themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name
|
13 |
+
*
|
14 |
+
* @param array $vars
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$restrictedWords = implode('|', array_keys($this->locations));
|
21 |
+
|
22 |
+
$vars['name'] = strtolower($vars['name']);
|
23 |
+
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
|
24 |
+
'$1',
|
25 |
+
$vars['name']
|
26 |
+
);
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
}
|
vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class HuradInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'plugins/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
$nameParts = explode('/', $vars['name']);
|
17 |
+
foreach ($nameParts as &$value) {
|
18 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
19 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
20 |
+
$value = str_replace(' ', '', ucwords($value));
|
21 |
+
}
|
22 |
+
$vars['name'] = implode('/', $nameParts);
|
23 |
+
return $vars;
|
24 |
+
}
|
25 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ImageCMSInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'template' => 'templates/{$name}/',
|
8 |
+
'module' => 'application/modules/{$name}/',
|
9 |
+
'library' => 'application/libraries/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Installer.php
ADDED
@@ -0,0 +1,280 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\Installer\BinaryInstaller;
|
7 |
+
use Composer\Installer\LibraryInstaller;
|
8 |
+
use Composer\IO\IOInterface;
|
9 |
+
use Composer\Package\PackageInterface;
|
10 |
+
use Composer\Repository\InstalledRepositoryInterface;
|
11 |
+
use Composer\Util\Filesystem;
|
12 |
+
|
13 |
+
class Installer extends LibraryInstaller
|
14 |
+
{
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Package types to installer class map
|
18 |
+
*
|
19 |
+
* @var array
|
20 |
+
*/
|
21 |
+
private $supportedTypes = array(
|
22 |
+
'aimeos' => 'AimeosInstaller',
|
23 |
+
'asgard' => 'AsgardInstaller',
|
24 |
+
'attogram' => 'AttogramInstaller',
|
25 |
+
'agl' => 'AglInstaller',
|
26 |
+
'annotatecms' => 'AnnotateCmsInstaller',
|
27 |
+
'bitrix' => 'BitrixInstaller',
|
28 |
+
'bonefish' => 'BonefishInstaller',
|
29 |
+
'cakephp' => 'CakePHPInstaller',
|
30 |
+
'chef' => 'ChefInstaller',
|
31 |
+
'civicrm' => 'CiviCrmInstaller',
|
32 |
+
'ccframework' => 'ClanCatsFrameworkInstaller',
|
33 |
+
'cockpit' => 'CockpitInstaller',
|
34 |
+
'codeigniter' => 'CodeIgniterInstaller',
|
35 |
+
'concrete5' => 'Concrete5Installer',
|
36 |
+
'craft' => 'CraftInstaller',
|
37 |
+
'croogo' => 'CroogoInstaller',
|
38 |
+
'dframe' => 'DframeInstaller',
|
39 |
+
'dokuwiki' => 'DokuWikiInstaller',
|
40 |
+
'dolibarr' => 'DolibarrInstaller',
|
41 |
+
'decibel' => 'DecibelInstaller',
|
42 |
+
'drupal' => 'DrupalInstaller',
|
43 |
+
'elgg' => 'ElggInstaller',
|
44 |
+
'eliasis' => 'EliasisInstaller',
|
45 |
+
'ee3' => 'ExpressionEngineInstaller',
|
46 |
+
'ee2' => 'ExpressionEngineInstaller',
|
47 |
+
'ezplatform' => 'EzPlatformInstaller',
|
48 |
+
'fuel' => 'FuelInstaller',
|
49 |
+
'fuelphp' => 'FuelphpInstaller',
|
50 |
+
'grav' => 'GravInstaller',
|
51 |
+
'hurad' => 'HuradInstaller',
|
52 |
+
'imagecms' => 'ImageCMSInstaller',
|
53 |
+
'itop' => 'ItopInstaller',
|
54 |
+
'joomla' => 'JoomlaInstaller',
|
55 |
+
'kanboard' => 'KanboardInstaller',
|
56 |
+
'kirby' => 'KirbyInstaller',
|
57 |
+
'known' => 'KnownInstaller',
|
58 |
+
'kodicms' => 'KodiCMSInstaller',
|
59 |
+
'kohana' => 'KohanaInstaller',
|
60 |
+
'lms' => 'LanManagementSystemInstaller',
|
61 |
+
'laravel' => 'LaravelInstaller',
|
62 |
+
'lavalite' => 'LavaLiteInstaller',
|
63 |
+
'lithium' => 'LithiumInstaller',
|
64 |
+
'magento' => 'MagentoInstaller',
|
65 |
+
'majima' => 'MajimaInstaller',
|
66 |
+
'mantisbt' => 'MantisBTInstaller',
|
67 |
+
'mako' => 'MakoInstaller',
|
68 |
+
'maya' => 'MayaInstaller',
|
69 |
+
'mautic' => 'MauticInstaller',
|
70 |
+
'mediawiki' => 'MediaWikiInstaller',
|
71 |
+
'microweber' => 'MicroweberInstaller',
|
72 |
+
'modulework' => 'MODULEWorkInstaller',
|
73 |
+
'modx' => 'ModxInstaller',
|
74 |
+
'modxevo' => 'MODXEvoInstaller',
|
75 |
+
'moodle' => 'MoodleInstaller',
|
76 |
+
'october' => 'OctoberInstaller',
|
77 |
+
'ontowiki' => 'OntoWikiInstaller',
|
78 |
+
'oxid' => 'OxidInstaller',
|
79 |
+
'osclass' => 'OsclassInstaller',
|
80 |
+
'pxcms' => 'PxcmsInstaller',
|
81 |
+
'phpbb' => 'PhpBBInstaller',
|
82 |
+
'pimcore' => 'PimcoreInstaller',
|
83 |
+
'piwik' => 'PiwikInstaller',
|
84 |
+
'plentymarkets'=> 'PlentymarketsInstaller',
|
85 |
+
'ppi' => 'PPIInstaller',
|
86 |
+
'puppet' => 'PuppetInstaller',
|
87 |
+
'radphp' => 'RadPHPInstaller',
|
88 |
+
'phifty' => 'PhiftyInstaller',
|
89 |
+
'porto' => 'PortoInstaller',
|
90 |
+
'redaxo' => 'RedaxoInstaller',
|
91 |
+
'redaxo5' => 'Redaxo5Installer',
|
92 |
+
'reindex' => 'ReIndexInstaller',
|
93 |
+
'roundcube' => 'RoundcubeInstaller',
|
94 |
+
'shopware' => 'ShopwareInstaller',
|
95 |
+
'sitedirect' => 'SiteDirectInstaller',
|
96 |
+
'silverstripe' => 'SilverStripeInstaller',
|
97 |
+
'smf' => 'SMFInstaller',
|
98 |
+
'sydes' => 'SyDESInstaller',
|
99 |
+
'sylius' => 'SyliusInstaller',
|
100 |
+
'symfony1' => 'Symfony1Installer',
|
101 |
+
'tao' => 'TaoInstaller',
|
102 |
+
'thelia' => 'TheliaInstaller',
|
103 |
+
'tusk' => 'TuskInstaller',
|
104 |
+
'typo3-cms' => 'TYPO3CmsInstaller',
|
105 |
+
'typo3-flow' => 'TYPO3FlowInstaller',
|
106 |
+
'userfrosting' => 'UserFrostingInstaller',
|
107 |
+
'vanilla' => 'VanillaInstaller',
|
108 |
+
'whmcs' => 'WHMCSInstaller',
|
109 |
+
'wolfcms' => 'WolfCMSInstaller',
|
110 |
+
'wordpress' => 'WordPressInstaller',
|
111 |
+
'yawik' => 'YawikInstaller',
|
112 |
+
'zend' => 'ZendInstaller',
|
113 |
+
'zikula' => 'ZikulaInstaller',
|
114 |
+
'prestashop' => 'PrestashopInstaller'
|
115 |
+
);
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Installer constructor.
|
119 |
+
*
|
120 |
+
* Disables installers specified in main composer extra installer-disable
|
121 |
+
* list
|
122 |
+
*
|
123 |
+
* @param IOInterface $io
|
124 |
+
* @param Composer $composer
|
125 |
+
* @param string $type
|
126 |
+
* @param Filesystem|null $filesystem
|
127 |
+
* @param BinaryInstaller|null $binaryInstaller
|
128 |
+
*/
|
129 |
+
public function __construct(
|
130 |
+
IOInterface $io,
|
131 |
+
Composer $composer,
|
132 |
+
$type = 'library',
|
133 |
+
Filesystem $filesystem = null,
|
134 |
+
BinaryInstaller $binaryInstaller = null
|
135 |
+
) {
|
136 |
+
parent::__construct($io, $composer, $type, $filesystem,
|
137 |
+
$binaryInstaller);
|
138 |
+
$this->removeDisabledInstallers();
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* {@inheritDoc}
|
143 |
+
*/
|
144 |
+
public function getInstallPath(PackageInterface $package)
|
145 |
+
{
|
146 |
+
$type = $package->getType();
|
147 |
+
$frameworkType = $this->findFrameworkType($type);
|
148 |
+
|
149 |
+
if ($frameworkType === false) {
|
150 |
+
throw new \InvalidArgumentException(
|
151 |
+
'Sorry the package type of this package is not yet supported.'
|
152 |
+
);
|
153 |
+
}
|
154 |
+
|
155 |
+
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
156 |
+
$installer = new $class($package, $this->composer, $this->getIO());
|
157 |
+
|
158 |
+
return $installer->getInstallPath($package, $frameworkType);
|
159 |
+
}
|
160 |
+
|
161 |
+
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
|
162 |
+
{
|
163 |
+
parent::uninstall($repo, $package);
|
164 |
+
$installPath = $this->getPackageBasePath($package);
|
165 |
+
$this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? '<comment>deleted</comment>' : '<error>not deleted</error>'));
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* {@inheritDoc}
|
170 |
+
*/
|
171 |
+
public function supports($packageType)
|
172 |
+
{
|
173 |
+
$frameworkType = $this->findFrameworkType($packageType);
|
174 |
+
|
175 |
+
if ($frameworkType === false) {
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
$locationPattern = $this->getLocationPattern($frameworkType);
|
180 |
+
|
181 |
+
return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Finds a supported framework type if it exists and returns it
|
186 |
+
*
|
187 |
+
* @param string $type
|
188 |
+
* @return string
|
189 |
+
*/
|
190 |
+
protected function findFrameworkType($type)
|
191 |
+
{
|
192 |
+
$frameworkType = false;
|
193 |
+
|
194 |
+
krsort($this->supportedTypes);
|
195 |
+
|
196 |
+
foreach ($this->supportedTypes as $key => $val) {
|
197 |
+
if ($key === substr($type, 0, strlen($key))) {
|
198 |
+
$frameworkType = substr($type, 0, strlen($key));
|
199 |
+
break;
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
return $frameworkType;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Get the second part of the regular expression to check for support of a
|
208 |
+
* package type
|
209 |
+
*
|
210 |
+
* @param string $frameworkType
|
211 |
+
* @return string
|
212 |
+
*/
|
213 |
+
protected function getLocationPattern($frameworkType)
|
214 |
+
{
|
215 |
+
$pattern = false;
|
216 |
+
if (!empty($this->supportedTypes[$frameworkType])) {
|
217 |
+
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
|
218 |
+
/** @var BaseInstaller $framework */
|
219 |
+
$framework = new $frameworkClass(null, $this->composer, $this->getIO());
|
220 |
+
$locations = array_keys($framework->getLocations());
|
221 |
+
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
|
222 |
+
}
|
223 |
+
|
224 |
+
return $pattern ? : '(\w+)';
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Get I/O object
|
229 |
+
*
|
230 |
+
* @return IOInterface
|
231 |
+
*/
|
232 |
+
private function getIO()
|
233 |
+
{
|
234 |
+
return $this->io;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Look for installers set to be disabled in composer's extra config and
|
239 |
+
* remove them from the list of supported installers.
|
240 |
+
*
|
241 |
+
* Globals:
|
242 |
+
* - true, "all", and "*" - disable all installers.
|
243 |
+
* - false - enable all installers (useful with
|
244 |
+
* wikimedia/composer-merge-plugin or similar)
|
245 |
+
*
|
246 |
+
* @return void
|
247 |
+
*/
|
248 |
+
protected function removeDisabledInstallers()
|
249 |
+
{
|
250 |
+
$extra = $this->composer->getPackage()->getExtra();
|
251 |
+
|
252 |
+
if (!isset($extra['installer-disable']) || $extra['installer-disable'] === false) {
|
253 |
+
// No installers are disabled
|
254 |
+
return;
|
255 |
+
}
|
256 |
+
|
257 |
+
// Get installers to disable
|
258 |
+
$disable = $extra['installer-disable'];
|
259 |
+
|
260 |
+
// Ensure $disabled is an array
|
261 |
+
if (!is_array($disable)) {
|
262 |
+
$disable = array($disable);
|
263 |
+
}
|
264 |
+
|
265 |
+
// Check which installers should be disabled
|
266 |
+
$all = array(true, "all", "*");
|
267 |
+
$intersect = array_intersect($all, $disable);
|
268 |
+
if (!empty($intersect)) {
|
269 |
+
// Disable all installers
|
270 |
+
$this->supportedTypes = array();
|
271 |
+
} else {
|
272 |
+
// Disable specified installers
|
273 |
+
foreach ($disable as $key => $installer) {
|
274 |
+
if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
|
275 |
+
unset($this->supportedTypes[$installer]);
|
276 |
+
}
|
277 |
+
}
|
278 |
+
}
|
279 |
+
}
|
280 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ItopInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
ADDED
@@ -0,0 +1,15 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class JoomlaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'component' => 'components/{$name}/',
|
8 |
+
'module' => 'modules/{$name}/',
|
9 |
+
'template' => 'templates/{$name}/',
|
10 |
+
'plugin' => 'plugins/{$name}/',
|
11 |
+
'library' => 'libraries/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
// TODO: Add inflector for mod_ and com_ names
|
15 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
ADDED
@@ -0,0 +1,18 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
*
|
6 |
+
* Installer for kanboard plugins
|
7 |
+
*
|
8 |
+
* kanboard.net
|
9 |
+
*
|
10 |
+
* Class KanboardInstaller
|
11 |
+
* @package Composer\Installers
|
12 |
+
*/
|
13 |
+
class KanboardInstaller extends BaseInstaller
|
14 |
+
{
|
15 |
+
protected $locations = array(
|
16 |
+
'plugin' => 'plugins/{$name}/',
|
17 |
+
);
|
18 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KirbyInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'site/plugins/{$name}/',
|
8 |
+
'field' => 'site/fields/{$name}/',
|
9 |
+
'tag' => 'site/tags/{$name}/'
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KnownInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'IdnoPlugins/{$name}/',
|
8 |
+
'theme' => 'Themes/{$name}/',
|
9 |
+
'console' => 'ConsolePlugins/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KodiCMSInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'cms/plugins/{$name}/',
|
8 |
+
'media' => 'cms/media/vendor/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class KohanaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
ADDED
@@ -0,0 +1,27 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class LanManagementSystemInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
'template' => 'templates/{$name}/',
|
11 |
+
'document-template' => 'documents/templates/{$name}/',
|
12 |
+
'userpanel-module' => 'userpanel/modules/{$name}/',
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name to CamelCase
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
21 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
22 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
23 |
+
|
24 |
+
return $vars;
|
25 |
+
}
|
26 |
+
|
27 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LaravelInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'libraries/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LavaLiteInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'packages/{$vendor}/{$name}/',
|
8 |
+
'theme' => 'public/themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class LithiumInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'libraries/{$name}/',
|
8 |
+
'source' => 'libraries/_source/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MODULEWorkInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle MODX Evolution specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class MODXEvoInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'snippet' => 'assets/snippets/{$name}/',
|
11 |
+
'plugin' => 'assets/plugins/{$name}/',
|
12 |
+
'module' => 'assets/modules/{$name}/',
|
13 |
+
'template' => 'assets/templates/{$name}/',
|
14 |
+
'lib' => 'assets/lib/{$name}/'
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MagentoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'app/design/frontend/{$name}/',
|
8 |
+
'skin' => 'skin/frontend/default/{$name}/',
|
9 |
+
'library' => 'lib/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
ADDED
@@ -0,0 +1,37 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin/theme installer for majima
|
6 |
+
* @author David Neustadt
|
7 |
+
*/
|
8 |
+
class MajimaInstaller extends BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array(
|
11 |
+
'plugin' => 'plugins/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Transforms the names
|
16 |
+
* @param array $vars
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
return $this->correctPluginName($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Change hyphenated names to camelcase
|
26 |
+
* @param array $vars
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
private function correctPluginName($vars)
|
30 |
+
{
|
31 |
+
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
32 |
+
return strtoupper($matches[0][1]);
|
33 |
+
}, $vars['name']);
|
34 |
+
$vars['name'] = ucfirst($camelCasedName);
|
35 |
+
return $vars;
|
36 |
+
}
|
37 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MakoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'package' => 'app/packages/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php
ADDED
@@ -0,0 +1,23 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\DependencyResolver\Pool;
|
5 |
+
|
6 |
+
class MantisBTInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'plugins/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to CamelCase
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
18 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
19 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
20 |
+
|
21 |
+
return $vars;
|
22 |
+
}
|
23 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MauticInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name of mautic-plugins to CamelCase
|
13 |
+
*/
|
14 |
+
public function inflectPackageVars($vars)
|
15 |
+
{
|
16 |
+
if ($vars['type'] == 'mautic-plugin') {
|
17 |
+
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
18 |
+
return strtoupper($matches[0][1]);
|
19 |
+
}, ucfirst($vars['name']));
|
20 |
+
}
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
|
25 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
ADDED
@@ -0,0 +1,33 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MayaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name.
|
12 |
+
*
|
13 |
+
* For package type maya-module, cut off a trailing '-module' if present.
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
if ($vars['type'] === 'maya-module') {
|
19 |
+
return $this->inflectModuleVars($vars);
|
20 |
+
}
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
|
25 |
+
protected function inflectModuleVars($vars)
|
26 |
+
{
|
27 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
29 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
30 |
+
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
ADDED
@@ -0,0 +1,51 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MediaWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'core' => 'core/',
|
8 |
+
'extension' => 'extensions/{$name}/',
|
9 |
+
'skin' => 'skins/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name.
|
14 |
+
*
|
15 |
+
* For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
|
16 |
+
* to CamelCase keeping existing uppercase chars.
|
17 |
+
*
|
18 |
+
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
|
19 |
+
*
|
20 |
+
*/
|
21 |
+
public function inflectPackageVars($vars)
|
22 |
+
{
|
23 |
+
|
24 |
+
if ($vars['type'] === 'mediawiki-extension') {
|
25 |
+
return $this->inflectExtensionVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
if ($vars['type'] === 'mediawiki-skin') {
|
29 |
+
return $this->inflectSkinVars($vars);
|
30 |
+
}
|
31 |
+
|
32 |
+
return $vars;
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function inflectExtensionVars($vars)
|
36 |
+
{
|
37 |
+
$vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
|
38 |
+
$vars['name'] = str_replace('-', ' ', $vars['name']);
|
39 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
40 |
+
|
41 |
+
return $vars;
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function inflectSkinVars($vars)
|
45 |
+
{
|
46 |
+
$vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
|
47 |
+
|
48 |
+
return $vars;
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
ADDED
@@ -0,0 +1,119 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MicroweberInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'userfiles/modules/{$install_item_dir}/',
|
8 |
+
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
|
9 |
+
'template' => 'userfiles/templates/{$install_item_dir}/',
|
10 |
+
'element' => 'userfiles/elements/{$install_item_dir}/',
|
11 |
+
'vendor' => 'vendor/{$install_item_dir}/',
|
12 |
+
'components' => 'components/{$install_item_dir}/'
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name.
|
17 |
+
*
|
18 |
+
* For package type microweber-module, cut off a trailing '-module' if present
|
19 |
+
*
|
20 |
+
* For package type microweber-template, cut off a trailing '-template' if present.
|
21 |
+
*
|
22 |
+
*/
|
23 |
+
public function inflectPackageVars($vars)
|
24 |
+
{
|
25 |
+
|
26 |
+
|
27 |
+
if ($this->package->getTargetDir()) {
|
28 |
+
$vars['install_item_dir'] = $this->package->getTargetDir();
|
29 |
+
} else {
|
30 |
+
$vars['install_item_dir'] = $vars['name'];
|
31 |
+
if ($vars['type'] === 'microweber-template') {
|
32 |
+
return $this->inflectTemplateVars($vars);
|
33 |
+
}
|
34 |
+
if ($vars['type'] === 'microweber-templates') {
|
35 |
+
return $this->inflectTemplatesVars($vars);
|
36 |
+
}
|
37 |
+
if ($vars['type'] === 'microweber-core') {
|
38 |
+
return $this->inflectCoreVars($vars);
|
39 |
+
}
|
40 |
+
if ($vars['type'] === 'microweber-adapter') {
|
41 |
+
return $this->inflectCoreVars($vars);
|
42 |
+
}
|
43 |
+
if ($vars['type'] === 'microweber-module') {
|
44 |
+
return $this->inflectModuleVars($vars);
|
45 |
+
}
|
46 |
+
if ($vars['type'] === 'microweber-modules') {
|
47 |
+
return $this->inflectModulesVars($vars);
|
48 |
+
}
|
49 |
+
if ($vars['type'] === 'microweber-skin') {
|
50 |
+
return $this->inflectSkinVars($vars);
|
51 |
+
}
|
52 |
+
if ($vars['type'] === 'microweber-element' or $vars['type'] === 'microweber-elements') {
|
53 |
+
return $this->inflectElementVars($vars);
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
|
58 |
+
return $vars;
|
59 |
+
}
|
60 |
+
|
61 |
+
protected function inflectTemplateVars($vars)
|
62 |
+
{
|
63 |
+
$vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
|
64 |
+
$vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
|
65 |
+
|
66 |
+
return $vars;
|
67 |
+
}
|
68 |
+
|
69 |
+
protected function inflectTemplatesVars($vars)
|
70 |
+
{
|
71 |
+
$vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
|
72 |
+
$vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
|
73 |
+
|
74 |
+
return $vars;
|
75 |
+
}
|
76 |
+
|
77 |
+
protected function inflectCoreVars($vars)
|
78 |
+
{
|
79 |
+
$vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
|
80 |
+
$vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
|
81 |
+
$vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
|
82 |
+
|
83 |
+
return $vars;
|
84 |
+
}
|
85 |
+
|
86 |
+
protected function inflectModuleVars($vars)
|
87 |
+
{
|
88 |
+
$vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
|
89 |
+
$vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
|
90 |
+
|
91 |
+
return $vars;
|
92 |
+
}
|
93 |
+
|
94 |
+
protected function inflectModulesVars($vars)
|
95 |
+
{
|
96 |
+
$vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
|
97 |
+
$vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
|
98 |
+
|
99 |
+
return $vars;
|
100 |
+
}
|
101 |
+
|
102 |
+
protected function inflectSkinVars($vars)
|
103 |
+
{
|
104 |
+
$vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
|
105 |
+
$vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
|
106 |
+
|
107 |
+
return $vars;
|
108 |
+
}
|
109 |
+
|
110 |
+
protected function inflectElementVars($vars)
|
111 |
+
{
|
112 |
+
$vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
|
113 |
+
$vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
|
114 |
+
$vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
|
115 |
+
$vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
|
116 |
+
|
117 |
+
return $vars;
|
118 |
+
}
|
119 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle MODX specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class ModxInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'extra' => 'core/packages/{$name}/'
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
ADDED
@@ -0,0 +1,58 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class MoodleInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'mod' => 'mod/{$name}/',
|
8 |
+
'admin_report' => 'admin/report/{$name}/',
|
9 |
+
'atto' => 'lib/editor/atto/plugins/{$name}/',
|
10 |
+
'tool' => 'admin/tool/{$name}/',
|
11 |
+
'assignment' => 'mod/assignment/type/{$name}/',
|
12 |
+
'assignsubmission' => 'mod/assign/submission/{$name}/',
|
13 |
+
'assignfeedback' => 'mod/assign/feedback/{$name}/',
|
14 |
+
'auth' => 'auth/{$name}/',
|
15 |
+
'availability' => 'availability/condition/{$name}/',
|
16 |
+
'block' => 'blocks/{$name}/',
|
17 |
+
'booktool' => 'mod/book/tool/{$name}/',
|
18 |
+
'cachestore' => 'cache/stores/{$name}/',
|
19 |
+
'cachelock' => 'cache/locks/{$name}/',
|
20 |
+
'calendartype' => 'calendar/type/{$name}/',
|
21 |
+
'format' => 'course/format/{$name}/',
|
22 |
+
'coursereport' => 'course/report/{$name}/',
|
23 |
+
'customcertelement' => 'mod/customcert/element/{$name}/',
|
24 |
+
'datafield' => 'mod/data/field/{$name}/',
|
25 |
+
'datapreset' => 'mod/data/preset/{$name}/',
|
26 |
+
'editor' => 'lib/editor/{$name}/',
|
27 |
+
'enrol' => 'enrol/{$name}/',
|
28 |
+
'filter' => 'filter/{$name}/',
|
29 |
+
'gradeexport' => 'grade/export/{$name}/',
|
30 |
+
'gradeimport' => 'grade/import/{$name}/',
|
31 |
+
'gradereport' => 'grade/report/{$name}/',
|
32 |
+
'gradingform' => 'grade/grading/form/{$name}/',
|
33 |
+
'local' => 'local/{$name}/',
|
34 |
+
'logstore' => 'admin/tool/log/store/{$name}/',
|
35 |
+
'ltisource' => 'mod/lti/source/{$name}/',
|
36 |
+
'ltiservice' => 'mod/lti/service/{$name}/',
|
37 |
+
'message' => 'message/output/{$name}/',
|
38 |
+
'mnetservice' => 'mnet/service/{$name}/',
|
39 |
+
'plagiarism' => 'plagiarism/{$name}/',
|
40 |
+
'portfolio' => 'portfolio/{$name}/',
|
41 |
+
'qbehaviour' => 'question/behaviour/{$name}/',
|
42 |
+
'qformat' => 'question/format/{$name}/',
|
43 |
+
'qtype' => 'question/type/{$name}/',
|
44 |
+
'quizaccess' => 'mod/quiz/accessrule/{$name}/',
|
45 |
+
'quiz' => 'mod/quiz/report/{$name}/',
|
46 |
+
'report' => 'report/{$name}/',
|
47 |
+
'repository' => 'repository/{$name}/',
|
48 |
+
'scormreport' => 'mod/scorm/report/{$name}/',
|
49 |
+
'search' => 'search/engine/{$name}/',
|
50 |
+
'theme' => 'theme/{$name}/',
|
51 |
+
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
|
52 |
+
'profilefield' => 'user/profile/field/{$name}/',
|
53 |
+
'webservice' => 'webservice/{$name}/',
|
54 |
+
'workshopallocation' => 'mod/workshop/allocation/{$name}/',
|
55 |
+
'workshopeval' => 'mod/workshop/eval/{$name}/',
|
56 |
+
'workshopform' => 'mod/workshop/form/{$name}/'
|
57 |
+
);
|
58 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
ADDED
@@ -0,0 +1,47 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class OctoberInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
'plugin' => 'plugins/{$vendor}/{$name}/',
|
9 |
+
'theme' => 'themes/{$name}/'
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name.
|
14 |
+
*
|
15 |
+
* For package type october-plugin, cut off a trailing '-plugin' if present.
|
16 |
+
*
|
17 |
+
* For package type october-theme, cut off a trailing '-theme' if present.
|
18 |
+
*
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
if ($vars['type'] === 'october-plugin') {
|
23 |
+
return $this->inflectPluginVars($vars);
|
24 |
+
}
|
25 |
+
|
26 |
+
if ($vars['type'] === 'october-theme') {
|
27 |
+
return $this->inflectThemeVars($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
|
33 |
+
protected function inflectPluginVars($vars)
|
34 |
+
{
|
35 |
+
$vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
|
36 |
+
$vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
|
37 |
+
|
38 |
+
return $vars;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function inflectThemeVars($vars)
|
42 |
+
{
|
43 |
+
$vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
|
44 |
+
|
45 |
+
return $vars;
|
46 |
+
}
|
47 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class OntoWikiInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'extensions/{$name}/',
|
8 |
+
'theme' => 'extensions/themes/{$name}/',
|
9 |
+
'translation' => 'extensions/translations/{$name}/',
|
10 |
+
);
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Format package name to lower case and remove ".ontowiki" suffix
|
14 |
+
*/
|
15 |
+
public function inflectPackageVars($vars)
|
16 |
+
{
|
17 |
+
$vars['name'] = strtolower($vars['name']);
|
18 |
+
$vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
|
19 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
20 |
+
$vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
|
21 |
+
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
ADDED
@@ -0,0 +1,14 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
|
5 |
+
class OsclassInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'plugin' => 'oc-content/plugins/{$name}/',
|
10 |
+
'theme' => 'oc-content/themes/{$name}/',
|
11 |
+
'language' => 'oc-content/languages/{$name}/',
|
12 |
+
);
|
13 |
+
|
14 |
+
}
|
vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
ADDED
@@ -0,0 +1,59 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class OxidInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
const VENDOR_PATTERN = '/^modules\/(?P<vendor>.+)\/.+/';
|
9 |
+
|
10 |
+
protected $locations = array(
|
11 |
+
'module' => 'modules/{$name}/',
|
12 |
+
'theme' => 'application/views/{$name}/',
|
13 |
+
'out' => 'out/{$name}/',
|
14 |
+
);
|
15 |
+
|
16 |
+
/**
|
17 |
+
* getInstallPath
|
18 |
+
*
|
19 |
+
* @param PackageInterface $package
|
20 |
+
* @param string $frameworkType
|
21 |
+
* @return void
|
22 |
+
*/
|
23 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
+
{
|
25 |
+
$installPath = parent::getInstallPath($package, $frameworkType);
|
26 |
+
$type = $this->package->getType();
|
27 |
+
if ($type === 'oxid-module') {
|
28 |
+
$this->prepareVendorDirectory($installPath);
|
29 |
+
}
|
30 |
+
return $installPath;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* prepareVendorDirectory
|
35 |
+
*
|
36 |
+
* Makes sure there is a vendormetadata.php file inside
|
37 |
+
* the vendor folder if there is a vendor folder.
|
38 |
+
*
|
39 |
+
* @param string $installPath
|
40 |
+
* @return void
|
41 |
+
*/
|
42 |
+
protected function prepareVendorDirectory($installPath)
|
43 |
+
{
|
44 |
+
$matches = '';
|
45 |
+
$hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
|
46 |
+
if (!$hasVendorDirectory) {
|
47 |
+
return;
|
48 |
+
}
|
49 |
+
|
50 |
+
$vendorDirectory = $matches['vendor'];
|
51 |
+
$vendorPath = getcwd() . '/modules/' . $vendorDirectory;
|
52 |
+
if (!file_exists($vendorPath)) {
|
53 |
+
mkdir($vendorPath, 0755, true);
|
54 |
+
}
|
55 |
+
|
56 |
+
$vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
|
57 |
+
touch($vendorMetaDataPath);
|
58 |
+
}
|
59 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PPIInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PhiftyInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'bundles/{$name}/',
|
8 |
+
'library' => 'libraries/{$name}/',
|
9 |
+
'framework' => 'frameworks/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PhpBBInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'extension' => 'ext/{$vendor}/{$name}/',
|
8 |
+
'language' => 'language/{$name}/',
|
9 |
+
'style' => 'styles/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PimcoreInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
16 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
17 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
18 |
+
|
19 |
+
return $vars;
|
20 |
+
}
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Class PiwikInstaller
|
6 |
+
*
|
7 |
+
* @package Composer\Installers
|
8 |
+
*/
|
9 |
+
class PiwikInstaller extends BaseInstaller
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* @var array
|
13 |
+
*/
|
14 |
+
protected $locations = array(
|
15 |
+
'plugin' => 'plugins/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Format package name to CamelCase
|
20 |
+
* @param array $vars
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
ADDED
@@ -0,0 +1,29 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PlentymarketsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => '{$name}/'
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Remove hyphen, "plugin" and format to camelcase
|
12 |
+
* @param array $vars
|
13 |
+
*
|
14 |
+
* @return array
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
$vars['name'] = explode("-", $vars['name']);
|
19 |
+
foreach ($vars['name'] as $key => $name) {
|
20 |
+
$vars['name'][$key] = ucfirst($vars['name'][$key]);
|
21 |
+
if (strcasecmp($name, "Plugin") == 0) {
|
22 |
+
unset($vars['name'][$key]);
|
23 |
+
}
|
24 |
+
}
|
25 |
+
$vars['name'] = implode("",$vars['name']);
|
26 |
+
|
27 |
+
return $vars;
|
28 |
+
}
|
29 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Plugin.php
ADDED
@@ -0,0 +1,27 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
use Composer\Composer;
|
6 |
+
use Composer\IO\IOInterface;
|
7 |
+
use Composer\Plugin\PluginInterface;
|
8 |
+
|
9 |
+
class Plugin implements PluginInterface
|
10 |
+
{
|
11 |
+
private $installer;
|
12 |
+
|
13 |
+
public function activate(Composer $composer, IOInterface $io)
|
14 |
+
{
|
15 |
+
$this->installer = new Installer($io, $composer);
|
16 |
+
$composer->getInstallationManager()->addInstaller($this->installer);
|
17 |
+
}
|
18 |
+
|
19 |
+
public function deactivate(Composer $composer, IOInterface $io)
|
20 |
+
{
|
21 |
+
$composer->getInstallationManager()->removeInstaller($this->installer);
|
22 |
+
}
|
23 |
+
|
24 |
+
public function uninstall(Composer $composer, IOInterface $io)
|
25 |
+
{
|
26 |
+
}
|
27 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PortoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'container' => 'app/Containers/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PrestashopInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class PuppetInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
|
8 |
+
protected $locations = array(
|
9 |
+
'module' => 'modules/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
ADDED
@@ -0,0 +1,63 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class PxcmsInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'app/Modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* @param array $vars
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
if ($vars['type'] === 'pxcms-module') {
|
21 |
+
return $this->inflectModuleVars($vars);
|
22 |
+
}
|
23 |
+
|
24 |
+
if ($vars['type'] === 'pxcms-theme') {
|
25 |
+
return $this->inflectThemeVars($vars);
|
26 |
+
}
|
27 |
+
|
28 |
+
return $vars;
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
33 |
+
*
|
34 |
+
* return string
|
35 |
+
*/
|
36 |
+
protected function inflectModuleVars($vars)
|
37 |
+
{
|
38 |
+
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
39 |
+
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
|
40 |
+
$vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
|
41 |
+
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
42 |
+
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
43 |
+
|
44 |
+
return $vars;
|
45 |
+
}
|
46 |
+
|
47 |
+
|
48 |
+
/**
|
49 |
+
* For package type pxcms-module, cut off a trailing '-plugin' if present.
|
50 |
+
*
|
51 |
+
* return string
|
52 |
+
*/
|
53 |
+
protected function inflectThemeVars($vars)
|
54 |
+
{
|
55 |
+
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
|
56 |
+
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
|
57 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
|
58 |
+
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
|
59 |
+
$vars['name'] = ucwords($vars['name']); // make module name camelcased
|
60 |
+
|
61 |
+
return $vars;
|
62 |
+
}
|
63 |
+
}
|
vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
ADDED
@@ -0,0 +1,24 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RadPHPInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'src/{$name}/'
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Format package name to CamelCase
|
12 |
+
*/
|
13 |
+
public function inflectPackageVars($vars)
|
14 |
+
{
|
15 |
+
$nameParts = explode('/', $vars['name']);
|
16 |
+
foreach ($nameParts as &$value) {
|
17 |
+
$value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
|
18 |
+
$value = str_replace(array('-', '_'), ' ', $value);
|
19 |
+
$value = str_replace(' ', '', ucwords($value));
|
20 |
+
}
|
21 |
+
$vars['name'] = implode('/', $nameParts);
|
22 |
+
return $vars;
|
23 |
+
}
|
24 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ReIndexInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'themes/{$name}/',
|
8 |
+
'plugin' => 'plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class Redaxo5Installer extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'addon' => 'redaxo/src/addons/{$name}/',
|
8 |
+
'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RedaxoInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'addon' => 'redaxo/include/addons/{$name}/',
|
8 |
+
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
ADDED
@@ -0,0 +1,22 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class RoundcubeInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
);
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Lowercase name and changes the name to a underscores
|
12 |
+
*
|
13 |
+
* @param array $vars
|
14 |
+
* @return array
|
15 |
+
*/
|
16 |
+
public function inflectPackageVars($vars)
|
17 |
+
{
|
18 |
+
$vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
|
19 |
+
|
20 |
+
return $vars;
|
21 |
+
}
|
22 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SMFInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'Sources/{$name}/',
|
8 |
+
'theme' => 'Themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
ADDED
@@ -0,0 +1,60 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin/theme installer for shopware
|
6 |
+
* @author Benjamin Boit
|
7 |
+
*/
|
8 |
+
class ShopwareInstaller extends BaseInstaller
|
9 |
+
{
|
10 |
+
protected $locations = array(
|
11 |
+
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
|
12 |
+
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
|
13 |
+
'frontend-plugin' => 'engine/Shopware/Plugins/Local/Frontend/{$name}/',
|
14 |
+
'theme' => 'templates/{$name}/',
|
15 |
+
'plugin' => 'custom/plugins/{$name}/',
|
16 |
+
'frontend-theme' => 'themes/Frontend/{$name}/',
|
17 |
+
);
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Transforms the names
|
21 |
+
* @param array $vars
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
if ($vars['type'] === 'shopware-theme') {
|
27 |
+
return $this->correctThemeName($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $this->correctPluginName($vars);
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Changes the name to a camelcased combination of vendor and name
|
35 |
+
* @param array $vars
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
private function correctPluginName($vars)
|
39 |
+
{
|
40 |
+
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
41 |
+
return strtoupper($matches[0][1]);
|
42 |
+
}, $vars['name']);
|
43 |
+
|
44 |
+
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
|
45 |
+
|
46 |
+
return $vars;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Changes the name to a underscore separated name
|
51 |
+
* @param array $vars
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
private function correctThemeName($vars)
|
55 |
+
{
|
56 |
+
$vars['name'] = str_replace('-', '_', $vars['name']);
|
57 |
+
|
58 |
+
return $vars;
|
59 |
+
}
|
60 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
ADDED
@@ -0,0 +1,35 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
use Composer\Package\PackageInterface;
|
5 |
+
|
6 |
+
class SilverStripeInstaller extends BaseInstaller
|
7 |
+
{
|
8 |
+
protected $locations = array(
|
9 |
+
'module' => '{$name}/',
|
10 |
+
'theme' => 'themes/{$name}/',
|
11 |
+
);
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Return the install path based on package type.
|
15 |
+
*
|
16 |
+
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
|
17 |
+
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
|
18 |
+
*
|
19 |
+
* @param PackageInterface $package
|
20 |
+
* @param string $frameworkType
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function getInstallPath(PackageInterface $package, $frameworkType = '')
|
24 |
+
{
|
25 |
+
if (
|
26 |
+
$package->getName() == 'silverstripe/framework'
|
27 |
+
&& preg_match('/^\d+\.\d+\.\d+/', $package->getVersion())
|
28 |
+
&& version_compare($package->getVersion(), '2.999.999') < 0
|
29 |
+
) {
|
30 |
+
return $this->templatePath($this->locations['module'], array('name' => 'sapphire'));
|
31 |
+
}
|
32 |
+
|
33 |
+
return parent::getInstallPath($package, $frameworkType);
|
34 |
+
}
|
35 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
ADDED
@@ -0,0 +1,25 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class SiteDirectInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'module' => 'modules/{$vendor}/{$name}/',
|
9 |
+
'plugin' => 'plugins/{$vendor}/{$name}/'
|
10 |
+
);
|
11 |
+
|
12 |
+
public function inflectPackageVars($vars)
|
13 |
+
{
|
14 |
+
return $this->parseVars($vars);
|
15 |
+
}
|
16 |
+
|
17 |
+
protected function parseVars($vars)
|
18 |
+
{
|
19 |
+
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
|
20 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
21 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
22 |
+
|
23 |
+
return $vars;
|
24 |
+
}
|
25 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SyDESInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'app/modules/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format module name.
|
13 |
+
*
|
14 |
+
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
|
15 |
+
*
|
16 |
+
* @param array @vars
|
17 |
+
*
|
18 |
+
* @return array
|
19 |
+
*/
|
20 |
+
public function inflectPackageVars($vars)
|
21 |
+
{
|
22 |
+
if ($vars['type'] == 'sydes-module') {
|
23 |
+
return $this->inflectModuleVars($vars);
|
24 |
+
}
|
25 |
+
|
26 |
+
if ($vars['type'] === 'sydes-theme') {
|
27 |
+
return $this->inflectThemeVars($vars);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
|
33 |
+
public function inflectModuleVars($vars)
|
34 |
+
{
|
35 |
+
$vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
37 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
38 |
+
|
39 |
+
return $vars;
|
40 |
+
}
|
41 |
+
|
42 |
+
protected function inflectThemeVars($vars)
|
43 |
+
{
|
44 |
+
$vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
|
45 |
+
$vars['name'] = strtolower($vars['name']);
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class SyliusInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'theme' => 'themes/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Plugin installer for symfony 1.x
|
6 |
+
*
|
7 |
+
* @author Jérôme Tamarelle <jerome@tamarelle.net>
|
8 |
+
*/
|
9 |
+
class Symfony1Installer extends BaseInstaller
|
10 |
+
{
|
11 |
+
protected $locations = array(
|
12 |
+
'plugin' => 'plugins/{$name}/',
|
13 |
+
);
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Format package name to CamelCase
|
17 |
+
*/
|
18 |
+
public function inflectPackageVars($vars)
|
19 |
+
{
|
20 |
+
$vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
|
21 |
+
return strtoupper($matches[0][1]);
|
22 |
+
}, $vars['name']);
|
23 |
+
|
24 |
+
return $vars;
|
25 |
+
}
|
26 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
ADDED
@@ -0,0 +1,16 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Extension installer for TYPO3 CMS
|
6 |
+
*
|
7 |
+
* @deprecated since 1.0.25, use https://packagist.org/packages/typo3/cms-composer-installers instead
|
8 |
+
*
|
9 |
+
* @author Sascha Egerer <sascha.egerer@dkd.de>
|
10 |
+
*/
|
11 |
+
class TYPO3CmsInstaller extends BaseInstaller
|
12 |
+
{
|
13 |
+
protected $locations = array(
|
14 |
+
'extension' => 'typo3conf/ext/{$name}/',
|
15 |
+
);
|
16 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
ADDED
@@ -0,0 +1,38 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle TYPO3 Flow specifics when installing packages.
|
6 |
+
*/
|
7 |
+
class TYPO3FlowInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'package' => 'Packages/Application/{$name}/',
|
11 |
+
'framework' => 'Packages/Framework/{$name}/',
|
12 |
+
'plugin' => 'Packages/Plugins/{$name}/',
|
13 |
+
'site' => 'Packages/Sites/{$name}/',
|
14 |
+
'boilerplate' => 'Packages/Boilerplates/{$name}/',
|
15 |
+
'build' => 'Build/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Modify the package name to be a TYPO3 Flow style key.
|
20 |
+
*
|
21 |
+
* @param array $vars
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$autoload = $this->package->getAutoload();
|
27 |
+
if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
|
28 |
+
$namespace = key($autoload['psr-0']);
|
29 |
+
$vars['name'] = str_replace('\\', '.', $namespace);
|
30 |
+
}
|
31 |
+
if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
|
32 |
+
$namespace = key($autoload['psr-4']);
|
33 |
+
$vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
|
34 |
+
}
|
35 |
+
|
36 |
+
return $vars;
|
37 |
+
}
|
38 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* An installer to handle TAO extensions.
|
6 |
+
*/
|
7 |
+
class TaoInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'extension' => '{$name}'
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class TheliaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'local/modules/{$name}/',
|
8 |
+
'frontoffice-template' => 'templates/frontOffice/{$name}/',
|
9 |
+
'backoffice-template' => 'templates/backOffice/{$name}/',
|
10 |
+
'email-template' => 'templates/email/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
ADDED
@@ -0,0 +1,14 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
/**
|
4 |
+
* Composer installer for 3rd party Tusk utilities
|
5 |
+
* @author Drew Ewing <drew@phenocode.com>
|
6 |
+
*/
|
7 |
+
class TuskInstaller extends BaseInstaller
|
8 |
+
{
|
9 |
+
protected $locations = array(
|
10 |
+
'task' => '.tusk/tasks/{$name}/',
|
11 |
+
'command' => '.tusk/commands/{$name}/',
|
12 |
+
'asset' => 'assets/tusk/{$name}/',
|
13 |
+
);
|
14 |
+
}
|
vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class UserFrostingInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'sprinkle' => 'app/sprinkles/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class VanillaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'plugins/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/',
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
ADDED
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class VgmcpInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'bundle' => 'src/{$vendor}/{$name}/',
|
8 |
+
'theme' => 'themes/{$name}/'
|
9 |
+
);
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Format package name.
|
13 |
+
*
|
14 |
+
* For package type vgmcp-bundle, cut off a trailing '-bundle' if present.
|
15 |
+
*
|
16 |
+
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public function inflectPackageVars($vars)
|
20 |
+
{
|
21 |
+
if ($vars['type'] === 'vgmcp-bundle') {
|
22 |
+
return $this->inflectPluginVars($vars);
|
23 |
+
}
|
24 |
+
|
25 |
+
if ($vars['type'] === 'vgmcp-theme') {
|
26 |
+
return $this->inflectThemeVars($vars);
|
27 |
+
}
|
28 |
+
|
29 |
+
return $vars;
|
30 |
+
}
|
31 |
+
|
32 |
+
protected function inflectPluginVars($vars)
|
33 |
+
{
|
34 |
+
$vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
|
35 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
36 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
37 |
+
|
38 |
+
return $vars;
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function inflectThemeVars($vars)
|
42 |
+
{
|
43 |
+
$vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
|
44 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
45 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
46 |
+
|
47 |
+
return $vars;
|
48 |
+
}
|
49 |
+
}
|
vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
ADDED
@@ -0,0 +1,21 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Composer\Installers;
|
4 |
+
|
5 |
+
class WHMCSInstaller extends BaseInstaller
|
6 |
+
{
|
7 |
+
protected $locations = array(
|
8 |
+
'addons' => 'modules/addons/{$vendor}_{$name}/',
|
9 |
+
'fraud' => 'modules/fraud/{$vendor}_{$name}/',
|
10 |
+
'gateways' => 'modules/gateways/{$vendor}_{$name}/',
|
11 |
+
'notifications' => 'modules/notifications/{$vendor}_{$name}/',
|
12 |
+
'registrars' => 'modules/registrars/{$vendor}_{$name}/',
|
13 |
+
'reports' => 'modules/reports/{$vendor}_{$name}/',
|
14 |
+
'security' => 'modules/security/{$vendor}_{$name}/',
|
15 |
+
'servers' => 'modules/servers/{$vendor}_{$name}/',
|
16 |
+
'social' => 'modules/social/{$vendor}_{$name}/',
|
17 |
+
'support' => 'modules/support/{$vendor}_{$name}/',
|
18 |
+
'templates' => 'templates/{$vendor}_{$name}/',
|
19 |
+
'includes' => 'includes/{$vendor}_{$name}/'
|
20 |
+
);
|
21 |
+
}
|
vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
ADDED
@@ -0,0 +1,9 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class WolfCMSInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'wolf/plugins/{$name}/',
|
8 |
+
);
|
9 |
+
}
|
vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
ADDED
@@ -0,0 +1,12 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class WordPressInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'plugin' => 'wp-content/plugins/{$name}/',
|
8 |
+
'theme' => 'wp-content/themes/{$name}/',
|
9 |
+
'muplugin' => 'wp-content/mu-plugins/{$name}/',
|
10 |
+
'dropin' => 'wp-content/{$name}/',
|
11 |
+
);
|
12 |
+
}
|
vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
ADDED
@@ -0,0 +1,32 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Created by PhpStorm.
|
4 |
+
* User: cbleek
|
5 |
+
* Date: 25.03.16
|
6 |
+
* Time: 20:55
|
7 |
+
*/
|
8 |
+
|
9 |
+
namespace Composer\Installers;
|
10 |
+
|
11 |
+
|
12 |
+
class YawikInstaller extends BaseInstaller
|
13 |
+
{
|
14 |
+
protected $locations = array(
|
15 |
+
'module' => 'module/{$name}/',
|
16 |
+
);
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Format package name to CamelCase
|
20 |
+
* @param array $vars
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
public function inflectPackageVars($vars)
|
25 |
+
{
|
26 |
+
$vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
|
27 |
+
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
|
28 |
+
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
|
29 |
+
|
30 |
+
return $vars;
|
31 |
+
}
|
32 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
ADDED
@@ -0,0 +1,11 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ZendInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'library' => 'library/{$name}/',
|
8 |
+
'extra' => 'extras/library/{$name}/',
|
9 |
+
'module' => 'module/{$name}/',
|
10 |
+
);
|
11 |
+
}
|
vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
ADDED
@@ -0,0 +1,10 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
namespace Composer\Installers;
|
3 |
+
|
4 |
+
class ZikulaInstaller extends BaseInstaller
|
5 |
+
{
|
6 |
+
protected $locations = array(
|
7 |
+
'module' => 'modules/{$vendor}-{$name}/',
|
8 |
+
'theme' => 'themes/{$vendor}-{$name}/'
|
9 |
+
);
|
10 |
+
}
|
vendor/composer/installers/src/bootstrap.php
ADDED
@@ -0,0 +1,13 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
function includeIfExists($file)
|
3 |
+
{
|
4 |
+
if (file_exists($file)) {
|
5 |
+
return include $file;
|
6 |
+
}
|
7 |
+
}
|
8 |
+
if ((!$loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) {
|
9 |
+
die('You must set up the project dependencies, run the following commands:'.PHP_EOL.
|
10 |
+
'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
|
11 |
+
'php composer.phar install'.PHP_EOL);
|
12 |
+
}
|
13 |
+
return $loader;
|
vendor/composer/platform_check.php
ADDED
@@ -0,0 +1,26 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// platform_check.php @generated by Composer
|
4 |
+
|
5 |
+
$issues = array();
|
6 |
+
|
7 |
+
if (!(PHP_VERSION_ID >= 50600)) {
|
8 |
+
$issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';
|
9 |
+
}
|
10 |
+
|
11 |
+
if ($issues) {
|
12 |
+
if (!headers_sent()) {
|
13 |
+
header('HTTP/1.1 500 Internal Server Error');
|
14 |
+
}
|
15 |
+
if (!ini_get('display_errors')) {
|
16 |
+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
17 |
+
fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
|
18 |
+
} elseif (!headers_sent()) {
|
19 |
+
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
trigger_error(
|
23 |
+
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
24 |
+
E_USER_ERROR
|
25 |
+
);
|
26 |
+
}
|
vendor/wp-media/rocket-lazyload-common/composer.json
ADDED
@@ -0,0 +1,49 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
{
|
2 |
+
"name": "wp-media/rocket-lazyload-common",
|
3 |
+
"description": "Common Code between WP Rocket and Lazyload by WP Rocket",
|
4 |
+
"license": "GPL-3.0-or-later",
|
5 |
+
"support": {
|
6 |
+
"issues": "https://github.com/wp-media/rocket-lazyload-common/issues",
|
7 |
+
"source": "https://github.com/wp-media/rocket-lazyload-common"
|
8 |
+
},
|
9 |
+
"authors": [
|
10 |
+
{
|
11 |
+
"name": "WP Media",
|
12 |
+
"email": "contact@wp-media.me"
|
13 |
+
}
|
14 |
+
],
|
15 |
+
"minimum-stability": "stable",
|
16 |
+
"autoload": {
|
17 |
+
"psr-4": {
|
18 |
+
"RocketLazyload\\": "src"
|
19 |
+
}
|
20 |
+
},
|
21 |
+
"autoload-dev": {
|
22 |
+
"psr-4": {
|
23 |
+
"RocketLazyload\\Tests\\Unit\\": "tests/Unit",
|
24 |
+
"RocketLazyload\\Tests\\Integration\\": "tests/Integration"
|
25 |
+
}
|
26 |
+
},
|
27 |
+
"config": {
|
28 |
+
"sort-packages": true
|
29 |
+
},
|
30 |
+
"require": {
|
31 |
+
"php": ">=5.6"
|
32 |
+
},
|
33 |
+
"require-dev": {
|
34 |
+
"brain/monkey": "^2.0",
|
35 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
|
36 |
+
"doctrine/instantiator": "1.0.*",
|
37 |
+
"myclabs/deep-copy": "1.6.*",
|
38 |
+
"phpcompatibility/phpcompatibility-wp": "^2.0",
|
39 |
+
"phpdocumentor/reflection-docblock": "^3.3",
|
40 |
+
"phpunit/php-token-stream": "^1.4",
|
41 |
+
"phpunit/phpunit": "^5.7",
|
42 |
+
"symfony/yaml": "2.8.*",
|
43 |
+
"wp-coding-standards/wpcs": "^2.0.0"
|
44 |
+
},
|
45 |
+
"scripts": {
|
46 |
+
"test-unit":"\"vendor/bin/phpunit\" --testsuite unit --colors=always",
|
47 |
+
"test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist"
|
48 |
+
}
|
49 |
+
}
|
vendor/wp-media/rocket-lazyload-common/src/Assets.php
ADDED
@@ -0,0 +1,290 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handle the lazyload required assets: inline CSS and JS
|
4 |
+
*
|
5 |
+
* @package RocketLazyload
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace RocketLazyload;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class containing the methods to return or print the assets needed for lazyloading
|
12 |
+
*/
|
13 |
+
class Assets {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Inserts the lazyload script in the HTML
|
17 |
+
*
|
18 |
+
* @param array $args Array of arguments to populate the lazyload script tag.
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
public function insertLazyloadScript( $args = [] ) {
|
22 |
+
echo $this->getLazyloadScript( $args );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Gets the inline lazyload script configuration
|
27 |
+
*
|
28 |
+
* @param array $args Array of arguments to populate the lazyload script options.
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
public function getInlineLazyloadScript( $args = [] ) {
|
32 |
+
$defaults = [
|
33 |
+
'elements' => [
|
34 |
+
'img',
|
35 |
+
'iframe',
|
36 |
+
],
|
37 |
+
'threshold' => 300,
|
38 |
+
'options' => [],
|
39 |
+
];
|
40 |
+
|
41 |
+
$allowed_options = [
|
42 |
+
'container' => 1,
|
43 |
+
'thresholds' => 1,
|
44 |
+
'data_bg' => 1,
|
45 |
+
'class_error' => 1,
|
46 |
+
'cancel_on_exit' => 1,
|
47 |
+
'unobserve_completed' => 1,
|
48 |
+
'callback_enter' => 1,
|
49 |
+
'callback_exit' => 1,
|
50 |
+
'callback_loading' => 1,
|
51 |
+
'callback_error' => 1,
|
52 |
+
'callback_finish' => 1,
|
53 |
+
'use_native' => 1,
|
54 |
+
];
|
55 |
+
|
56 |
+
$args = wp_parse_args( $args, $defaults );
|
57 |
+
$script = '';
|
58 |
+
|
59 |
+
$args['options'] = array_intersect_key( $args['options'], $allowed_options );
|
60 |
+
|
61 |
+
$script .= 'window.lazyLoadOptions = {
|
62 |
+
elements_selector: "' . esc_attr( implode( ',', $args['elements'] ) ) . '",
|
63 |
+
data_src: "lazy-src",
|
64 |
+
data_srcset: "lazy-srcset",
|
65 |
+
data_sizes: "lazy-sizes",
|
66 |
+
class_loading: "lazyloading",
|
67 |
+
class_loaded: "lazyloaded",
|
68 |
+
threshold: ' . esc_attr( $args['threshold'] ) . ',
|
69 |
+
callback_loaded: function(element) {
|
70 |
+
if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) {
|
71 |
+
if (element.classList.contains("lazyloaded") ) {
|
72 |
+
if (typeof window.jQuery != "undefined") {
|
73 |
+
if (jQuery.fn.fitVids) {
|
74 |
+
jQuery(element).parent().fitVids();
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}';
|
80 |
+
|
81 |
+
if ( ! empty( $args['options'] ) ) {
|
82 |
+
$script .= ',' . PHP_EOL;
|
83 |
+
|
84 |
+
foreach ( $args['options'] as $option => $value ) {
|
85 |
+
$script .= $option . ': ' . $value . ',';
|
86 |
+
}
|
87 |
+
|
88 |
+
$script = rtrim( $script, ',' );
|
89 |
+
}
|
90 |
+
|
91 |
+
$script .= '};';
|
92 |
+
|
93 |
+
$script .= '
|
94 |
+
window.addEventListener(\'LazyLoad::Initialized\', function (e) {
|
95 |
+
var lazyLoadInstance = e.detail.instance;
|
96 |
+
|
97 |
+
if (window.MutationObserver) {
|
98 |
+
var observer = new MutationObserver(function(mutations) {
|
99 |
+
var image_count = 0;
|
100 |
+
var iframe_count = 0;
|
101 |
+
var rocketlazy_count = 0;
|
102 |
+
|
103 |
+
mutations.forEach(function(mutation) {
|
104 |
+
for (i = 0; i < mutation.addedNodes.length; i++) {
|
105 |
+
if (typeof mutation.addedNodes[i].getElementsByTagName !== \'function\') {
|
106 |
+
return;
|
107 |
+
}
|
108 |
+
|
109 |
+
if (typeof mutation.addedNodes[i].getElementsByClassName !== \'function\') {
|
110 |
+
return;
|
111 |
+
}
|
112 |
+
|
113 |
+
images = mutation.addedNodes[i].getElementsByTagName(\'img\');
|
114 |
+
is_image = mutation.addedNodes[i].tagName == "IMG";
|
115 |
+
iframes = mutation.addedNodes[i].getElementsByTagName(\'iframe\');
|
116 |
+
is_iframe = mutation.addedNodes[i].tagName == "IFRAME";
|
117 |
+
rocket_lazy = mutation.addedNodes[i].getElementsByClassName(\'rocket-lazyload\');
|
118 |
+
|
119 |
+
image_count += images.length;
|
120 |
+
iframe_count += iframes.length;
|
121 |
+
rocketlazy_count += rocket_lazy.length;
|
122 |
+
|
123 |
+
if(is_image){
|
124 |
+
image_count += 1;
|
125 |
+
}
|
126 |
+
|
127 |
+
if(is_iframe){
|
128 |
+
iframe_count += 1;
|
129 |
+
}
|
130 |
+
}
|
131 |
+
} );
|
132 |
+
|
133 |
+
if(image_count > 0 || iframe_count > 0 || rocketlazy_count > 0){
|
134 |
+
lazyLoadInstance.update();
|
135 |
+
}
|
136 |
+
} );
|
137 |
+
|
138 |
+
var b = document.getElementsByTagName("body")[0];
|
139 |
+
var config = { childList: true, subtree: true };
|
140 |
+
|
141 |
+
observer.observe(b, config);
|
142 |
+
}
|
143 |
+
}, false);';
|
144 |
+
|
145 |
+
return $script;
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Returns the lazyload inline script
|
150 |
+
*
|
151 |
+
* @param array $args Array of arguments to populate the lazyload script options.
|
152 |
+
* @return string
|
153 |
+
*/
|
154 |
+
public function getLazyloadScript( $args = [] ) {
|
155 |
+
$defaults = [
|
156 |
+
'base_url' => '',
|
157 |
+
'version' => '',
|
158 |
+
'polyfill' => false,
|
159 |
+
];
|
160 |
+
|
161 |
+
$args = wp_parse_args( $args, $defaults );
|
162 |
+
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
|
163 |
+
$script = '';
|
164 |
+
|
165 |
+
if ( isset( $args['polyfill'] ) && $args['polyfill'] ) {
|
166 |
+
$script .= '<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CIntersectionObserver%2CIntersectionObserverEntry"></script>';
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Filters the script tag for the lazyload script
|
171 |
+
*
|
172 |
+
* @since 2.2.6
|
173 |
+
*
|
174 |
+
* @param $script_tag HTML tag for the lazyload script.
|
175 |
+
*/
|
176 |
+
$script .= apply_filters( 'rocket_lazyload_script_tag', '<script data-no-minify="1" async src="' . $args['base_url'] . $args['version'] . '/lazyload' . $min . '.js"></script>' );
|
177 |
+
|
178 |
+
return $script;
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Inserts in the HTML the script to replace the Youtube thumbnail by the iframe.
|
183 |
+
*
|
184 |
+
* @param array $args Array of arguments to populate the script options.
|
185 |
+
* @return void
|
186 |
+
*/
|
187 |
+
public function insertYoutubeThumbnailScript( $args = [] ) {
|
188 |
+
echo $this->getYoutubeThumbnailScript( $args );
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Returns the Youtube Thumbnail inline script
|
193 |
+
*
|
194 |
+
* @param array $args Array of arguments to populate the script options.
|
195 |
+
* @return string
|
196 |
+
*/
|
197 |
+
public function getYoutubeThumbnailScript( $args = [] ) {
|
198 |
+
$defaults = [
|
199 |
+
'resolution' => 'hqdefault',
|
200 |
+
'lazy_image' => false,
|
201 |
+
];
|
202 |
+
|
203 |
+
$allowed_resolutions = [
|
204 |
+
'default' => [
|
205 |
+
'width' => 120,
|
206 |
+
'height' => 90,
|
207 |
+
],
|
208 |
+
'mqdefault' => [
|
209 |
+
'width' => 320,
|
210 |
+
'height' => 180,
|
211 |
+
],
|
212 |
+
'hqdefault' => [
|
213 |
+
'width' => 480,
|
214 |
+
'height' => 360,
|
215 |
+
],
|
216 |
+
'sddefault' => [
|
217 |
+
'width' => 640,
|
218 |
+
'height' => 480,
|
219 |
+
],
|
220 |
+
|
221 |
+
'maxresdefault' => [
|
222 |
+
'width' => 1280,
|
223 |
+
'height' => 720,
|
224 |
+
],
|
225 |
+
];
|
226 |
+
|
227 |
+
$args['resolution'] = ( isset( $args['resolution'] ) && isset( $allowed_resolutions[ $args['resolution'] ] ) ) ? $args['resolution'] : 'hqdefault';
|
228 |
+
|
229 |
+
$args = wp_parse_args( $args, $defaults );
|
230 |
+
|
231 |
+
$image = '<img src="https://i.ytimg.com/vi/ID/' . $args['resolution'] . '.jpg" alt="" width="' . $allowed_resolutions[ $args['resolution'] ]['width'] . '" height="' . $allowed_resolutions[ $args['resolution'] ]['height'] . '">';
|
232 |
+
|
233 |
+
if ( isset( $args['lazy_image'] ) && $args['lazy_image'] ) {
|
234 |
+
$image = '<img loading="lazy" data-lazy-src="https://i.ytimg.com/vi/ID/' . $args['resolution'] . '.jpg" alt="" width="' . $allowed_resolutions[ $args['resolution'] ]['width'] . '" height="' . $allowed_resolutions[ $args['resolution'] ]['height'] . '"><noscript><img src="https://i.ytimg.com/vi/ID/' . $args['resolution'] . '.jpg" alt="" width="' . $allowed_resolutions[ $args['resolution'] ]['width'] . '" height="' . $allowed_resolutions[ $args['resolution'] ]['height'] . '"></noscript>';
|
235 |
+
}
|
236 |
+
|
237 |
+
return "<script>function lazyLoadThumb(e){var t='{$image}',a='<div class=\"play\"></div>';return t.replace(\"ID\",e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement(\"iframe\"),t=\"ID?autoplay=1\";t+=0===this.dataset.query.length?'':'&'+this.dataset.query;e.setAttribute(\"src\",t.replace(\"ID\",this.dataset.src)),e.setAttribute(\"frameborder\",\"0\"),e.setAttribute(\"allowfullscreen\",\"1\"),e.setAttribute(\"allow\", \"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\"),this.parentNode.replaceChild(e,this)}document.addEventListener(\"DOMContentLoaded\",function(){var e,t,a=document.getElementsByClassName(\"rll-youtube-player\");for(t=0;t<a.length;t++)e=document.createElement(\"div\"),e.setAttribute(\"data-id\",a[t].dataset.id),e.setAttribute(\"data-query\", a[t].dataset.query),e.setAttribute(\"data-src\", a[t].dataset.src),e.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script>";
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Inserts the CSS to style the Youtube thumbnail container
|
242 |
+
*
|
243 |
+
* @param array $args Array of arguments to populate the CSS.
|
244 |
+
* @return void
|
245 |
+
*/
|
246 |
+
public function insertYoutubeThumbnailCSS( $args = [] ) {
|
247 |
+
wp_register_style( 'rocket-lazyload', false );
|
248 |
+
wp_enqueue_style( 'rocket-lazyload' );
|
249 |
+
wp_add_inline_style( 'rocket-lazyload', $this->getYoutubeThumbnailCSS( $args ) );
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Returns the CSS for the Youtube Thumbnail
|
254 |
+
*
|
255 |
+
* @param array $args Array of arguments to populate the CSS.
|
256 |
+
* @return string
|
257 |
+
*/
|
258 |
+
public function getYoutubeThumbnailCSS( $args = [] ) {
|
259 |
+
$defaults = [
|
260 |
+
'base_url' => '',
|
261 |
+
'responsive_embeds' => true,
|
262 |
+
];
|
263 |
+
|
264 |
+
$args = wp_parse_args( $args, $defaults );
|
265 |
+
|
266 |
+
$css = '.rll-youtube-player{position:relative;padding-bottom:56.23%;height:0;overflow:hidden;max-width:100%;}.rll-youtube-player iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;background:0 0}.rll-youtube-player img{bottom:0;display:block;left:0;margin:auto;max-width:100%;width:100%;position:absolute;right:0;top:0;border:none;height:auto;cursor:pointer;-webkit-transition:.4s all;-moz-transition:.4s all;transition:.4s all}.rll-youtube-player img:hover{-webkit-filter:brightness(75%)}.rll-youtube-player .play{height:72px;width:72px;left:50%;top:50%;margin-left:-36px;margin-top:-36px;position:absolute;background:url(' . $args['base_url'] . 'img/youtube.png) no-repeat;cursor:pointer}';
|
267 |
+
|
268 |
+
if ( $args['responsive_embeds'] ) {
|
269 |
+
$css .= '.wp-has-aspect-ratio .rll-youtube-player{position:absolute;padding-bottom:0;width:100%;height:100%;top:0;bottom:0;left:0;right:0}';
|
270 |
+
}
|
271 |
+
|
272 |
+
return $css;
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Inserts the CSS needed when Javascript is not enabled to keep the display correct
|
277 |
+
*/
|
278 |
+
public function insertNoJSCSS() {
|
279 |
+
echo $this->getNoJSCSS();
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Returns the CSS to correctly display images when JavaScript is disabled
|
284 |
+
*
|
285 |
+
* @return string
|
286 |
+
*/
|
287 |
+
public function getNoJSCSS() {
|
288 |
+
return '<noscript><style id="rocket-lazyload-nojs-css">.rll-youtube-player, [data-lazy-src]{display:none !important;}</style></noscript>';
|
289 |
+
}
|
290 |
+
}
|
vendor/wp-media/rocket-lazyload-common/src/Iframe.php
ADDED
@@ -0,0 +1,232 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles lazyloading of iframes
|
4 |
+
*
|
5 |
+
* @package RocketLazyload
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace RocketLazyload;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* A class to provide the methods needed to lazyload iframes in WP Rocket and Lazyload by WP Rocket
|
12 |
+
*/
|
13 |
+
class Iframe {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Finds iframes in the HTML provided and call the methods to lazyload them
|
17 |
+
*
|
18 |
+
* @param string $html Original HTML.
|
19 |
+
* @param string $buffer Content to parse.
|
20 |
+
* @param array $args Array of arguments to use.
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public function lazyloadIframes( $html, $buffer, $args = [] ) {
|
24 |
+
$defaults = [
|
25 |
+
'youtube' => false,
|
26 |
+
];
|
27 |
+
|
28 |
+
$args = wp_parse_args( $args, $defaults );
|
29 |
+
|
30 |
+
if ( ! preg_match_all( '@<iframe(?<atts>\s.+)>.*</iframe>@iUs', $buffer, $iframes, PREG_SET_ORDER ) ) {
|
31 |
+
return $html;
|
32 |
+
}
|
33 |
+
|
34 |
+
$iframes = array_unique( $iframes, SORT_REGULAR );
|
35 |
+
|
36 |
+
foreach ( $iframes as $iframe ) {
|
37 |
+
if ( $this->isIframeExcluded( $iframe ) ) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
|
41 |
+
// Given the previous regex pattern, $iframe['atts'] starts with a whitespace character.
|
42 |
+
if ( ! preg_match( '@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', $iframe['atts'], $atts ) ) {
|
43 |
+
continue;
|
44 |
+
}
|
45 |
+
|
46 |
+
$iframe['src'] = trim( $atts['src'] );
|
47 |
+
|
48 |
+
if ( '' === $iframe['src'] ) {
|
49 |
+
continue;
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( $args['youtube'] ) {
|
53 |
+
$iframe_lazyload = $this->replaceYoutubeThumbnail( $iframe );
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( empty( $iframe_lazyload ) ) {
|
57 |
+
$iframe_lazyload = $this->replaceIframe( $iframe );
|
58 |
+
}
|
59 |
+
|
60 |
+
$html = str_replace( $iframe[0], $iframe_lazyload, $html );
|
61 |
+
|
62 |
+
unset( $iframe_lazyload );
|
63 |
+
}
|
64 |
+
|
65 |
+
return $html;
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Checks if the provided iframe is excluded from lazyload
|
70 |
+
*
|
71 |
+
* @param array $iframe Array of matched patterns.
|
72 |
+
* @return boolean
|
73 |
+
*/
|
74 |
+
public function isIframeExcluded( $iframe ) {
|
75 |
+
|
76 |
+
foreach ( $this->getExcludedPatterns() as $excluded_pattern ) {
|
77 |
+
if ( strpos( $iframe[0], $excluded_pattern ) !== false ) {
|
78 |
+
return true;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Gets patterns excluded from lazyload for iframes
|
87 |
+
*
|
88 |
+
* @since 2.1.1
|
89 |
+
*
|
90 |
+
* @return array
|
91 |
+
*/
|
92 |
+
private function getExcludedPatterns() {
|
93 |
+
/**
|
94 |
+
* Filters the patterns excluded from lazyload for iframes
|
95 |
+
*
|
96 |
+
* @since 2.1.1
|
97 |
+
*
|
98 |
+
* @param array $excluded_patterns Array of excluded patterns.
|
99 |
+
*/
|
100 |
+
return apply_filters(
|
101 |
+
'rocket_lazyload_iframe_excluded_patterns',
|
102 |
+
[
|
103 |
+
'gform_ajax_frame',
|
104 |
+
'data-no-lazy=',
|
105 |
+
'recaptcha/api/fallback',
|
106 |
+
'loading="eager"',
|
107 |
+
'data-skip-lazy',
|
108 |
+
'skip-lazy',
|
109 |
+
]
|
110 |
+
);
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Applies lazyload on the iframe provided
|
115 |
+
*
|
116 |
+
* @param array $iframe Array of matched elements.
|
117 |
+
* @return string
|
118 |
+
*/
|
119 |
+
private function replaceIframe( $iframe ) {
|
120 |
+
/**
|
121 |
+
* Filter the LazyLoad placeholder on src attribute
|
122 |
+
*
|
123 |
+
* @since 1.0
|
124 |
+
*
|
125 |
+
* @param string $placeholder placeholder that will be printed.
|
126 |
+
*/
|
127 |
+
$placeholder = apply_filters( 'rocket_lazyload_placeholder', 'about:blank' );
|
128 |
+
|
129 |
+
$placeholder_atts = str_replace( $iframe['src'], $placeholder, $iframe['atts'] );
|
130 |
+
$iframe_lazyload = str_replace( $iframe['atts'], $placeholder_atts . ' data-rocket-lazyload="fitvidscompatible" data-lazy-src="' . esc_url( $iframe['src'] ) . '"', $iframe[0] );
|
131 |
+
|
132 |
+
if ( ! preg_match( '@\sloading\s*=\s*(\'|")(?:lazy|auto)\1@i', $iframe_lazyload ) ) {
|
133 |
+
$iframe_lazyload = str_replace( '<iframe', '<iframe loading="lazy"', $iframe_lazyload );
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Filter the LazyLoad HTML output on iframes
|
138 |
+
*
|
139 |
+
* @since 1.0
|
140 |
+
*
|
141 |
+
* @param array $html Output that will be printed.
|
142 |
+
*/
|
143 |
+
$iframe_lazyload = apply_filters( 'rocket_lazyload_iframe_html', $iframe_lazyload );
|
144 |
+
$iframe_lazyload .= '<noscript>' . $iframe[0] . '</noscript>';
|
145 |
+
|
146 |
+
return $iframe_lazyload;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Replaces the iframe provided by the Youtube thumbnail
|
151 |
+
*
|
152 |
+
* @param array $iframe Array of matched elements.
|
153 |
+
* @return bool|string
|
154 |
+
*/
|
155 |
+
private function replaceYoutubeThumbnail( $iframe ) {
|
156 |
+
$youtube_id = $this->getYoutubeIDFromURL( $iframe['src'] );
|
157 |
+
|
158 |
+
if ( ! $youtube_id ) {
|
159 |
+
return false;
|
160 |
+
}
|
161 |
+
|
162 |
+
$query = wp_parse_url( htmlspecialchars_decode( $iframe['src'] ), PHP_URL_QUERY );
|
163 |
+
|
164 |
+
$youtube_url = $this->changeYoutubeUrlForYoutuDotBe( $iframe['src'] );
|
165 |
+
$youtube_url = $this->cleanYoutubeUrl( $iframe['src'] );
|
166 |
+
/**
|
167 |
+
* Filter the LazyLoad HTML output on Youtube iframes
|
168 |
+
*
|
169 |
+
* @since 2.11
|
170 |
+
*
|
171 |
+
* @param array $html Output that will be printed.
|
172 |
+
*/
|
173 |
+
$youtube_lazyload = apply_filters( 'rocket_lazyload_youtube_html', '<div class="rll-youtube-player" data-src="' . esc_attr( $youtube_url ) . '" data-id="' . esc_attr( $youtube_id ) . '" data-query="' . esc_attr( $query ) . '"></div>' );
|
174 |
+
$youtube_lazyload .= '<noscript>' . $iframe[0] . '</noscript>';
|
175 |
+
|
176 |
+
return $youtube_lazyload;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Gets the Youtube ID from the URL provided
|
181 |
+
*
|
182 |
+
* @param string $url URL to search.
|
183 |
+
* @return bool|string
|
184 |
+
*/
|
185 |
+
public function getYoutubeIDFromURL( $url ) {
|
186 |
+
$pattern = '#^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be|youtube\.com|youtube-nocookie\.com)/(?:embed/|v/|watch/?\?v=)?([\w-]{11})#iU';
|
187 |
+
$result = preg_match( $pattern, $url, $matches );
|
188 |
+
|
189 |
+
if ( ! $result ) {
|
190 |
+
return false;
|
191 |
+
}
|
192 |
+
|
193 |
+
// exclude playlist.
|
194 |
+
if ( 'videoseries' === $matches[1] ) {
|
195 |
+
return false;
|
196 |
+
}
|
197 |
+
|
198 |
+
return $matches[1];
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Changes URL youtu.be/ID to youtube.com/embed/ID
|
203 |
+
*
|
204 |
+
* @param string $url URL to replace.
|
205 |
+
* @return string Unchanged URL or modified URL.
|
206 |
+
*/
|
207 |
+
public function changeYoutubeUrlForYoutuDotBe( $url ) {
|
208 |
+
$pattern = '#^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be)/(?:embed/|v/|watch/?\?v=)?([\w-]{11})#iU';
|
209 |
+
$result = preg_match( $pattern, $url, $matches );
|
210 |
+
|
211 |
+
if ( ! $result ) {
|
212 |
+
return $url;
|
213 |
+
}
|
214 |
+
|
215 |
+
return 'https://www.youtube.com/embed/' . $matches[1];
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Cleans Youtube URL. Keeps only scheme, host and path.
|
220 |
+
*
|
221 |
+
* @param string $url URL to be cleaned.
|
222 |
+
* @return string Cleaned URL
|
223 |
+
*/
|
224 |
+
public function cleanYoutubeUrl( $url ) {
|
225 |
+
$parsed_url = wp_parse_url( $url, -1 );
|
226 |
+
$scheme = isset( $parsed_url['scheme'] ) ? $parsed_url['scheme'] . '://' : '//';
|
227 |
+
$host = isset( $parsed_url['host'] ) ? $parsed_url['host'] : '';
|
228 |
+
$path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '';
|
229 |
+
|
230 |
+
return $scheme . $host . $path;
|
231 |
+
}
|
232 |
+
}
|
vendor/wp-media/rocket-lazyload-common/src/Image.php
ADDED
@@ -0,0 +1,602 @@
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Handles lazyloading of images
|
4 |
+
*
|
5 |
+
* @package RocketLazyload
|
6 |
+
*/
|
7 |
+
|
8 |
+
namespace RocketLazyload;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* A class to provide the methods needed to lazyload images in WP Rocket and Lazyload by WP Rocket
|
12 |
+
*/
|
13 |
+
class Image {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Finds the images to be lazyloaded and call the callback method to replace them.
|
17 |
+
*
|
18 |
+
* @param string $html Original HTML.
|
19 |
+
* @param string $buffer Content to parse.
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
public function lazyloadImages( $html, $buffer ) {
|
23 |
+
$clean_buffer = preg_replace( '/<script\b(?:[^>]*)>(?:.+)?<\/script>/Umsi', '', $html );
|
24 |
+
$clean_buffer = preg_replace( '#<noscript>(?:.+)</noscript>#Umsi', '', $clean_buffer );
|
25 |
+
if (! preg_match_all('#<img(?<atts>\s.+)\s?/?>#iUs', $clean_buffer, $images, PREG_SET_ORDER)) {
|
26 |
+
return $html;
|
27 |
+
}
|
28 |
+
|
29 |
+
$images = array_unique( $images, SORT_REGULAR );
|
30 |
+
|
31 |
+
foreach ( $images as $image ) {
|
32 |
+
$image = $this->canLazyload( $image );
|
33 |
+
|
34 |
+
if ( ! $image ) {
|
35 |
+
continue;
|
36 |
+
}
|
37 |
+
|
38 |
+
$image_lazyload = $this->replaceImage( $image );
|
39 |
+
$image_lazyload .= $this->noscript( $image[0] );
|
40 |
+
$html = str_replace( $image[0], $image_lazyload, $html );
|
41 |
+
|
42 |
+
unset( $image_lazyload );
|
43 |
+
}
|
44 |
+
|
45 |
+
return $html;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Applies lazyload on background images defined in style attributes
|
50 |
+
*
|
51 |
+
* @param string $html Original HTML.
|
52 |
+
* @param string $buffer Content to parse.
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function lazyloadBackgroundImages( $html, $buffer ) {
|
56 |
+
if ( ! preg_match_all( '#<(?<tag>div|figure|section|span|li|a)\s+(?<before>[^>]+[\'"\s])?style\s*=\s*([\'"])(?<styles>.*?)\3(?<after>[^>]*)>#is', $buffer, $elements, PREG_SET_ORDER ) ) {
|
57 |
+
return $html;
|
58 |
+
}
|
59 |
+
|
60 |
+
foreach ( $elements as $element ) {
|
61 |
+
if ( $this->isExcluded( $element['before'] . $element['after'], $this->getExcludedAttributes() ) ) {
|
62 |
+
continue;
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( ! preg_match( '#background-image\s*:\s*(?<attr>\s*url\s*\((?<url>[^)]+)\))\s*;?#is', $element['styles'], $url ) ) {
|
66 |
+
continue;
|
67 |
+
}
|
68 |
+
|
69 |
+
$url['url'] = esc_url(
|
70 |
+
trim(
|
71 |
+
strip_tags(
|
72 |
+
html_entity_decode(
|
73 |
+
$url['url'], ENT_QUOTES|ENT_HTML5
|
74 |
+
)
|
75 |
+
), '\'" '
|
76 |
+
)
|
77 |
+
);
|
78 |
+
|
79 |
+
if ( $this->isExcluded( $url['url'], $this->getExcludedSrc() ) ) {
|
80 |
+
continue;
|
81 |
+
}
|
82 |
+
|
83 |
+
$lazy_bg = $this->addLazyCLass( $element[0] );
|
84 |
+
$lazy_bg = str_replace( $url[0], '', $lazy_bg );
|
85 |
+
$lazy_bg = str_replace( '<' . $element['tag'], '<' . $element['tag'] . ' data-bg="' . esc_attr( $url['url'] ) . '"', $lazy_bg );
|
86 |
+
|
87 |
+
$html = str_replace( $element[0], $lazy_bg, $html );
|
88 |
+
unset( $lazy_bg );
|
89 |
+
}
|
90 |
+
|
91 |
+
return $html;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Add the identifier class to the element
|
96 |
+
*
|
97 |
+
* @param string $element Element to add the class to.
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
private function addLazyClass( $element ) {
|
101 |
+
$class = $this->getClasses( $element );
|
102 |
+
if ( empty( $class ) ) {
|
103 |
+
return preg_replace( '#<(img|div|figure|section|li|span|a)([^>]*)>#is', '<\1 class="rocket-lazyload"\2>', $element );
|
104 |
+
}
|
105 |
+
|
106 |
+
if ( empty( $class['attribute'] ) || empty( $class['classes'] ) ) {
|
107 |
+
return str_replace( $class['attribute'], 'class="rocket-lazyload"', $element );
|
108 |
+
}
|
109 |
+
|
110 |
+
$quotes = $this->getAttributeQuotes( $class['classes'] );
|
111 |
+
$classes = $this->trimOuterQuotes( $class['classes'], $quotes );
|
112 |
+
|
113 |
+
if ( empty( $classes ) ) {
|
114 |
+
return str_replace( $class['attribute'], 'class="rocket-lazyload"', $element );
|
115 |
+
}
|
116 |
+
|
117 |
+
$classes .= ' rocket-lazyload';
|
118 |
+
|
119 |
+
return str_replace(
|
120 |
+
$class['attribute'],
|
121 |
+
'class=' . $this->normalizeClasses( $classes, $quotes ),
|
122 |
+
$element
|
123 |
+
);
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Gets the attribute value's outer quotation mark, if one exists, i.e. " or '.
|
128 |
+
*
|
129 |
+
* @param string $attribute_value The target attribute's value.
|
130 |
+
*
|
131 |
+
* @return bool|string quotation character; else false when no quotation mark.
|
132 |
+
*/
|
133 |
+
private function getAttributeQuotes( $attribute_value ) {
|
134 |
+
$attribute_value = trim( $attribute_value );
|
135 |
+
$first_char = $attribute_value[0];
|
136 |
+
|
137 |
+
if ( '"' === $first_char || "'" === $first_char ) {
|
138 |
+
return $first_char;
|
139 |
+
}
|
140 |
+
|
141 |
+
return false;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Gets the class attribute and values from the given element, if it exists.
|
146 |
+
*
|
147 |
+
* @param string $element Given HTML element to extract classes from.
|
148 |
+
*
|
149 |
+
* @return bool|string[] {
|
150 |
+
* @type string $attribute Class attribute and value, e.g. class="value"
|
151 |
+
* @type string $classes String of class attribute's value(s)
|
152 |
+
* }; else, false when no class attribute exists.
|
153 |
+
*/
|
154 |
+
private function getClasses( $element ) {
|
155 |
+
if ( ! preg_match( '#class\s*=\s*(?<classes>["\'].*?["\']|[^\s]+)#is', $element, $class ) ) {
|
156 |
+
return false;
|
157 |
+
}
|
158 |
+
|
159 |
+
if ( empty( $class ) ) {
|
160 |
+
return false;
|
161 |
+
}
|
162 |
+
|
163 |
+
if ( ! isset( $class['classes'] ) ) {
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
|
167 |
+
return [
|
168 |
+
'attribute' => $class[0],
|
169 |
+
'classes' => $class['classes'],
|
170 |
+
];
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Removes outer single or double quotations.
|
175 |
+
*
|
176 |
+
* @param string $string String to strip quotes from.
|
177 |
+
* @param string $quotes The outer quotes to remove.
|
178 |
+
*
|
179 |
+
* @return string string without quotes.
|
180 |
+
*/
|
181 |
+
private function trimOuterQuotes( $string, $quotes ) {
|
182 |
+
$string = trim( $string );
|
183 |
+
if ( empty( $string ) ) {
|
184 |
+
return '';
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( empty( $quotes ) ) {
|
188 |
+
return $string;
|
189 |
+
}
|
190 |
+
|
191 |
+
$string = ltrim( $string, $quotes );
|
192 |
+
$string = rtrim( $string, $quotes );
|
193 |
+
return trim( $string );
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Normalizes the class attribute values to ensure well-formed.
|
198 |
+
*
|
199 |
+
* @param string $classes String of class attribute value(s).
|
200 |
+
* @param string|bool $quotes Optional. Quotation mark to wrap around the classes.
|
201 |
+
*
|
202 |
+
* @return string well-formed class attributes.
|
203 |
+
*/
|
204 |
+
private function normalizeClasses( $classes, $quotes = '"' ) {
|
205 |
+
$array_of_classes = $this->stringToArray( $classes );
|
206 |
+
$classes = implode( ' ', $array_of_classes );
|
207 |
+
|
208 |
+
if ( false === $quotes ) {
|
209 |
+
$quotes = '"';
|
210 |
+
}
|
211 |
+
|
212 |
+
return $quotes . $classes . $quotes;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Converts the given string into an array of strings.
|
217 |
+
*
|
218 |
+
* Note:
|
219 |
+
* 1. Removes empties.
|
220 |
+
* 2. Trims each string.
|
221 |
+
*
|
222 |
+
* @param string $string The target string to convert.
|
223 |
+
* @param string $delimiter Optional. Default: ' ' empty string.
|
224 |
+
*
|
225 |
+
* @return array An array of trimmed strings.
|
226 |
+
*/
|
227 |
+
private function stringToArray( $string, $delimiter = ' ' ) {
|
228 |
+
if ( empty( $string ) ) {
|
229 |
+
return [];
|
230 |
+
}
|
231 |
+
|
232 |
+
$array = explode( $delimiter, $string );
|
233 |
+
$array = array_map('trim', $array );
|
234 |
+
|
235 |
+
// Remove empties.
|
236 |
+
return array_filter( $array );
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Applies lazyload on picture elements found in the HTML.
|
241 |
+
*
|
242 |
+
* @param string $html Original HTML.
|
243 |
+
* @param string $buffer Content to parse.
|
244 |
+
* @return string
|
245 |
+
*/
|
246 |
+
public function lazyloadPictures( $html, $buffer ) {
|
247 |
+
if ( ! preg_match_all( '#<picture(?:.*)?>(?<sources>.*)</picture>#iUs', $buffer, $pictures, PREG_SET_ORDER ) ) {
|
248 |
+
return $html;
|
249 |
+
}
|
250 |
+
|
251 |
+
$pictures = array_unique( $pictures, SORT_REGULAR );
|
252 |
+
$excluded = array_merge( $this->getExcludedAttributes(), $this->getExcludedSrc() );
|
253 |
+
|
254 |
+
foreach ( $pictures as $picture ) {
|
255 |
+
if ( $this->isExcluded( $picture[0], $excluded ) ) {
|
256 |
+
continue;
|
257 |
+
}
|
258 |
+
|
259 |
+
if ( preg_match_all( '#<source(?<atts>\s.+)>#iUs', $picture['sources'], $sources, PREG_SET_ORDER ) ) {
|
260 |
+
$sources = array_unique( $sources, SORT_REGULAR );
|
261 |
+
|
262 |
+
$lazy_sources = 0;
|
263 |
+
|
264 |
+
foreach ( $sources as $source ) {
|
265 |
+
$lazyload_srcset = preg_replace( '/([\s"\'])srcset/i', '\1data-lazy-srcset', $source[0] );
|
266 |
+
$html = str_replace( $source[0], $lazyload_srcset, $html );
|
267 |
+
|
268 |
+
unset( $lazyload_srcset );
|
269 |
+
$lazy_sources++;
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
if ( 0 === $lazy_sources ) {
|
274 |
+
continue;
|
275 |
+
}
|
276 |
+
|
277 |
+
if ( ! preg_match( '#<img(?<atts>\s.+)\s?/?>#iUs', $picture[0], $img ) ) {
|
278 |
+
continue;
|
279 |
+
}
|
280 |
+
|
281 |
+
$img = $this->canLazyload( $img );
|
282 |
+
|
283 |
+
if ( ! $img ) {
|
284 |
+
continue;
|
285 |
+
}
|
286 |
+
|
287 |
+
$img_lazy = $this->replaceImage( $img );
|
288 |
+
$img_lazy .= $this->noscript( $img[0] );
|
289 |
+
$safe_img = str_replace('/', '\/', preg_quote( $img[0], '#' ));
|
290 |
+
$html = preg_replace( '#<noscript[^>]*>.*' . $safe_img . '.*<\/noscript>(*SKIP)(*FAIL)|' . $safe_img . '#iU', $img_lazy, $html );
|
291 |
+
|
292 |
+
unset( $img_lazy );
|
293 |
+
}
|
294 |
+
|
295 |
+
return $html;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Checks if the image can be lazyloaded
|
300 |
+
*
|
301 |
+
* @param Array $image Array of image data coming from Regex.
|
302 |
+
* @return bool|Array
|
303 |
+
*/
|
304 |
+
private function canLazyload( $image ) {
|
305 |
+
if ( $this->isExcluded( $image['atts'], $this->getExcludedAttributes() ) ) {
|
306 |
+
return false;
|
307 |
+
}
|
308 |
+
|
309 |
+
// Given the previous regex pattern, $image['atts'] starts with a whitespace character.
|
310 |
+
if ( ! preg_match( '@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', $image['atts'], $atts ) ) {
|
311 |
+
return false;
|
312 |
+
}
|
313 |
+
|
314 |
+
$image['src'] = trim( $atts['src'] );
|
315 |
+
|
316 |
+
if ( '' === $image['src'] ) {
|
317 |
+
return false;
|
318 |
+
}
|
319 |
+
|
320 |
+
if ( $this->isExcluded( $image['src'], $this->getExcludedSrc() ) ) {
|
321 |
+
return false;
|
322 |
+
}
|
323 |
+
|
324 |
+
// Don't apply LazyLoad on images from WP Retina x2.
|
325 |
+
if ( function_exists( 'wr2x_picture_rewrite' ) ) {
|
326 |
+
if ( wr2x_get_retina( trailingslashit( ABSPATH ) . wr2x_get_pathinfo_from_image_src( trim( $image['src'], '"' ) ) ) ) {
|
327 |
+
return false;
|
328 |
+
}
|
329 |
+
}
|
330 |
+
|
331 |
+
return $image;
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Checks if the provided string matches with the provided excluded patterns
|
336 |
+
*
|
337 |
+
* @param string $string String to check.
|
338 |
+
* @param array $excluded_values Patterns to match against.
|
339 |
+
* @return boolean
|
340 |
+
*/
|
341 |
+
public function isExcluded( $string, $excluded_values ) {
|
342 |
+
if ( ! is_array( $excluded_values ) ) {
|
343 |
+
(array) $excluded_values;
|
344 |
+
}
|
345 |
+
|
346 |
+
if ( empty( $excluded_values ) ) {
|
347 |
+
return false;
|
348 |
+
}
|
349 |
+
|
350 |
+
foreach ( $excluded_values as $excluded_value ) {
|
351 |
+
if ( strpos( $string, $excluded_value ) !== false ) {
|
352 |
+
return true;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
return false;
|
357 |
+
}
|
358 |
+
|
359 |
+
/**
|
360 |
+
* Returns the list of excluded attributes
|
361 |
+
*
|
362 |
+
* @return array
|
363 |
+
*/
|
364 |
+
public function getExcludedAttributes() {
|
365 |
+
/**
|
366 |
+
* Filters the attributes used to prevent lazylad from being applied
|
367 |
+
*
|
368 |
+
* @since 1.0
|
369 |
+
* @author Remy Perona
|
370 |
+
*
|
371 |
+
* @param array $excluded_attributes An array of excluded attributes.
|
372 |
+
*/
|
373 |
+
return apply_filters(
|
374 |
+
'rocket_lazyload_excluded_attributes',
|
375 |
+
[
|
376 |
+
'data-src=',
|
377 |
+
'data-no-lazy=',
|
378 |
+
'data-lazy-original=',
|
379 |
+
'data-lazy-src=',
|
380 |
+
'data-lazysrc=',
|
381 |
+
'data-lazyload=',
|
382 |
+
'data-bgposition=',
|
383 |
+
'data-envira-src=',
|
384 |
+
'fullurl=',
|
385 |
+
'lazy-slider-img=',
|
386 |
+
'data-srcset=',
|
387 |
+
'class="ls-l',
|
388 |
+
'class="ls-bg',
|
389 |
+
'soliloquy-image',
|
390 |
+
'loading="eager"',
|
391 |
+
'swatch-img',
|
392 |
+
'data-height-percentage',
|
393 |
+
'data-large_image',
|
394 |
+
'avia-bg-style-fixed',
|
395 |
+
'data-skip-lazy',
|
396 |
+
'skip-lazy',
|
397 |
+
]
|
398 |
+
);
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Returns the list of excluded src
|
403 |
+
*
|
404 |
+
* @return array
|
405 |
+
*/
|
406 |
+
public function getExcludedSrc() {
|
407 |
+
/**
|
408 |
+
* Filters the src used to prevent lazylad from being applied
|
409 |
+
*
|
410 |
+
* @since 1.0
|
411 |
+
* @author Remy Perona
|
412 |
+
*
|
413 |
+
* @param array $excluded_src An array of excluded src.
|
414 |
+
*/
|
415 |
+
return apply_filters(
|
416 |
+
'rocket_lazyload_excluded_src',
|
417 |
+
[
|
418 |
+
'/wpcf7_captcha/',
|
419 |
+
'timthumb.php?src',
|
420 |
+
'woocommerce/assets/images/placeholder.png',
|
421 |
+
]
|
422 |
+
);
|
423 |
+
}
|
424 |
+
|
425 |
+
/**
|
426 |
+
* Replaces the original image by the lazyload one
|
427 |
+
*
|
428 |
+
* @param array $image Array of matches elements.
|
429 |
+
* @return string
|
430 |
+
*/
|
431 |
+
private function replaceImage( $image ) {
|
432 |
+
$width = 0;
|
433 |
+
$height = 0;
|
434 |
+
|
435 |
+
if ( preg_match( '@[\s"\']width\s*=\s*(\'|")(?<width>.*)\1@iUs', $image['atts'], $atts ) ) {
|
436 |
+
$width = absint( $atts['width'] );
|
437 |
+
}
|
438 |
+
|
439 |
+
if ( preg_match( '@[\s"\']height\s*=\s*(\'|")(?<height>.*)\1@iUs', $image['atts'], $atts ) ) {
|
440 |
+
$height = absint( $atts['height'] );
|
441 |
+
}
|
442 |
+
|
443 |
+
$placeholder_atts = preg_replace( '@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', ' src="' . $this->getPlaceholder( $width, $height ) . '"', $image['atts'] );
|
444 |
+
|
445 |
+
$image_lazyload = str_replace( $image['atts'], $placeholder_atts . ' data-lazy-src="' . $image['src'] . '"', $image[0] );
|
446 |
+
|
447 |
+
if ( ! preg_match( '@\sloading\s*=\s*(\'|")(?:lazy|auto)\1@i', $image_lazyload ) && apply_filters( 'rocket_use_native_lazyload', false ) ) {
|
448 |
+
$image_lazyload = str_replace( '<img', '<img loading="lazy"', $image_lazyload );
|
449 |
+
}
|
450 |
+
|
451 |
+
/**
|
452 |
+
* Filter the LazyLoad HTML output
|
453 |
+
*
|
454 |
+
* @since 1.0
|
455 |
+
*
|
456 |
+
* @param string $html Output that will be printed
|
457 |
+
*/
|
458 |
+
$image_lazyload = apply_filters( 'rocket_lazyload_html', $image_lazyload );
|
459 |
+
|
460 |
+
return $image_lazyload;
|
461 |
+
}
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Returns the HTML tag wrapped inside noscript tags
|
465 |
+
*
|
466 |
+
* @param string $element Element to wrap.
|
467 |
+
* @return string
|
468 |
+
*/
|
469 |
+
private function noscript( $element ) {
|
470 |
+
return '<noscript>' . $element . '</noscript>';
|
471 |
+
}
|
472 |
+
|
473 |
+
/**
|
474 |
+
* Applies lazyload on srcset and sizes attributes
|
475 |
+
*
|
476 |
+
* @param string $html HTML image tag.
|
477 |
+
* @return string
|
478 |
+
*/
|
479 |
+
public function lazyloadResponsiveAttributes( $html ) {
|
480 |
+
$html = preg_replace( '/[\s|"|\'](srcset)\s*=\s*("|\')([^"|\']+)\2/i', ' data-lazy-$1=$2$3$2', $html );
|
481 |
+
$html = preg_replace( '/[\s|"|\'](sizes)\s*=\s*("|\')([^"|\']+)\2/i', ' data-lazy-$1=$2$3$2', $html );
|
482 |
+
|
483 |
+
return $html;
|
484 |
+
}
|
485 |
+
|
486 |
+
/**
|
487 |
+
* Finds patterns matching smiley and call the callback method to replace them with the image
|
488 |
+
*
|
489 |
+
* @param string $text Content to search in.
|
490 |
+
* @return string
|
491 |
+
*/
|
492 |
+
public function convertSmilies( $text ) {
|
493 |
+
global $wp_smiliessearch;
|
494 |
+
|
495 |
+
if ( ! get_option( 'use_smilies' ) || empty( $wp_smiliessearch ) ) {
|
496 |
+
return $text;
|
497 |
+
}
|
498 |
+
|
499 |
+
$output = '';
|
500 |
+
// HTML loop taken from texturize function, could possible be consolidated.
|
501 |
+
$textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // capture the tags as well as in between.
|
502 |
+
$stop = count( $textarr );// loop stuff.
|
503 |
+
|
504 |
+
// Ignore proessing of specific tags.
|
505 |
+
$tags_to_ignore = 'code|pre|style|script|textarea';
|
506 |
+
$ignore_block_element = '';
|
507 |
+
|
508 |
+
for ( $i = 0; $i < $stop; $i++ ) {
|
509 |
+
$content = $textarr[ $i ];
|
510 |
+
|
511 |
+
// If we're in an ignore block, wait until we find its closing tag.
|
512 |
+
if ( '' === $ignore_block_element && preg_match( '/^<(' . $tags_to_ignore . ')>/', $content, $matches ) ) {
|
513 |
+
$ignore_block_element = $matches[1];
|
514 |
+
}
|
515 |
+
|
516 |
+
// If it's not a tag and not in ignore block.
|
517 |
+
if ( '' === $ignore_block_element && strlen( $content ) > 0 && '<' !== $content[0] ) {
|
518 |
+
$content = preg_replace_callback( $wp_smiliessearch, [ $this, 'translateSmiley' ], $content );
|
519 |
+
}
|
520 |
+
|
521 |
+
// did we exit ignore block.
|
522 |
+
if ( '' !== $ignore_block_element && '</' . $ignore_block_element . '>' === $content ) {
|
523 |
+
$ignore_block_element = '';
|
524 |
+
}
|
525 |
+
|
526 |
+
$output .= $content;
|
527 |
+
}
|
528 |
+
|
529 |
+
return $output;
|
530 |
+
}
|
531 |
+
|
532 |
+
/**
|
533 |
+
* Replace matches by smiley image, lazyloaded
|
534 |
+
*
|
535 |
+
* @param array $matches Array of matches.
|
536 |
+
* @return string
|
537 |
+
*/
|
538 |
+
private function translateSmiley( $matches ) {
|
539 |
+
global $wpsmiliestrans;
|
540 |
+
|
541 |
+
if ( count( $matches ) === 0 ) {
|
542 |
+
return '';
|
543 |
+
}
|
544 |
+
|
545 |
+
$smiley = trim( reset( $matches ) );
|
546 |
+
$img = $wpsmiliestrans[ $smiley ];
|
547 |
+
|
548 |
+
$matches = [];
|
549 |
+
$ext = preg_match( '/\.([^.]+)$/', $img, $matches ) ? strtolower( $matches[1] ) : false;
|
550 |
+
$image_exts = [ 'jpg', 'jpeg', 'jpe', 'gif', 'png' ];
|
551 |
+
|
552 |
+
// Don't convert smilies that aren't images - they're probably emoji.
|
553 |
+
if ( ! in_array( $ext, $image_exts, true ) ) {
|
554 |
+
return $img;
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
* Filter the Smiley image URL before it's used in the image element.
|
559 |
+
*
|
560 |
+
* @since 2.9.0
|
561 |
+
*
|
562 |
+
* @param string $smiley_url URL for the smiley image.
|
563 |
+
* @param string $img Filename for the smiley image.
|
564 |
+
* @param string $site_url Site URL, as returned by site_url().
|
565 |
+
*/
|
566 |
+
$src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
|
567 |
+
|
568 |
+
// Don't LazyLoad if process is stopped for these reasons.
|
569 |
+
if ( is_feed() || is_preview() ) {
|
570 |
+
return sprintf( ' <img src="%s" alt="%s" class="wp-smiley" /> ', esc_url( $src_url ), esc_attr( $smiley ) );
|
571 |
+
}
|
572 |
+
|
573 |
+
return sprintf( ' <img src="%s" data-lazy-src="%s" alt="%s" class="wp-smiley" /> ', $this->getPlaceholder(), esc_url( $src_url ), esc_attr( $smiley ) );
|
574 |
+
}
|
575 |
+
|
576 |
+
/**
|
577 |
+
* Returns the placeholder for the src attribute
|
578 |
+
*
|
579 |
+
* @since 1.2
|
580 |
+
* @author Remy Perona
|
581 |
+
*
|
582 |
+
* @param int $width Width of the placeholder image. Default 0.
|
583 |
+
* @param int $height Height of the placeholder image. Default 0.
|
584 |
+
* @return string
|
585 |
+
*/
|
586 |
+
public function getPlaceholder( $width = 0, $height = 0 ) {
|
587 |
+
$width = 0 === $width ? 0 : absint( $width );
|
588 |
+
$height = 0 === $height ? 0 : absint( $height );
|
589 |
+
|
590 |
+
$placeholder = str_replace( ' ', '%20', "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $width $height'%3E%3C/svg%3E" );
|
591 |
+
/**
|
592 |
+
* Filter the image lazyLoad placeholder on src attribute
|
593 |
+
*
|
594 |
+
* @since 1.1
|
595 |
+
*
|
596 |
+
* @param string $placeholder Placeholder that will be printed.
|
597 |
+
* @param int $width Placeholder width.
|
598 |
+
* @param int $height Placeholder height.
|
599 |
+
*/
|
600 |
+
return apply_filters( 'rocket_lazyload_placeholder', $placeholder, $width, $height );
|
601 |
+
}
|
602 |
+
}
|