Lazy Load by WP Rocket - Version 2.3.1

Version Description

Bugfix: Prevent a conflict with WP Rocket Bugfix: apply loading="lazy" on Youtube thumbnail Bugfix: Add autoplay attribute on iframe loaded with Youtube thumbnail

Download this release

Release Info

Developer wp_media
Plugin Icon 128x128 Lazy Load by WP Rocket
Version 2.3.1
Comparing to
See all releases

Code changes from version 2.3 to 2.3.1

Files changed (65) hide show
  1. composer.json +74 -53
  2. composer.lock +2695 -2266
  3. readme.txt +304 -299
  4. rocket-lazy-load.php +78 -78
  5. src/Admin/AdminPage.php +176 -176
  6. src/Admin/ImagifyNotice.php +72 -72
  7. src/Dependencies/Interop/Container/ContainerInterface.php +15 -0
  8. src/Dependencies/Interop/Container/Exception/ContainerException.php +15 -0
  9. src/Dependencies/Interop/Container/Exception/NotFoundException.php +15 -0
  10. src/Dependencies/League/Container/Argument/ArgumentResolverInterface.php +26 -0
  11. src/Dependencies/League/Container/Argument/ArgumentResolverTrait.php +82 -0
  12. src/Dependencies/League/Container/Argument/RawArgument.php +27 -0
  13. src/Dependencies/League/Container/Argument/RawArgumentInterface.php +13 -0
  14. src/Dependencies/League/Container/Container.php +305 -0
  15. src/Dependencies/League/Container/ContainerAwareInterface.php +20 -0
  16. src/Dependencies/League/Container/ContainerAwareTrait.php +34 -0
  17. src/Dependencies/League/Container/ContainerInterface.php +59 -0
  18. src/Dependencies/League/Container/Definition/AbstractDefinition.php +62 -0
  19. src/Dependencies/League/Container/Definition/CallableDefinition.php +23 -0
  20. src/Dependencies/League/Container/Definition/ClassDefinition.php +67 -0
  21. src/Dependencies/League/Container/Definition/ClassDefinitionInterface.php +23 -0
  22. src/Dependencies/League/Container/Definition/DefinitionFactory.php +28 -0
  23. src/Dependencies/League/Container/Definition/DefinitionFactoryInterface.php +17 -0
  24. src/Dependencies/League/Container/Definition/DefinitionInterface.php +30 -0
  25. src/Dependencies/League/Container/Exception/NotFoundException.php +10 -0
  26. src/Dependencies/League/Container/ImmutableContainerAwareInterface.php +22 -0
  27. src/Dependencies/League/Container/ImmutableContainerAwareTrait.php +36 -0
  28. src/Dependencies/League/Container/ImmutableContainerInterface.php +10 -0
  29. src/Dependencies/League/Container/Inflector/Inflector.php +103 -0
  30. src/Dependencies/League/Container/Inflector/InflectorAggregate.php +53 -0
  31. src/Dependencies/League/Container/Inflector/InflectorAggregateInterface.php +25 -0
  32. src/Dependencies/League/Container/ReflectionContainer.php +87 -0
  33. src/Dependencies/League/Container/ServiceProvider/AbstractServiceProvider.php +27 -0
  34. src/Dependencies/League/Container/ServiceProvider/AbstractSignatureServiceProvider.php +31 -0
  35. src/Dependencies/League/Container/ServiceProvider/BootableServiceProviderInterface.php +14 -0
  36. src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregate.php +88 -0
  37. src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregateInterface.php +32 -0
  38. src/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php +26 -0
  39. src/Dependencies/League/Container/ServiceProvider/SignatureServiceProviderInterface.php +24 -0
  40. src/Dependencies/Psr/Container/ContainerExceptionInterface.php +13 -0
  41. src/Dependencies/Psr/Container/ContainerInterface.php +37 -0
  42. src/Dependencies/Psr/Container/NotFoundExceptionInterface.php +13 -0
  43. src/Dependencies/RocketLazyload/Assets.php +299 -0
  44. src/Dependencies/RocketLazyload/Iframe.php +202 -0
  45. src/Dependencies/RocketLazyload/Image.php +474 -0
  46. src/EventManagement/EventManager.php +145 -145
  47. src/EventManagement/EventManagerAwareSubscriberInterface.php +21 -21
  48. src/EventManagement/SubscriberInterface.php +39 -39
  49. src/Options/AbstractOptions.php +69 -69
  50. src/Options/OptionArray.php +111 -111
  51. src/Options/Options.php +106 -106
  52. src/Plugin.php +97 -97
  53. src/ServiceProvider/AdminServiceProvider.php +47 -47
  54. src/ServiceProvider/ImagifyNoticeServiceProvider.php +45 -45
  55. src/ServiceProvider/LazyloadServiceProvider.php +48 -48
  56. src/ServiceProvider/OptionServiceProvider.php +45 -45
  57. src/ServiceProvider/SubscribersServiceProvider.php +60 -60
  58. src/Subscriber/AdminPageSubscriber.php +142 -142
  59. src/Subscriber/ImagifyNoticeSubscriber.php +152 -152
  60. src/Subscriber/LazyloadSubscriber.php +429 -429
  61. src/Subscriber/ThirdParty/AMPSubscriber.php +73 -73
  62. src/rocket-lazyload-requirements-check.php +143 -143
  63. vendor/composer/ClassLoader.php +4 -4
  64. vendor/composer/installed.json +121 -121
  65. vendor/wp-media/rocket-lazyload-common/src/Assets.php +2 -2
composer.json CHANGED
@@ -1,53 +1,74 @@
1
- {
2
- "name": "wp-media/rocket-lazy-load",
3
- "description": "Lazy Load images and iframes without jQuery",
4
- "keywords": [
5
- "wordpress",
6
- "lazyload"
7
- ],
8
- "homepage": "https://github.com/wp-media/rocket-lazy-load",
9
- "license": "GPL-2.0+",
10
- "authors": [
11
- {
12
- "name": "WP Media",
13
- "email": "contact@wp-media.me",
14
- "homepage": "https://wp-media.me"
15
- }
16
- ],
17
- "type": "wordpress-plugin",
18
- "config": {
19
- "sort-packages": true
20
- },
21
- "support": {
22
- "issues": "https://github.com/wp-media/rocket-lazy-load/issues",
23
- "source": "https://github.com/wp-media/rocket-lazy-load"
24
- },
25
- "autoload": {
26
- "psr-4": {
27
- "RocketLazyLoadPlugin\\": "src/"
28
- }
29
- },
30
- "autoload-dev": {
31
- "psr-4": {
32
- "RocketLazyLoadPlugin\\Tests\\Unit\\": "tests/Unit",
33
- "RocketLazyLoadPlugin\\Tests\\Integration\\": "tests/Integration"
34
- }
35
- },
36
- "require": {
37
- "php": ">=5.6",
38
- "composer/installers": "~1.0",
39
- "league/container": "^2.4",
40
- "wp-media/rocket-lazyload-common": "^2.0"
41
- },
42
- "require-dev": {
43
- "brain/monkey": "^2.0",
44
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
45
- "phpcompatibility/phpcompatibility-wp": "^2.0",
46
- "phpunit/phpunit": "^5.7",
47
- "wp-coding-standards/wpcs": "^2.0.0"
48
- },
49
- "scripts": {
50
- "test-unit":"\"vendor/bin/phpunit\" --testsuite unit --colors=always",
51
- "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist"
52
- }
53
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "wp-media/rocket-lazy-load",
3
+ "description": "Lazy Load images and iframes without jQuery",
4
+ "keywords": [
5
+ "wordpress",
6
+ "lazyload"
7
+ ],
8
+ "homepage": "https://github.com/wp-media/rocket-lazy-load",
9
+ "license": "GPL-2.0+",
10
+ "authors": [
11
+ {
12
+ "name": "WP Media",
13
+ "email": "contact@wp-media.me",
14
+ "homepage": "https://wp-media.me"
15
+ }
16
+ ],
17
+ "type": "wordpress-plugin",
18
+ "config": {
19
+ "sort-packages": true
20
+ },
21
+ "support": {
22
+ "issues": "https://github.com/wp-media/rocket-lazy-load/issues",
23
+ "source": "https://github.com/wp-media/rocket-lazy-load"
24
+ },
25
+ "autoload": {
26
+ "psr-4": {
27
+ "RocketLazyLoadPlugin\\": "src/"
28
+ }
29
+ },
30
+ "autoload-dev": {
31
+ "psr-4": {
32
+ "RocketLazyLoadPlugin\\Tests\\Unit\\": "tests/Unit",
33
+ "RocketLazyLoadPlugin\\Tests\\Integration\\": "tests/Integration"
34
+ }
35
+ },
36
+ "require": {
37
+ "php": ">=5.6",
38
+ "composer/installers": "~1.0",
39
+ "league/container": "^2.4",
40
+ "wp-media/rocket-lazyload-common": "^2.0"
41
+ },
42
+ "require-dev": {
43
+ "brain/monkey": "^2.0",
44
+ "coenjacobs/mozart": "^0.4.0",
45
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
46
+ "phpcompatibility/phpcompatibility-wp": "^2.0",
47
+ "phpunit/phpunit": "^5.7",
48
+ "wp-coding-standards/wpcs": "^2.0.0"
49
+ },
50
+ "extra": {
51
+ "mozart": {
52
+ "dep_namespace": "RocketLazyLoadPlugin\\Dependencies\\",
53
+ "dep_directory": "/src/Dependencies/",
54
+ "classmap_directory": "/classes/dependencies/",
55
+ "classmap_prefix": "RLLP_",
56
+ "packages": [
57
+ "wp-media/rocket-lazyload-common",
58
+ "league/container"
59
+ ]
60
+ }
61
+ },
62
+ "scripts": {
63
+ "test-unit":"\"vendor/bin/phpunit\" --testsuite unit --colors=always",
64
+ "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist",
65
+ "post-install-cmd": [
66
+ "\"vendor/bin/mozart\" compose",
67
+ "composer dump-autoload"
68
+ ],
69
+ "post-update-cmd": [
70
+ "\"vendor/bin/mozart\" compose",
71
+ "composer dump-autoload"
72
+ ]
73
+ }
74
+ }
composer.lock CHANGED
@@ -1,2266 +1,2695 @@
1
- {
2
- "_readme": [
3
- "This file locks the dependencies of your project to a known state",
4
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
- "This file is @generated automatically"
6
- ],
7
- "content-hash": "9db7cd490e083b535102328bf887817d",
8
- "packages": [
9
- {
10
- "name": "composer/installers",
11
- "version": "v1.7.0",
12
- "source": {
13
- "type": "git",
14
- "url": "https://github.com/composer/installers.git",
15
- "reference": "141b272484481432cda342727a427dc1e206bfa0"
16
- },
17
- "dist": {
18
- "type": "zip",
19
- "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
20
- "reference": "141b272484481432cda342727a427dc1e206bfa0",
21
- "shasum": ""
22
- },
23
- "require": {
24
- "composer-plugin-api": "^1.0"
25
- },
26
- "replace": {
27
- "roundcube/plugin-installer": "*",
28
- "shama/baton": "*"
29
- },
30
- "require-dev": {
31
- "composer/composer": "1.0.*@dev",
32
- "phpunit/phpunit": "^4.8.36"
33
- },
34
- "type": "composer-plugin",
35
- "extra": {
36
- "class": "Composer\\Installers\\Plugin",
37
- "branch-alias": {
38
- "dev-master": "1.0-dev"
39
- }
40
- },
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
- "Mautic",
69
- "Maya",
70
- "OXID",
71
- "Plentymarkets",
72
- "Porto",
73
- "RadPHP",
74
- "SMF",
75
- "Thelia",
76
- "Whmcs",
77
- "WolfCMS",
78
- "agl",
79
- "aimeos",
80
- "annotatecms",
81
- "attogram",
82
- "bitrix",
83
- "cakephp",
84
- "chef",
85
- "cockpit",
86
- "codeigniter",
87
- "concrete5",
88
- "croogo",
89
- "dokuwiki",
90
- "drupal",
91
- "eZ Platform",
92
- "elgg",
93
- "expressionengine",
94
- "fuelphp",
95
- "grav",
96
- "installer",
97
- "itop",
98
- "joomla",
99
- "known",
100
- "kohana",
101
- "laravel",
102
- "lavalite",
103
- "lithium",
104
- "magento",
105
- "majima",
106
- "mako",
107
- "mediawiki",
108
- "modulework",
109
- "modx",
110
- "moodle",
111
- "osclass",
112
- "phpbb",
113
- "piwik",
114
- "ppi",
115
- "puppet",
116
- "pxcms",
117
- "reindex",
118
- "roundcube",
119
- "shopware",
120
- "silverstripe",
121
- "sydes",
122
- "symfony",
123
- "typo3",
124
- "wordpress",
125
- "yawik",
126
- "zend",
127
- "zikula"
128
- ],
129
- "time": "2019-08-12T15:00:31+00:00"
130
- },
131
- {
132
- "name": "container-interop/container-interop",
133
- "version": "1.2.0",
134
- "source": {
135
- "type": "git",
136
- "url": "https://github.com/container-interop/container-interop.git",
137
- "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
138
- },
139
- "dist": {
140
- "type": "zip",
141
- "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
142
- "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
143
- "shasum": ""
144
- },
145
- "require": {
146
- "psr/container": "^1.0"
147
- },
148
- "type": "library",
149
- "autoload": {
150
- "psr-4": {
151
- "Interop\\Container\\": "src/Interop/Container/"
152
- }
153
- },
154
- "notification-url": "https://packagist.org/downloads/",
155
- "license": [
156
- "MIT"
157
- ],
158
- "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
159
- "homepage": "https://github.com/container-interop/container-interop",
160
- "time": "2017-02-14T19:40:03+00:00"
161
- },
162
- {
163
- "name": "league/container",
164
- "version": "2.4.1",
165
- "source": {
166
- "type": "git",
167
- "url": "https://github.com/thephpleague/container.git",
168
- "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0"
169
- },
170
- "dist": {
171
- "type": "zip",
172
- "url": "https://api.github.com/repos/thephpleague/container/zipball/43f35abd03a12977a60ffd7095efd6a7808488c0",
173
- "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0",
174
- "shasum": ""
175
- },
176
- "require": {
177
- "container-interop/container-interop": "^1.2",
178
- "php": "^5.4.0 || ^7.0"
179
- },
180
- "provide": {
181
- "container-interop/container-interop-implementation": "^1.2",
182
- "psr/container-implementation": "^1.0"
183
- },
184
- "replace": {
185
- "orno/di": "~2.0"
186
- },
187
- "require-dev": {
188
- "phpunit/phpunit": "4.*"
189
- },
190
- "type": "library",
191
- "extra": {
192
- "branch-alias": {
193
- "dev-2.x": "2.x-dev",
194
- "dev-1.x": "1.x-dev"
195
- }
196
- },
197
- "autoload": {
198
- "psr-4": {
199
- "League\\Container\\": "src"
200
- }
201
- },
202
- "notification-url": "https://packagist.org/downloads/",
203
- "license": [
204
- "MIT"
205
- ],
206
- "authors": [
207
- {
208
- "name": "Phil Bennett",
209
- "email": "philipobenito@gmail.com",
210
- "homepage": "http://www.philipobenito.com",
211
- "role": "Developer"
212
- }
213
- ],
214
- "description": "A fast and intuitive dependency injection container.",
215
- "homepage": "https://github.com/thephpleague/container",
216
- "keywords": [
217
- "container",
218
- "dependency",
219
- "di",
220
- "injection",
221
- "league",
222
- "provider",
223
- "service"
224
- ],
225
- "time": "2017-05-10T09:20:27+00:00"
226
- },
227
- {
228
- "name": "psr/container",
229
- "version": "1.0.0",
230
- "source": {
231
- "type": "git",
232
- "url": "https://github.com/php-fig/container.git",
233
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
234
- },
235
- "dist": {
236
- "type": "zip",
237
- "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
238
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
239
- "shasum": ""
240
- },
241
- "require": {
242
- "php": ">=5.3.0"
243
- },
244
- "type": "library",
245
- "extra": {
246
- "branch-alias": {
247
- "dev-master": "1.0.x-dev"
248
- }
249
- },
250
- "autoload": {
251
- "psr-4": {
252
- "Psr\\Container\\": "src/"
253
- }
254
- },
255
- "notification-url": "https://packagist.org/downloads/",
256
- "license": [
257
- "MIT"
258
- ],
259
- "authors": [
260
- {
261
- "name": "PHP-FIG",
262
- "homepage": "http://www.php-fig.org/"
263
- }
264
- ],
265
- "description": "Common Container Interface (PHP FIG PSR-11)",
266
- "homepage": "https://github.com/php-fig/container",
267
- "keywords": [
268
- "PSR-11",
269
- "container",
270
- "container-interface",
271
- "container-interop",
272
- "psr"
273
- ],
274
- "time": "2017-02-14T16:28:37+00:00"
275
- },
276
- {
277
- "name": "wp-media/rocket-lazyload-common",
278
- "version": "v2.5",
279
- "source": {
280
- "type": "git",
281
- "url": "https://github.com/wp-media/rocket-lazyload-common.git",
282
- "reference": "54e4e8b08293d113bf871e476d9cf899e9961391"
283
- },
284
- "dist": {
285
- "type": "zip",
286
- "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/54e4e8b08293d113bf871e476d9cf899e9961391",
287
- "reference": "54e4e8b08293d113bf871e476d9cf899e9961391",
288
- "shasum": ""
289
- },
290
- "require": {
291
- "php": ">=5.6"
292
- },
293
- "require-dev": {
294
- "brain/monkey": "^2.0",
295
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
296
- "doctrine/instantiator": "1.0.*",
297
- "myclabs/deep-copy": "1.6.*",
298
- "phpcompatibility/phpcompatibility-wp": "^2.0",
299
- "phpdocumentor/reflection-docblock": "^3.3",
300
- "phpunit/php-token-stream": "^1.4",
301
- "phpunit/phpunit": "^5.7",
302
- "symfony/yaml": "2.8.*",
303
- "wp-coding-standards/wpcs": "^2.0.0"
304
- },
305
- "type": "library",
306
- "autoload": {
307
- "psr-4": {
308
- "RocketLazyload\\": "src"
309
- }
310
- },
311
- "notification-url": "https://packagist.org/downloads/",
312
- "license": [
313
- "GPL-3.0-or-later"
314
- ],
315
- "authors": [
316
- {
317
- "name": "WP Media",
318
- "email": "contact@wp-media.me"
319
- }
320
- ],
321
- "description": "Common Code between WP Rocket and Lazyload by WP Rocket",
322
- "time": "2019-09-05T02:40:02+00:00"
323
- }
324
- ],
325
- "packages-dev": [
326
- {
327
- "name": "antecedent/patchwork",
328
- "version": "2.1.8",
329
- "source": {
330
- "type": "git",
331
- "url": "https://github.com/antecedent/patchwork.git",
332
- "reference": "3bb81ace3914c220aa273d1c0603d5e1b454c0d7"
333
- },
334
- "dist": {
335
- "type": "zip",
336
- "url": "https://api.github.com/repos/antecedent/patchwork/zipball/3bb81ace3914c220aa273d1c0603d5e1b454c0d7",
337
- "reference": "3bb81ace3914c220aa273d1c0603d5e1b454c0d7",
338
- "shasum": ""
339
- },
340
- "require": {
341
- "php": ">=5.4.0"
342
- },
343
- "type": "library",
344
- "notification-url": "https://packagist.org/downloads/",
345
- "license": [
346
- "MIT"
347
- ],
348
- "authors": [
349
- {
350
- "name": "Ignas Rudaitis",
351
- "email": "ignas.rudaitis@gmail.com"
352
- }
353
- ],
354
- "description": "Method redefinition (monkey-patching) functionality for PHP.",
355
- "homepage": "http://patchwork2.org/",
356
- "keywords": [
357
- "aop",
358
- "aspect",
359
- "interception",
360
- "monkeypatching",
361
- "redefinition",
362
- "runkit",
363
- "testing"
364
- ],
365
- "time": "2018-02-19T18:52:50+00:00"
366
- },
367
- {
368
- "name": "brain/monkey",
369
- "version": "2.3.1",
370
- "source": {
371
- "type": "git",
372
- "url": "https://github.com/Brain-WP/BrainMonkey.git",
373
- "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776"
374
- },
375
- "dist": {
376
- "type": "zip",
377
- "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
378
- "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
379
- "shasum": ""
380
- },
381
- "require": {
382
- "antecedent/patchwork": "^2.0",
383
- "mockery/mockery": ">=0.9 <2",
384
- "php": ">=5.6.0"
385
- },
386
- "require-dev": {
387
- "phpunit/phpunit": "~5.7.9"
388
- },
389
- "type": "library",
390
- "extra": {
391
- "branch-alias": {
392
- "dev-version/1": "1.x-dev",
393
- "dev-master": "2.0.x-dev"
394
- }
395
- },
396
- "autoload": {
397
- "psr-4": {
398
- "Brain\\Monkey\\": "src/"
399
- },
400
- "files": [
401
- "inc/api.php"
402
- ]
403
- },
404
- "notification-url": "https://packagist.org/downloads/",
405
- "license": [
406
- "MIT"
407
- ],
408
- "authors": [
409
- {
410
- "name": "Giuseppe Mazzapica",
411
- "role": "Developer",
412
- "email": "giuseppe.mazzapica@gmail.com",
413
- "homepage": "https://gmazzap.me"
414
- }
415
- ],
416
- "description": "Mocking utility for PHP functions and WordPress plugin API",
417
- "keywords": [
418
- "Monkey Patching",
419
- "interception",
420
- "mock",
421
- "mock functions",
422
- "mockery",
423
- "patchwork",
424
- "redefinition",
425
- "runkit",
426
- "test",
427
- "testing"
428
- ],
429
- "time": "2019-07-26T19:00:28+00:00"
430
- },
431
- {
432
- "name": "dealerdirect/phpcodesniffer-composer-installer",
433
- "version": "v0.5.0",
434
- "source": {
435
- "type": "git",
436
- "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
437
- "reference": "e749410375ff6fb7a040a68878c656c2e610b132"
438
- },
439
- "dist": {
440
- "type": "zip",
441
- "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
442
- "reference": "e749410375ff6fb7a040a68878c656c2e610b132",
443
- "shasum": ""
444
- },
445
- "require": {
446
- "composer-plugin-api": "^1.0",
447
- "php": "^5.3|^7",
448
- "squizlabs/php_codesniffer": "^2|^3"
449
- },
450
- "require-dev": {
451
- "composer/composer": "*",
452
- "phpcompatibility/php-compatibility": "^9.0",
453
- "sensiolabs/security-checker": "^4.1.0"
454
- },
455
- "type": "composer-plugin",
456
- "extra": {
457
- "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
458
- },
459
- "autoload": {
460
- "psr-4": {
461
- "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
462
- }
463
- },
464
- "notification-url": "https://packagist.org/downloads/",
465
- "license": [
466
- "MIT"
467
- ],
468
- "authors": [
469
- {
470
- "name": "Franck Nijhof",
471
- "email": "franck.nijhof@dealerdirect.com",
472
- "homepage": "http://www.frenck.nl",
473
- "role": "Developer / IT Manager"
474
- }
475
- ],
476
- "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
477
- "homepage": "http://www.dealerdirect.com",
478
- "keywords": [
479
- "PHPCodeSniffer",
480
- "PHP_CodeSniffer",
481
- "code quality",
482
- "codesniffer",
483
- "composer",
484
- "installer",
485
- "phpcs",
486
- "plugin",
487
- "qa",
488
- "quality",
489
- "standard",
490
- "standards",
491
- "style guide",
492
- "stylecheck",
493
- "tests"
494
- ],
495
- "time": "2018-10-26T13:21:45+00:00"
496
- },
497
- {
498
- "name": "doctrine/instantiator",
499
- "version": "1.2.0",
500
- "source": {
501
- "type": "git",
502
- "url": "https://github.com/doctrine/instantiator.git",
503
- "reference": "a2c590166b2133a4633738648b6b064edae0814a"
504
- },
505
- "dist": {
506
- "type": "zip",
507
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
508
- "reference": "a2c590166b2133a4633738648b6b064edae0814a",
509
- "shasum": ""
510
- },
511
- "require": {
512
- "php": "^7.1"
513
- },
514
- "require-dev": {
515
- "doctrine/coding-standard": "^6.0",
516
- "ext-pdo": "*",
517
- "ext-phar": "*",
518
- "phpbench/phpbench": "^0.13",
519
- "phpstan/phpstan-phpunit": "^0.11",
520
- "phpstan/phpstan-shim": "^0.11",
521
- "phpunit/phpunit": "^7.0"
522
- },
523
- "type": "library",
524
- "extra": {
525
- "branch-alias": {
526
- "dev-master": "1.2.x-dev"
527
- }
528
- },
529
- "autoload": {
530
- "psr-4": {
531
- "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
532
- }
533
- },
534
- "notification-url": "https://packagist.org/downloads/",
535
- "license": [
536
- "MIT"
537
- ],
538
- "authors": [
539
- {
540
- "name": "Marco Pivetta",
541
- "email": "ocramius@gmail.com",
542
- "homepage": "http://ocramius.github.com/"
543
- }
544
- ],
545
- "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
546
- "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
547
- "keywords": [
548
- "constructor",
549
- "instantiate"
550
- ],
551
- "time": "2019-03-17T17:37:11+00:00"
552
- },
553
- {
554
- "name": "hamcrest/hamcrest-php",
555
- "version": "v2.0.0",
556
- "source": {
557
- "type": "git",
558
- "url": "https://github.com/hamcrest/hamcrest-php.git",
559
- "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
560
- },
561
- "dist": {
562
- "type": "zip",
563
- "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
564
- "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
565
- "shasum": ""
566
- },
567
- "require": {
568
- "php": "^5.3|^7.0"
569
- },
570
- "replace": {
571
- "cordoval/hamcrest-php": "*",
572
- "davedevelopment/hamcrest-php": "*",
573
- "kodova/hamcrest-php": "*"
574
- },
575
- "require-dev": {
576
- "phpunit/php-file-iterator": "1.3.3",
577
- "phpunit/phpunit": "~4.0",
578
- "satooshi/php-coveralls": "^1.0"
579
- },
580
- "type": "library",
581
- "extra": {
582
- "branch-alias": {
583
- "dev-master": "2.0-dev"
584
- }
585
- },
586
- "autoload": {
587
- "classmap": [
588
- "hamcrest"
589
- ]
590
- },
591
- "notification-url": "https://packagist.org/downloads/",
592
- "license": [
593
- "BSD"
594
- ],
595
- "description": "This is the PHP port of Hamcrest Matchers",
596
- "keywords": [
597
- "test"
598
- ],
599
- "time": "2016-01-20T08:20:44+00:00"
600
- },
601
- {
602
- "name": "mockery/mockery",
603
- "version": "1.2.3",
604
- "source": {
605
- "type": "git",
606
- "url": "https://github.com/mockery/mockery.git",
607
- "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031"
608
- },
609
- "dist": {
610
- "type": "zip",
611
- "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031",
612
- "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031",
613
- "shasum": ""
614
- },
615
- "require": {
616
- "hamcrest/hamcrest-php": "~2.0",
617
- "lib-pcre": ">=7.0",
618
- "php": ">=5.6.0"
619
- },
620
- "require-dev": {
621
- "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
622
- },
623
- "type": "library",
624
- "extra": {
625
- "branch-alias": {
626
- "dev-master": "1.0.x-dev"
627
- }
628
- },
629
- "autoload": {
630
- "psr-0": {
631
- "Mockery": "library/"
632
- }
633
- },
634
- "notification-url": "https://packagist.org/downloads/",
635
- "license": [
636
- "BSD-3-Clause"
637
- ],
638
- "authors": [
639
- {
640
- "name": "Pádraic Brady",
641
- "email": "padraic.brady@gmail.com",
642
- "homepage": "http://blog.astrumfutura.com"
643
- },
644
- {
645
- "name": "Dave Marshall",
646
- "email": "dave.marshall@atstsolutions.co.uk",
647
- "homepage": "http://davedevelopment.co.uk"
648
- }
649
- ],
650
- "description": "Mockery is a simple yet flexible PHP mock object framework",
651
- "homepage": "https://github.com/mockery/mockery",
652
- "keywords": [
653
- "BDD",
654
- "TDD",
655
- "library",
656
- "mock",
657
- "mock objects",
658
- "mockery",
659
- "stub",
660
- "test",
661
- "test double",
662
- "testing"
663
- ],
664
- "time": "2019-08-07T15:01:07+00:00"
665
- },
666
- {
667
- "name": "myclabs/deep-copy",
668
- "version": "1.9.3",
669
- "source": {
670
- "type": "git",
671
- "url": "https://github.com/myclabs/DeepCopy.git",
672
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
673
- },
674
- "dist": {
675
- "type": "zip",
676
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
677
- "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
678
- "shasum": ""
679
- },
680
- "require": {
681
- "php": "^7.1"
682
- },
683
- "replace": {
684
- "myclabs/deep-copy": "self.version"
685
- },
686
- "require-dev": {
687
- "doctrine/collections": "^1.0",
688
- "doctrine/common": "^2.6",
689
- "phpunit/phpunit": "^7.1"
690
- },
691
- "type": "library",
692
- "autoload": {
693
- "psr-4": {
694
- "DeepCopy\\": "src/DeepCopy/"
695
- },
696
- "files": [
697
- "src/DeepCopy/deep_copy.php"
698
- ]
699
- },
700
- "notification-url": "https://packagist.org/downloads/",
701
- "license": [
702
- "MIT"
703
- ],
704
- "description": "Create deep copies (clones) of your objects",
705
- "keywords": [
706
- "clone",
707
- "copy",
708
- "duplicate",
709
- "object",
710
- "object graph"
711
- ],
712
- "time": "2019-08-09T12:45:53+00:00"
713
- },
714
- {
715
- "name": "phpcompatibility/php-compatibility",
716
- "version": "9.3.0",
717
- "source": {
718
- "type": "git",
719
- "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
720
- "reference": "06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5"
721
- },
722
- "dist": {
723
- "type": "zip",
724
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5",
725
- "reference": "06cc8d2c2ed62a70f52963dbdf5eaa1ec0fe34c5",
726
- "shasum": ""
727
- },
728
- "require": {
729
- "php": ">=5.3",
730
- "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
731
- },
732
- "conflict": {
733
- "squizlabs/php_codesniffer": "2.6.2"
734
- },
735
- "require-dev": {
736
- "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
737
- },
738
- "suggest": {
739
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
740
- "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
741
- },
742
- "type": "phpcodesniffer-standard",
743
- "notification-url": "https://packagist.org/downloads/",
744
- "license": [
745
- "LGPL-3.0-or-later"
746
- ],
747
- "authors": [
748
- {
749
- "name": "Wim Godden",
750
- "homepage": "https://github.com/wimg",
751
- "role": "lead"
752
- },
753
- {
754
- "name": "Juliette Reinders Folmer",
755
- "homepage": "https://github.com/jrfnl",
756
- "role": "lead"
757
- },
758
- {
759
- "name": "Contributors",
760
- "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
761
- }
762
- ],
763
- "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
764
- "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
765
- "keywords": [
766
- "compatibility",
767
- "phpcs",
768
- "standards"
769
- ],
770
- "time": "2019-08-28T15:29:06+00:00"
771
- },
772
- {
773
- "name": "phpcompatibility/phpcompatibility-paragonie",
774
- "version": "1.1.0",
775
- "source": {
776
- "type": "git",
777
- "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
778
- "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936"
779
- },
780
- "dist": {
781
- "type": "zip",
782
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
783
- "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
784
- "shasum": ""
785
- },
786
- "require": {
787
- "phpcompatibility/php-compatibility": "^9.0"
788
- },
789
- "require-dev": {
790
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5",
791
- "paragonie/random_compat": "dev-master",
792
- "paragonie/sodium_compat": "dev-master"
793
- },
794
- "suggest": {
795
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
796
- "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
797
- },
798
- "type": "phpcodesniffer-standard",
799
- "notification-url": "https://packagist.org/downloads/",
800
- "license": [
801
- "LGPL-3.0-or-later"
802
- ],
803
- "authors": [
804
- {
805
- "name": "Wim Godden",
806
- "role": "lead"
807
- },
808
- {
809
- "name": "Juliette Reinders Folmer",
810
- "role": "lead"
811
- }
812
- ],
813
- "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
814
- "homepage": "http://phpcompatibility.com/",
815
- "keywords": [
816
- "compatibility",
817
- "paragonie",
818
- "phpcs",
819
- "polyfill",
820
- "standards"
821
- ],
822
- "time": "2019-08-28T15:58:19+00:00"
823
- },
824
- {
825
- "name": "phpcompatibility/phpcompatibility-wp",
826
- "version": "2.1.0",
827
- "source": {
828
- "type": "git",
829
- "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
830
- "reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
831
- },
832
- "dist": {
833
- "type": "zip",
834
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
835
- "reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
836
- "shasum": ""
837
- },
838
- "require": {
839
- "phpcompatibility/php-compatibility": "^9.0",
840
- "phpcompatibility/phpcompatibility-paragonie": "^1.0"
841
- },
842
- "require-dev": {
843
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5"
844
- },
845
- "suggest": {
846
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
847
- "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
848
- },
849
- "type": "phpcodesniffer-standard",
850
- "notification-url": "https://packagist.org/downloads/",
851
- "license": [
852
- "LGPL-3.0-or-later"
853
- ],
854
- "authors": [
855
- {
856
- "name": "Wim Godden",
857
- "role": "lead"
858
- },
859
- {
860
- "name": "Juliette Reinders Folmer",
861
- "role": "lead"
862
- }
863
- ],
864
- "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
865
- "homepage": "http://phpcompatibility.com/",
866
- "keywords": [
867
- "compatibility",
868
- "phpcs",
869
- "standards",
870
- "wordpress"
871
- ],
872
- "time": "2019-08-28T14:22:28+00:00"
873
- },
874
- {
875
- "name": "phpdocumentor/reflection-common",
876
- "version": "1.0.1",
877
- "source": {
878
- "type": "git",
879
- "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
880
- "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
881
- },
882
- "dist": {
883
- "type": "zip",
884
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
885
- "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
886
- "shasum": ""
887
- },
888
- "require": {
889
- "php": ">=5.5"
890
- },
891
- "require-dev": {
892
- "phpunit/phpunit": "^4.6"
893
- },
894
- "type": "library",
895
- "extra": {
896
- "branch-alias": {
897
- "dev-master": "1.0.x-dev"
898
- }
899
- },
900
- "autoload": {
901
- "psr-4": {
902
- "phpDocumentor\\Reflection\\": [
903
- "src"
904
- ]
905
- }
906
- },
907
- "notification-url": "https://packagist.org/downloads/",
908
- "license": [
909
- "MIT"
910
- ],
911
- "authors": [
912
- {
913
- "name": "Jaap van Otterdijk",
914
- "email": "opensource@ijaap.nl"
915
- }
916
- ],
917
- "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
918
- "homepage": "http://www.phpdoc.org",
919
- "keywords": [
920
- "FQSEN",
921
- "phpDocumentor",
922
- "phpdoc",
923
- "reflection",
924
- "static analysis"
925
- ],
926
- "time": "2017-09-11T18:02:19+00:00"
927
- },
928
- {
929
- "name": "phpdocumentor/reflection-docblock",
930
- "version": "4.3.1",
931
- "source": {
932
- "type": "git",
933
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
934
- "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c"
935
- },
936
- "dist": {
937
- "type": "zip",
938
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
939
- "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
940
- "shasum": ""
941
- },
942
- "require": {
943
- "php": "^7.0",
944
- "phpdocumentor/reflection-common": "^1.0.0",
945
- "phpdocumentor/type-resolver": "^0.4.0",
946
- "webmozart/assert": "^1.0"
947
- },
948
- "require-dev": {
949
- "doctrine/instantiator": "~1.0.5",
950
- "mockery/mockery": "^1.0",
951
- "phpunit/phpunit": "^6.4"
952
- },
953
- "type": "library",
954
- "extra": {
955
- "branch-alias": {
956
- "dev-master": "4.x-dev"
957
- }
958
- },
959
- "autoload": {
960
- "psr-4": {
961
- "phpDocumentor\\Reflection\\": [
962
- "src/"
963
- ]
964
- }
965
- },
966
- "notification-url": "https://packagist.org/downloads/",
967
- "license": [
968
- "MIT"
969
- ],
970
- "authors": [
971
- {
972
- "name": "Mike van Riel",
973
- "email": "me@mikevanriel.com"
974
- }
975
- ],
976
- "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
977
- "time": "2019-04-30T17:48:53+00:00"
978
- },
979
- {
980
- "name": "phpdocumentor/type-resolver",
981
- "version": "0.4.0",
982
- "source": {
983
- "type": "git",
984
- "url": "https://github.com/phpDocumentor/TypeResolver.git",
985
- "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
986
- },
987
- "dist": {
988
- "type": "zip",
989
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
990
- "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
991
- "shasum": ""
992
- },
993
- "require": {
994
- "php": "^5.5 || ^7.0",
995
- "phpdocumentor/reflection-common": "^1.0"
996
- },
997
- "require-dev": {
998
- "mockery/mockery": "^0.9.4",
999
- "phpunit/phpunit": "^5.2||^4.8.24"
1000
- },
1001
- "type": "library",
1002
- "extra": {
1003
- "branch-alias": {
1004
- "dev-master": "1.0.x-dev"
1005
- }
1006
- },
1007
- "autoload": {
1008
- "psr-4": {
1009
- "phpDocumentor\\Reflection\\": [
1010
- "src/"
1011
- ]
1012
- }
1013
- },
1014
- "notification-url": "https://packagist.org/downloads/",
1015
- "license": [
1016
- "MIT"
1017
- ],
1018
- "authors": [
1019
- {
1020
- "name": "Mike van Riel",
1021
- "email": "me@mikevanriel.com"
1022
- }
1023
- ],
1024
- "time": "2017-07-14T14:27:02+00:00"
1025
- },
1026
- {
1027
- "name": "phpspec/prophecy",
1028
- "version": "1.8.1",
1029
- "source": {
1030
- "type": "git",
1031
- "url": "https://github.com/phpspec/prophecy.git",
1032
- "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
1033
- },
1034
- "dist": {
1035
- "type": "zip",
1036
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
1037
- "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
1038
- "shasum": ""
1039
- },
1040
- "require": {
1041
- "doctrine/instantiator": "^1.0.2",
1042
- "php": "^5.3|^7.0",
1043
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
1044
- "sebastian/comparator": "^1.1|^2.0|^3.0",
1045
- "sebastian/recursion-context": "^1.0|^2.0|^3.0"
1046
- },
1047
- "require-dev": {
1048
- "phpspec/phpspec": "^2.5|^3.2",
1049
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
1050
- },
1051
- "type": "library",
1052
- "extra": {
1053
- "branch-alias": {
1054
- "dev-master": "1.8.x-dev"
1055
- }
1056
- },
1057
- "autoload": {
1058
- "psr-4": {
1059
- "Prophecy\\": "src/Prophecy"
1060
- }
1061
- },
1062
- "notification-url": "https://packagist.org/downloads/",
1063
- "license": [
1064
- "MIT"
1065
- ],
1066
- "authors": [
1067
- {
1068
- "name": "Konstantin Kudryashov",
1069
- "email": "ever.zet@gmail.com",
1070
- "homepage": "http://everzet.com"
1071
- },
1072
- {
1073
- "name": "Marcello Duarte",
1074
- "email": "marcello.duarte@gmail.com"
1075
- }
1076
- ],
1077
- "description": "Highly opinionated mocking framework for PHP 5.3+",
1078
- "homepage": "https://github.com/phpspec/prophecy",
1079
- "keywords": [
1080
- "Double",
1081
- "Dummy",
1082
- "fake",
1083
- "mock",
1084
- "spy",
1085
- "stub"
1086
- ],
1087
- "time": "2019-06-13T12:50:23+00:00"
1088
- },
1089
- {
1090
- "name": "phpunit/php-code-coverage",
1091
- "version": "4.0.8",
1092
- "source": {
1093
- "type": "git",
1094
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
1095
- "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d"
1096
- },
1097
- "dist": {
1098
- "type": "zip",
1099
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
1100
- "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
1101
- "shasum": ""
1102
- },
1103
- "require": {
1104
- "ext-dom": "*",
1105
- "ext-xmlwriter": "*",
1106
- "php": "^5.6 || ^7.0",
1107
- "phpunit/php-file-iterator": "^1.3",
1108
- "phpunit/php-text-template": "^1.2",
1109
- "phpunit/php-token-stream": "^1.4.2 || ^2.0",
1110
- "sebastian/code-unit-reverse-lookup": "^1.0",
1111
- "sebastian/environment": "^1.3.2 || ^2.0",
1112
- "sebastian/version": "^1.0 || ^2.0"
1113
- },
1114
- "require-dev": {
1115
- "ext-xdebug": "^2.1.4",
1116
- "phpunit/phpunit": "^5.7"
1117
- },
1118
- "suggest": {
1119
- "ext-xdebug": "^2.5.1"
1120
- },
1121
- "type": "library",
1122
- "extra": {
1123
- "branch-alias": {
1124
- "dev-master": "4.0.x-dev"
1125
- }
1126
- },
1127
- "autoload": {
1128
- "classmap": [
1129
- "src/"
1130
- ]
1131
- },
1132
- "notification-url": "https://packagist.org/downloads/",
1133
- "license": [
1134
- "BSD-3-Clause"
1135
- ],
1136
- "authors": [
1137
- {
1138
- "name": "Sebastian Bergmann",
1139
- "email": "sb@sebastian-bergmann.de",
1140
- "role": "lead"
1141
- }
1142
- ],
1143
- "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
1144
- "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
1145
- "keywords": [
1146
- "coverage",
1147
- "testing",
1148
- "xunit"
1149
- ],
1150
- "time": "2017-04-02T07:44:40+00:00"
1151
- },
1152
- {
1153
- "name": "phpunit/php-file-iterator",
1154
- "version": "1.4.5",
1155
- "source": {
1156
- "type": "git",
1157
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
1158
- "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
1159
- },
1160
- "dist": {
1161
- "type": "zip",
1162
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
1163
- "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
1164
- "shasum": ""
1165
- },
1166
- "require": {
1167
- "php": ">=5.3.3"
1168
- },
1169
- "type": "library",
1170
- "extra": {
1171
- "branch-alias": {
1172
- "dev-master": "1.4.x-dev"
1173
- }
1174
- },
1175
- "autoload": {
1176
- "classmap": [
1177
- "src/"
1178
- ]
1179
- },
1180
- "notification-url": "https://packagist.org/downloads/",
1181
- "license": [
1182
- "BSD-3-Clause"
1183
- ],
1184
- "authors": [
1185
- {
1186
- "name": "Sebastian Bergmann",
1187
- "email": "sb@sebastian-bergmann.de",
1188
- "role": "lead"
1189
- }
1190
- ],
1191
- "description": "FilterIterator implementation that filters files based on a list of suffixes.",
1192
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
1193
- "keywords": [
1194
- "filesystem",
1195
- "iterator"
1196
- ],
1197
- "time": "2017-11-27T13:52:08+00:00"
1198
- },
1199
- {
1200
- "name": "phpunit/php-text-template",
1201
- "version": "1.2.1",
1202
- "source": {
1203
- "type": "git",
1204
- "url": "https://github.com/sebastianbergmann/php-text-template.git",
1205
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
1206
- },
1207
- "dist": {
1208
- "type": "zip",
1209
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1210
- "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1211
- "shasum": ""
1212
- },
1213
- "require": {
1214
- "php": ">=5.3.3"
1215
- },
1216
- "type": "library",
1217
- "autoload": {
1218
- "classmap": [
1219
- "src/"
1220
- ]
1221
- },
1222
- "notification-url": "https://packagist.org/downloads/",
1223
- "license": [
1224
- "BSD-3-Clause"
1225
- ],
1226
- "authors": [
1227
- {
1228
- "name": "Sebastian Bergmann",
1229
- "email": "sebastian@phpunit.de",
1230
- "role": "lead"
1231
- }
1232
- ],
1233
- "description": "Simple template engine.",
1234
- "homepage": "https://github.com/sebastianbergmann/php-text-template/",
1235
- "keywords": [
1236
- "template"
1237
- ],
1238
- "time": "2015-06-21T13:50:34+00:00"
1239
- },
1240
- {
1241
- "name": "phpunit/php-timer",
1242
- "version": "1.0.9",
1243
- "source": {
1244
- "type": "git",
1245
- "url": "https://github.com/sebastianbergmann/php-timer.git",
1246
- "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
1247
- },
1248
- "dist": {
1249
- "type": "zip",
1250
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1251
- "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1252
- "shasum": ""
1253
- },
1254
- "require": {
1255
- "php": "^5.3.3 || ^7.0"
1256
- },
1257
- "require-dev": {
1258
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1259
- },
1260
- "type": "library",
1261
- "extra": {
1262
- "branch-alias": {
1263
- "dev-master": "1.0-dev"
1264
- }
1265
- },
1266
- "autoload": {
1267
- "classmap": [
1268
- "src/"
1269
- ]
1270
- },
1271
- "notification-url": "https://packagist.org/downloads/",
1272
- "license": [
1273
- "BSD-3-Clause"
1274
- ],
1275
- "authors": [
1276
- {
1277
- "name": "Sebastian Bergmann",
1278
- "email": "sb@sebastian-bergmann.de",
1279
- "role": "lead"
1280
- }
1281
- ],
1282
- "description": "Utility class for timing",
1283
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
1284
- "keywords": [
1285
- "timer"
1286
- ],
1287
- "time": "2017-02-26T11:10:40+00:00"
1288
- },
1289
- {
1290
- "name": "phpunit/php-token-stream",
1291
- "version": "2.0.2",
1292
- "source": {
1293
- "type": "git",
1294
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
1295
- "reference": "791198a2c6254db10131eecfe8c06670700904db"
1296
- },
1297
- "dist": {
1298
- "type": "zip",
1299
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
1300
- "reference": "791198a2c6254db10131eecfe8c06670700904db",
1301
- "shasum": ""
1302
- },
1303
- "require": {
1304
- "ext-tokenizer": "*",
1305
- "php": "^7.0"
1306
- },
1307
- "require-dev": {
1308
- "phpunit/phpunit": "^6.2.4"
1309
- },
1310
- "type": "library",
1311
- "extra": {
1312
- "branch-alias": {
1313
- "dev-master": "2.0-dev"
1314
- }
1315
- },
1316
- "autoload": {
1317
- "classmap": [
1318
- "src/"
1319
- ]
1320
- },
1321
- "notification-url": "https://packagist.org/downloads/",
1322
- "license": [
1323
- "BSD-3-Clause"
1324
- ],
1325
- "authors": [
1326
- {
1327
- "name": "Sebastian Bergmann",
1328
- "email": "sebastian@phpunit.de"
1329
- }
1330
- ],
1331
- "description": "Wrapper around PHP's tokenizer extension.",
1332
- "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
1333
- "keywords": [
1334
- "tokenizer"
1335
- ],
1336
- "time": "2017-11-27T05:48:46+00:00"
1337
- },
1338
- {
1339
- "name": "phpunit/phpunit",
1340
- "version": "5.7.27",
1341
- "source": {
1342
- "type": "git",
1343
- "url": "https://github.com/sebastianbergmann/phpunit.git",
1344
- "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c"
1345
- },
1346
- "dist": {
1347
- "type": "zip",
1348
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
1349
- "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
1350
- "shasum": ""
1351
- },
1352
- "require": {
1353
- "ext-dom": "*",
1354
- "ext-json": "*",
1355
- "ext-libxml": "*",
1356
- "ext-mbstring": "*",
1357
- "ext-xml": "*",
1358
- "myclabs/deep-copy": "~1.3",
1359
- "php": "^5.6 || ^7.0",
1360
- "phpspec/prophecy": "^1.6.2",
1361
- "phpunit/php-code-coverage": "^4.0.4",
1362
- "phpunit/php-file-iterator": "~1.4",
1363
- "phpunit/php-text-template": "~1.2",
1364
- "phpunit/php-timer": "^1.0.6",
1365
- "phpunit/phpunit-mock-objects": "^3.2",
1366
- "sebastian/comparator": "^1.2.4",
1367
- "sebastian/diff": "^1.4.3",
1368
- "sebastian/environment": "^1.3.4 || ^2.0",
1369
- "sebastian/exporter": "~2.0",
1370
- "sebastian/global-state": "^1.1",
1371
- "sebastian/object-enumerator": "~2.0",
1372
- "sebastian/resource-operations": "~1.0",
1373
- "sebastian/version": "^1.0.6|^2.0.1",
1374
- "symfony/yaml": "~2.1|~3.0|~4.0"
1375
- },
1376
- "conflict": {
1377
- "phpdocumentor/reflection-docblock": "3.0.2"
1378
- },
1379
- "require-dev": {
1380
- "ext-pdo": "*"
1381
- },
1382
- "suggest": {
1383
- "ext-xdebug": "*",
1384
- "phpunit/php-invoker": "~1.1"
1385
- },
1386
- "bin": [
1387
- "phpunit"
1388
- ],
1389
- "type": "library",
1390
- "extra": {
1391
- "branch-alias": {
1392
- "dev-master": "5.7.x-dev"
1393
- }
1394
- },
1395
- "autoload": {
1396
- "classmap": [
1397
- "src/"
1398
- ]
1399
- },
1400
- "notification-url": "https://packagist.org/downloads/",
1401
- "license": [
1402
- "BSD-3-Clause"
1403
- ],
1404
- "authors": [
1405
- {
1406
- "name": "Sebastian Bergmann",
1407
- "email": "sebastian@phpunit.de",
1408
- "role": "lead"
1409
- }
1410
- ],
1411
- "description": "The PHP Unit Testing framework.",
1412
- "homepage": "https://phpunit.de/",
1413
- "keywords": [
1414
- "phpunit",
1415
- "testing",
1416
- "xunit"
1417
- ],
1418
- "time": "2018-02-01T05:50:59+00:00"
1419
- },
1420
- {
1421
- "name": "phpunit/phpunit-mock-objects",
1422
- "version": "3.4.4",
1423
- "source": {
1424
- "type": "git",
1425
- "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
1426
- "reference": "a23b761686d50a560cc56233b9ecf49597cc9118"
1427
- },
1428
- "dist": {
1429
- "type": "zip",
1430
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118",
1431
- "reference": "a23b761686d50a560cc56233b9ecf49597cc9118",
1432
- "shasum": ""
1433
- },
1434
- "require": {
1435
- "doctrine/instantiator": "^1.0.2",
1436
- "php": "^5.6 || ^7.0",
1437
- "phpunit/php-text-template": "^1.2",
1438
- "sebastian/exporter": "^1.2 || ^2.0"
1439
- },
1440
- "conflict": {
1441
- "phpunit/phpunit": "<5.4.0"
1442
- },
1443
- "require-dev": {
1444
- "phpunit/phpunit": "^5.4"
1445
- },
1446
- "suggest": {
1447
- "ext-soap": "*"
1448
- },
1449
- "type": "library",
1450
- "extra": {
1451
- "branch-alias": {
1452
- "dev-master": "3.2.x-dev"
1453
- }
1454
- },
1455
- "autoload": {
1456
- "classmap": [
1457
- "src/"
1458
- ]
1459
- },
1460
- "notification-url": "https://packagist.org/downloads/",
1461
- "license": [
1462
- "BSD-3-Clause"
1463
- ],
1464
- "authors": [
1465
- {
1466
- "name": "Sebastian Bergmann",
1467
- "email": "sb@sebastian-bergmann.de",
1468
- "role": "lead"
1469
- }
1470
- ],
1471
- "description": "Mock Object library for PHPUnit",
1472
- "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
1473
- "keywords": [
1474
- "mock",
1475
- "xunit"
1476
- ],
1477
- "abandoned": true,
1478
- "time": "2017-06-30T09:13:00+00:00"
1479
- },
1480
- {
1481
- "name": "sebastian/code-unit-reverse-lookup",
1482
- "version": "1.0.1",
1483
- "source": {
1484
- "type": "git",
1485
- "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1486
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
1487
- },
1488
- "dist": {
1489
- "type": "zip",
1490
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1491
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1492
- "shasum": ""
1493
- },
1494
- "require": {
1495
- "php": "^5.6 || ^7.0"
1496
- },
1497
- "require-dev": {
1498
- "phpunit/phpunit": "^5.7 || ^6.0"
1499
- },
1500
- "type": "library",
1501
- "extra": {
1502
- "branch-alias": {
1503
- "dev-master": "1.0.x-dev"
1504
- }
1505
- },
1506
- "autoload": {
1507
- "classmap": [
1508
- "src/"
1509
- ]
1510
- },
1511
- "notification-url": "https://packagist.org/downloads/",
1512
- "license": [
1513
- "BSD-3-Clause"
1514
- ],
1515
- "authors": [
1516
- {
1517
- "name": "Sebastian Bergmann",
1518
- "email": "sebastian@phpunit.de"
1519
- }
1520
- ],
1521
- "description": "Looks up which function or method a line of code belongs to",
1522
- "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
1523
- "time": "2017-03-04T06:30:41+00:00"
1524
- },
1525
- {
1526
- "name": "sebastian/comparator",
1527
- "version": "1.2.4",
1528
- "source": {
1529
- "type": "git",
1530
- "url": "https://github.com/sebastianbergmann/comparator.git",
1531
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
1532
- },
1533
- "dist": {
1534
- "type": "zip",
1535
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1536
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1537
- "shasum": ""
1538
- },
1539
- "require": {
1540
- "php": ">=5.3.3",
1541
- "sebastian/diff": "~1.2",
1542
- "sebastian/exporter": "~1.2 || ~2.0"
1543
- },
1544
- "require-dev": {
1545
- "phpunit/phpunit": "~4.4"
1546
- },
1547
- "type": "library",
1548
- "extra": {
1549
- "branch-alias": {
1550
- "dev-master": "1.2.x-dev"
1551
- }
1552
- },
1553
- "autoload": {
1554
- "classmap": [
1555
- "src/"
1556
- ]
1557
- },
1558
- "notification-url": "https://packagist.org/downloads/",
1559
- "license": [
1560
- "BSD-3-Clause"
1561
- ],
1562
- "authors": [
1563
- {
1564
- "name": "Jeff Welch",
1565
- "email": "whatthejeff@gmail.com"
1566
- },
1567
- {
1568
- "name": "Volker Dusch",
1569
- "email": "github@wallbash.com"
1570
- },
1571
- {
1572
- "name": "Bernhard Schussek",
1573
- "email": "bschussek@2bepublished.at"
1574
- },
1575
- {
1576
- "name": "Sebastian Bergmann",
1577
- "email": "sebastian@phpunit.de"
1578
- }
1579
- ],
1580
- "description": "Provides the functionality to compare PHP values for equality",
1581
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
1582
- "keywords": [
1583
- "comparator",
1584
- "compare",
1585
- "equality"
1586
- ],
1587
- "time": "2017-01-29T09:50:25+00:00"
1588
- },
1589
- {
1590
- "name": "sebastian/diff",
1591
- "version": "1.4.3",
1592
- "source": {
1593
- "type": "git",
1594
- "url": "https://github.com/sebastianbergmann/diff.git",
1595
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
1596
- },
1597
- "dist": {
1598
- "type": "zip",
1599
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1600
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1601
- "shasum": ""
1602
- },
1603
- "require": {
1604
- "php": "^5.3.3 || ^7.0"
1605
- },
1606
- "require-dev": {
1607
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1608
- },
1609
- "type": "library",
1610
- "extra": {
1611
- "branch-alias": {
1612
- "dev-master": "1.4-dev"
1613
- }
1614
- },
1615
- "autoload": {
1616
- "classmap": [
1617
- "src/"
1618
- ]
1619
- },
1620
- "notification-url": "https://packagist.org/downloads/",
1621
- "license": [
1622
- "BSD-3-Clause"
1623
- ],
1624
- "authors": [
1625
- {
1626
- "name": "Kore Nordmann",
1627
- "email": "mail@kore-nordmann.de"
1628
- },
1629
- {
1630
- "name": "Sebastian Bergmann",
1631
- "email": "sebastian@phpunit.de"
1632
- }
1633
- ],
1634
- "description": "Diff implementation",
1635
- "homepage": "https://github.com/sebastianbergmann/diff",
1636
- "keywords": [
1637
- "diff"
1638
- ],
1639
- "time": "2017-05-22T07:24:03+00:00"
1640
- },
1641
- {
1642
- "name": "sebastian/environment",
1643
- "version": "2.0.0",
1644
- "source": {
1645
- "type": "git",
1646
- "url": "https://github.com/sebastianbergmann/environment.git",
1647
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
1648
- },
1649
- "dist": {
1650
- "type": "zip",
1651
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
1652
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
1653
- "shasum": ""
1654
- },
1655
- "require": {
1656
- "php": "^5.6 || ^7.0"
1657
- },
1658
- "require-dev": {
1659
- "phpunit/phpunit": "^5.0"
1660
- },
1661
- "type": "library",
1662
- "extra": {
1663
- "branch-alias": {
1664
- "dev-master": "2.0.x-dev"
1665
- }
1666
- },
1667
- "autoload": {
1668
- "classmap": [
1669
- "src/"
1670
- ]
1671
- },
1672
- "notification-url": "https://packagist.org/downloads/",
1673
- "license": [
1674
- "BSD-3-Clause"
1675
- ],
1676
- "authors": [
1677
- {
1678
- "name": "Sebastian Bergmann",
1679
- "email": "sebastian@phpunit.de"
1680
- }
1681
- ],
1682
- "description": "Provides functionality to handle HHVM/PHP environments",
1683
- "homepage": "http://www.github.com/sebastianbergmann/environment",
1684
- "keywords": [
1685
- "Xdebug",
1686
- "environment",
1687
- "hhvm"
1688
- ],
1689
- "time": "2016-11-26T07:53:53+00:00"
1690
- },
1691
- {
1692
- "name": "sebastian/exporter",
1693
- "version": "2.0.0",
1694
- "source": {
1695
- "type": "git",
1696
- "url": "https://github.com/sebastianbergmann/exporter.git",
1697
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
1698
- },
1699
- "dist": {
1700
- "type": "zip",
1701
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
1702
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
1703
- "shasum": ""
1704
- },
1705
- "require": {
1706
- "php": ">=5.3.3",
1707
- "sebastian/recursion-context": "~2.0"
1708
- },
1709
- "require-dev": {
1710
- "ext-mbstring": "*",
1711
- "phpunit/phpunit": "~4.4"
1712
- },
1713
- "type": "library",
1714
- "extra": {
1715
- "branch-alias": {
1716
- "dev-master": "2.0.x-dev"
1717
- }
1718
- },
1719
- "autoload": {
1720
- "classmap": [
1721
- "src/"
1722
- ]
1723
- },
1724
- "notification-url": "https://packagist.org/downloads/",
1725
- "license": [
1726
- "BSD-3-Clause"
1727
- ],
1728
- "authors": [
1729
- {
1730
- "name": "Jeff Welch",
1731
- "email": "whatthejeff@gmail.com"
1732
- },
1733
- {
1734
- "name": "Volker Dusch",
1735
- "email": "github@wallbash.com"
1736
- },
1737
- {
1738
- "name": "Bernhard Schussek",
1739
- "email": "bschussek@2bepublished.at"
1740
- },
1741
- {
1742
- "name": "Sebastian Bergmann",
1743
- "email": "sebastian@phpunit.de"
1744
- },
1745
- {
1746
- "name": "Adam Harvey",
1747
- "email": "aharvey@php.net"
1748
- }
1749
- ],
1750
- "description": "Provides the functionality to export PHP variables for visualization",
1751
- "homepage": "http://www.github.com/sebastianbergmann/exporter",
1752
- "keywords": [
1753
- "export",
1754
- "exporter"
1755
- ],
1756
- "time": "2016-11-19T08:54:04+00:00"
1757
- },
1758
- {
1759
- "name": "sebastian/global-state",
1760
- "version": "1.1.1",
1761
- "source": {
1762
- "type": "git",
1763
- "url": "https://github.com/sebastianbergmann/global-state.git",
1764
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
1765
- },
1766
- "dist": {
1767
- "type": "zip",
1768
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
1769
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
1770
- "shasum": ""
1771
- },
1772
- "require": {
1773
- "php": ">=5.3.3"
1774
- },
1775
- "require-dev": {
1776
- "phpunit/phpunit": "~4.2"
1777
- },
1778
- "suggest": {
1779
- "ext-uopz": "*"
1780
- },
1781
- "type": "library",
1782
- "extra": {
1783
- "branch-alias": {
1784
- "dev-master": "1.0-dev"
1785
- }
1786
- },
1787
- "autoload": {
1788
- "classmap": [
1789
- "src/"
1790
- ]
1791
- },
1792
- "notification-url": "https://packagist.org/downloads/",
1793
- "license": [
1794
- "BSD-3-Clause"
1795
- ],
1796
- "authors": [
1797
- {
1798
- "name": "Sebastian Bergmann",
1799
- "email": "sebastian@phpunit.de"
1800
- }
1801
- ],
1802
- "description": "Snapshotting of global state",
1803
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
1804
- "keywords": [
1805
- "global state"
1806
- ],
1807
- "time": "2015-10-12T03:26:01+00:00"
1808
- },
1809
- {
1810
- "name": "sebastian/object-enumerator",
1811
- "version": "2.0.1",
1812
- "source": {
1813
- "type": "git",
1814
- "url": "https://github.com/sebastianbergmann/object-enumerator.git",
1815
- "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
1816
- },
1817
- "dist": {
1818
- "type": "zip",
1819
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
1820
- "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
1821
- "shasum": ""
1822
- },
1823
- "require": {
1824
- "php": ">=5.6",
1825
- "sebastian/recursion-context": "~2.0"
1826
- },
1827
- "require-dev": {
1828
- "phpunit/phpunit": "~5"
1829
- },
1830
- "type": "library",
1831
- "extra": {
1832
- "branch-alias": {
1833
- "dev-master": "2.0.x-dev"
1834
- }
1835
- },
1836
- "autoload": {
1837
- "classmap": [
1838
- "src/"
1839
- ]
1840
- },
1841
- "notification-url": "https://packagist.org/downloads/",
1842
- "license": [
1843
- "BSD-3-Clause"
1844
- ],
1845
- "authors": [
1846
- {
1847
- "name": "Sebastian Bergmann",
1848
- "email": "sebastian@phpunit.de"
1849
- }
1850
- ],
1851
- "description": "Traverses array structures and object graphs to enumerate all referenced objects",
1852
- "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
1853
- "time": "2017-02-18T15:18:39+00:00"
1854
- },
1855
- {
1856
- "name": "sebastian/recursion-context",
1857
- "version": "2.0.0",
1858
- "source": {
1859
- "type": "git",
1860
- "url": "https://github.com/sebastianbergmann/recursion-context.git",
1861
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
1862
- },
1863
- "dist": {
1864
- "type": "zip",
1865
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
1866
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
1867
- "shasum": ""
1868
- },
1869
- "require": {
1870
- "php": ">=5.3.3"
1871
- },
1872
- "require-dev": {
1873
- "phpunit/phpunit": "~4.4"
1874
- },
1875
- "type": "library",
1876
- "extra": {
1877
- "branch-alias": {
1878
- "dev-master": "2.0.x-dev"
1879
- }
1880
- },
1881
- "autoload": {
1882
- "classmap": [
1883
- "src/"
1884
- ]
1885
- },
1886
- "notification-url": "https://packagist.org/downloads/",
1887
- "license": [
1888
- "BSD-3-Clause"
1889
- ],
1890
- "authors": [
1891
- {
1892
- "name": "Jeff Welch",
1893
- "email": "whatthejeff@gmail.com"
1894
- },
1895
- {
1896
- "name": "Sebastian Bergmann",
1897
- "email": "sebastian@phpunit.de"
1898
- },
1899
- {
1900
- "name": "Adam Harvey",
1901
- "email": "aharvey@php.net"
1902
- }
1903
- ],
1904
- "description": "Provides functionality to recursively process PHP variables",
1905
- "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1906
- "time": "2016-11-19T07:33:16+00:00"
1907
- },
1908
- {
1909
- "name": "sebastian/resource-operations",
1910
- "version": "1.0.0",
1911
- "source": {
1912
- "type": "git",
1913
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
1914
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
1915
- },
1916
- "dist": {
1917
- "type": "zip",
1918
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1919
- "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1920
- "shasum": ""
1921
- },
1922
- "require": {
1923
- "php": ">=5.6.0"
1924
- },
1925
- "type": "library",
1926
- "extra": {
1927
- "branch-alias": {
1928
- "dev-master": "1.0.x-dev"
1929
- }
1930
- },
1931
- "autoload": {
1932
- "classmap": [
1933
- "src/"
1934
- ]
1935
- },
1936
- "notification-url": "https://packagist.org/downloads/",
1937
- "license": [
1938
- "BSD-3-Clause"
1939
- ],
1940
- "authors": [
1941
- {
1942
- "name": "Sebastian Bergmann",
1943
- "email": "sebastian@phpunit.de"
1944
- }
1945
- ],
1946
- "description": "Provides a list of PHP built-in functions that operate on resources",
1947
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
1948
- "time": "2015-07-28T20:34:47+00:00"
1949
- },
1950
- {
1951
- "name": "sebastian/version",
1952
- "version": "2.0.1",
1953
- "source": {
1954
- "type": "git",
1955
- "url": "https://github.com/sebastianbergmann/version.git",
1956
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
1957
- },
1958
- "dist": {
1959
- "type": "zip",
1960
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
1961
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
1962
- "shasum": ""
1963
- },
1964
- "require": {
1965
- "php": ">=5.6"
1966
- },
1967
- "type": "library",
1968
- "extra": {
1969
- "branch-alias": {
1970
- "dev-master": "2.0.x-dev"
1971
- }
1972
- },
1973
- "autoload": {
1974
- "classmap": [
1975
- "src/"
1976
- ]
1977
- },
1978
- "notification-url": "https://packagist.org/downloads/",
1979
- "license": [
1980
- "BSD-3-Clause"
1981
- ],
1982
- "authors": [
1983
- {
1984
- "name": "Sebastian Bergmann",
1985
- "email": "sebastian@phpunit.de",
1986
- "role": "lead"
1987
- }
1988
- ],
1989
- "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1990
- "homepage": "https://github.com/sebastianbergmann/version",
1991
- "time": "2016-10-03T07:35:21+00:00"
1992
- },
1993
- {
1994
- "name": "squizlabs/php_codesniffer",
1995
- "version": "3.4.2",
1996
- "source": {
1997
- "type": "git",
1998
- "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
1999
- "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
2000
- },
2001
- "dist": {
2002
- "type": "zip",
2003
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
2004
- "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
2005
- "shasum": ""
2006
- },
2007
- "require": {
2008
- "ext-simplexml": "*",
2009
- "ext-tokenizer": "*",
2010
- "ext-xmlwriter": "*",
2011
- "php": ">=5.4.0"
2012
- },
2013
- "require-dev": {
2014
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2015
- },
2016
- "bin": [
2017
- "bin/phpcs",
2018
- "bin/phpcbf"
2019
- ],
2020
- "type": "library",
2021
- "extra": {
2022
- "branch-alias": {
2023
- "dev-master": "3.x-dev"
2024
- }
2025
- },
2026
- "notification-url": "https://packagist.org/downloads/",
2027
- "license": [
2028
- "BSD-3-Clause"
2029
- ],
2030
- "authors": [
2031
- {
2032
- "name": "Greg Sherwood",
2033
- "role": "lead"
2034
- }
2035
- ],
2036
- "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
2037
- "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
2038
- "keywords": [
2039
- "phpcs",
2040
- "standards"
2041
- ],
2042
- "time": "2019-04-10T23:49:02+00:00"
2043
- },
2044
- {
2045
- "name": "symfony/polyfill-ctype",
2046
- "version": "v1.12.0",
2047
- "source": {
2048
- "type": "git",
2049
- "url": "https://github.com/symfony/polyfill-ctype.git",
2050
- "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
2051
- },
2052
- "dist": {
2053
- "type": "zip",
2054
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
2055
- "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
2056
- "shasum": ""
2057
- },
2058
- "require": {
2059
- "php": ">=5.3.3"
2060
- },
2061
- "suggest": {
2062
- "ext-ctype": "For best performance"
2063
- },
2064
- "type": "library",
2065
- "extra": {
2066
- "branch-alias": {
2067
- "dev-master": "1.12-dev"
2068
- }
2069
- },
2070
- "autoload": {
2071
- "psr-4": {
2072
- "Symfony\\Polyfill\\Ctype\\": ""
2073
- },
2074
- "files": [
2075
- "bootstrap.php"
2076
- ]
2077
- },
2078
- "notification-url": "https://packagist.org/downloads/",
2079
- "license": [
2080
- "MIT"
2081
- ],
2082
- "authors": [
2083
- {
2084
- "name": "Gert de Pagter",
2085
- "email": "BackEndTea@gmail.com"
2086
- },
2087
- {
2088
- "name": "Symfony Community",
2089
- "homepage": "https://symfony.com/contributors"
2090
- }
2091
- ],
2092
- "description": "Symfony polyfill for ctype functions",
2093
- "homepage": "https://symfony.com",
2094
- "keywords": [
2095
- "compatibility",
2096
- "ctype",
2097
- "polyfill",
2098
- "portable"
2099
- ],
2100
- "time": "2019-08-06T08:03:45+00:00"
2101
- },
2102
- {
2103
- "name": "symfony/yaml",
2104
- "version": "v4.3.4",
2105
- "source": {
2106
- "type": "git",
2107
- "url": "https://github.com/symfony/yaml.git",
2108
- "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686"
2109
- },
2110
- "dist": {
2111
- "type": "zip",
2112
- "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
2113
- "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
2114
- "shasum": ""
2115
- },
2116
- "require": {
2117
- "php": "^7.1.3",
2118
- "symfony/polyfill-ctype": "~1.8"
2119
- },
2120
- "conflict": {
2121
- "symfony/console": "<3.4"
2122
- },
2123
- "require-dev": {
2124
- "symfony/console": "~3.4|~4.0"
2125
- },
2126
- "suggest": {
2127
- "symfony/console": "For validating YAML files using the lint command"
2128
- },
2129
- "type": "library",
2130
- "extra": {
2131
- "branch-alias": {
2132
- "dev-master": "4.3-dev"
2133
- }
2134
- },
2135
- "autoload": {
2136
- "psr-4": {
2137
- "Symfony\\Component\\Yaml\\": ""
2138
- },
2139
- "exclude-from-classmap": [
2140
- "/Tests/"
2141
- ]
2142
- },
2143
- "notification-url": "https://packagist.org/downloads/",
2144
- "license": [
2145
- "MIT"
2146
- ],
2147
- "authors": [
2148
- {
2149
- "name": "Fabien Potencier",
2150
- "email": "fabien@symfony.com"
2151
- },
2152
- {
2153
- "name": "Symfony Community",
2154
- "homepage": "https://symfony.com/contributors"
2155
- }
2156
- ],
2157
- "description": "Symfony Yaml Component",
2158
- "homepage": "https://symfony.com",
2159
- "time": "2019-08-20T14:27:59+00:00"
2160
- },
2161
- {
2162
- "name": "webmozart/assert",
2163
- "version": "1.5.0",
2164
- "source": {
2165
- "type": "git",
2166
- "url": "https://github.com/webmozart/assert.git",
2167
- "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
2168
- },
2169
- "dist": {
2170
- "type": "zip",
2171
- "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
2172
- "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
2173
- "shasum": ""
2174
- },
2175
- "require": {
2176
- "php": "^5.3.3 || ^7.0",
2177
- "symfony/polyfill-ctype": "^1.8"
2178
- },
2179
- "require-dev": {
2180
- "phpunit/phpunit": "^4.8.36 || ^7.5.13"
2181
- },
2182
- "type": "library",
2183
- "extra": {
2184
- "branch-alias": {
2185
- "dev-master": "1.3-dev"
2186
- }
2187
- },
2188
- "autoload": {
2189
- "psr-4": {
2190
- "Webmozart\\Assert\\": "src/"
2191
- }
2192
- },
2193
- "notification-url": "https://packagist.org/downloads/",
2194
- "license": [
2195
- "MIT"
2196
- ],
2197
- "authors": [
2198
- {
2199
- "name": "Bernhard Schussek",
2200
- "email": "bschussek@gmail.com"
2201
- }
2202
- ],
2203
- "description": "Assertions to validate method input/output with nice error messages.",
2204
- "keywords": [
2205
- "assert",
2206
- "check",
2207
- "validate"
2208
- ],
2209
- "time": "2019-08-24T08:43:50+00:00"
2210
- },
2211
- {
2212
- "name": "wp-coding-standards/wpcs",
2213
- "version": "2.1.1",
2214
- "source": {
2215
- "type": "git",
2216
- "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
2217
- "reference": "bd9c33152115e6741e3510ff7189605b35167908"
2218
- },
2219
- "dist": {
2220
- "type": "zip",
2221
- "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908",
2222
- "reference": "bd9c33152115e6741e3510ff7189605b35167908",
2223
- "shasum": ""
2224
- },
2225
- "require": {
2226
- "php": ">=5.4",
2227
- "squizlabs/php_codesniffer": "^3.3.1"
2228
- },
2229
- "require-dev": {
2230
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
2231
- "phpcompatibility/php-compatibility": "^9.0",
2232
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2233
- },
2234
- "suggest": {
2235
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
2236
- },
2237
- "type": "phpcodesniffer-standard",
2238
- "notification-url": "https://packagist.org/downloads/",
2239
- "license": [
2240
- "MIT"
2241
- ],
2242
- "authors": [
2243
- {
2244
- "name": "Contributors",
2245
- "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
2246
- }
2247
- ],
2248
- "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
2249
- "keywords": [
2250
- "phpcs",
2251
- "standards",
2252
- "wordpress"
2253
- ],
2254
- "time": "2019-05-21T02:50:00+00:00"
2255
- }
2256
- ],
2257
- "aliases": [],
2258
- "minimum-stability": "stable",
2259
- "stability-flags": [],
2260
- "prefer-stable": false,
2261
- "prefer-lowest": false,
2262
- "platform": {
2263
- "php": ">=5.6"
2264
- },
2265
- "platform-dev": []
2266
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "content-hash": "ad8bf18ef0f69ab2d4fbfa356dcb019f",
8
+ "packages": [
9
+ {
10
+ "name": "composer/installers",
11
+ "version": "v1.7.0",
12
+ "source": {
13
+ "type": "git",
14
+ "url": "https://github.com/composer/installers.git",
15
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
20
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
21
+ "shasum": ""
22
+ },
23
+ "require": {
24
+ "composer-plugin-api": "^1.0"
25
+ },
26
+ "replace": {
27
+ "roundcube/plugin-installer": "*",
28
+ "shama/baton": "*"
29
+ },
30
+ "require-dev": {
31
+ "composer/composer": "1.0.*@dev",
32
+ "phpunit/phpunit": "^4.8.36"
33
+ },
34
+ "type": "composer-plugin",
35
+ "extra": {
36
+ "class": "Composer\\Installers\\Plugin",
37
+ "branch-alias": {
38
+ "dev-master": "1.0-dev"
39
+ }
40
+ },
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
+ "Mautic",
69
+ "Maya",
70
+ "OXID",
71
+ "Plentymarkets",
72
+ "Porto",
73
+ "RadPHP",
74
+ "SMF",
75
+ "Thelia",
76
+ "Whmcs",
77
+ "WolfCMS",
78
+ "agl",
79
+ "aimeos",
80
+ "annotatecms",
81
+ "attogram",
82
+ "bitrix",
83
+ "cakephp",
84
+ "chef",
85
+ "cockpit",
86
+ "codeigniter",
87
+ "concrete5",
88
+ "croogo",
89
+ "dokuwiki",
90
+ "drupal",
91
+ "eZ Platform",
92
+ "elgg",
93
+ "expressionengine",
94
+ "fuelphp",
95
+ "grav",
96
+ "installer",
97
+ "itop",
98
+ "joomla",
99
+ "known",
100
+ "kohana",
101
+ "laravel",
102
+ "lavalite",
103
+ "lithium",
104
+ "magento",
105
+ "majima",
106
+ "mako",
107
+ "mediawiki",
108
+ "modulework",
109
+ "modx",
110
+ "moodle",
111
+ "osclass",
112
+ "phpbb",
113
+ "piwik",
114
+ "ppi",
115
+ "puppet",
116
+ "pxcms",
117
+ "reindex",
118
+ "roundcube",
119
+ "shopware",
120
+ "silverstripe",
121
+ "sydes",
122
+ "symfony",
123
+ "typo3",
124
+ "wordpress",
125
+ "yawik",
126
+ "zend",
127
+ "zikula"
128
+ ],
129
+ "time": "2019-08-12T15:00:31+00:00"
130
+ },
131
+ {
132
+ "name": "container-interop/container-interop",
133
+ "version": "1.2.0",
134
+ "source": {
135
+ "type": "git",
136
+ "url": "https://github.com/container-interop/container-interop.git",
137
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8"
138
+ },
139
+ "dist": {
140
+ "type": "zip",
141
+ "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8",
142
+ "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8",
143
+ "shasum": ""
144
+ },
145
+ "require": {
146
+ "psr/container": "^1.0"
147
+ },
148
+ "type": "library",
149
+ "autoload": {
150
+ "psr-4": {
151
+ "Interop\\Container\\": "src/Interop/Container/"
152
+ }
153
+ },
154
+ "notification-url": "https://packagist.org/downloads/",
155
+ "license": [
156
+ "MIT"
157
+ ],
158
+ "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
159
+ "homepage": "https://github.com/container-interop/container-interop",
160
+ "time": "2017-02-14T19:40:03+00:00"
161
+ },
162
+ {
163
+ "name": "league/container",
164
+ "version": "2.4.1",
165
+ "source": {
166
+ "type": "git",
167
+ "url": "https://github.com/thephpleague/container.git",
168
+ "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0"
169
+ },
170
+ "dist": {
171
+ "type": "zip",
172
+ "url": "https://api.github.com/repos/thephpleague/container/zipball/43f35abd03a12977a60ffd7095efd6a7808488c0",
173
+ "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0",
174
+ "shasum": ""
175
+ },
176
+ "require": {
177
+ "container-interop/container-interop": "^1.2",
178
+ "php": "^5.4.0 || ^7.0"
179
+ },
180
+ "provide": {
181
+ "container-interop/container-interop-implementation": "^1.2",
182
+ "psr/container-implementation": "^1.0"
183
+ },
184
+ "replace": {
185
+ "orno/di": "~2.0"
186
+ },
187
+ "require-dev": {
188
+ "phpunit/phpunit": "4.*"
189
+ },
190
+ "type": "library",
191
+ "extra": {
192
+ "branch-alias": {
193
+ "dev-2.x": "2.x-dev",
194
+ "dev-1.x": "1.x-dev"
195
+ }
196
+ },
197
+ "autoload": {
198
+ "psr-4": {
199
+ "League\\Container\\": "src"
200
+ }
201
+ },
202
+ "notification-url": "https://packagist.org/downloads/",
203
+ "license": [
204
+ "MIT"
205
+ ],
206
+ "authors": [
207
+ {
208
+ "name": "Phil Bennett",
209
+ "email": "philipobenito@gmail.com",
210
+ "homepage": "http://www.philipobenito.com",
211
+ "role": "Developer"
212
+ }
213
+ ],
214
+ "description": "A fast and intuitive dependency injection container.",
215
+ "homepage": "https://github.com/thephpleague/container",
216
+ "keywords": [
217
+ "container",
218
+ "dependency",
219
+ "di",
220
+ "injection",
221
+ "league",
222
+ "provider",
223
+ "service"
224
+ ],
225
+ "time": "2017-05-10T09:20:27+00:00"
226
+ },
227
+ {
228
+ "name": "psr/container",
229
+ "version": "1.0.0",
230
+ "source": {
231
+ "type": "git",
232
+ "url": "https://github.com/php-fig/container.git",
233
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
234
+ },
235
+ "dist": {
236
+ "type": "zip",
237
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
238
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
239
+ "shasum": ""
240
+ },
241
+ "require": {
242
+ "php": ">=5.3.0"
243
+ },
244
+ "type": "library",
245
+ "extra": {
246
+ "branch-alias": {
247
+ "dev-master": "1.0.x-dev"
248
+ }
249
+ },
250
+ "autoload": {
251
+ "psr-4": {
252
+ "Psr\\Container\\": "src/"
253
+ }
254
+ },
255
+ "notification-url": "https://packagist.org/downloads/",
256
+ "license": [
257
+ "MIT"
258
+ ],
259
+ "authors": [
260
+ {
261
+ "name": "PHP-FIG",
262
+ "homepage": "http://www.php-fig.org/"
263
+ }
264
+ ],
265
+ "description": "Common Container Interface (PHP FIG PSR-11)",
266
+ "homepage": "https://github.com/php-fig/container",
267
+ "keywords": [
268
+ "PSR-11",
269
+ "container",
270
+ "container-interface",
271
+ "container-interop",
272
+ "psr"
273
+ ],
274
+ "time": "2017-02-14T16:28:37+00:00"
275
+ },
276
+ {
277
+ "name": "wp-media/rocket-lazyload-common",
278
+ "version": "v2.5.1",
279
+ "source": {
280
+ "type": "git",
281
+ "url": "https://github.com/wp-media/rocket-lazyload-common.git",
282
+ "reference": "a5f1b59f822fd31bc7cb0fc368edecba96ceb71e"
283
+ },
284
+ "dist": {
285
+ "type": "zip",
286
+ "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/a5f1b59f822fd31bc7cb0fc368edecba96ceb71e",
287
+ "reference": "a5f1b59f822fd31bc7cb0fc368edecba96ceb71e",
288
+ "shasum": ""
289
+ },
290
+ "require": {
291
+ "php": ">=5.6"
292
+ },
293
+ "require-dev": {
294
+ "brain/monkey": "^2.0",
295
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
296
+ "doctrine/instantiator": "1.0.*",
297
+ "myclabs/deep-copy": "1.6.*",
298
+ "phpcompatibility/phpcompatibility-wp": "^2.0",
299
+ "phpdocumentor/reflection-docblock": "^3.3",
300
+ "phpunit/php-token-stream": "^1.4",
301
+ "phpunit/phpunit": "^5.7",
302
+ "symfony/yaml": "2.8.*",
303
+ "wp-coding-standards/wpcs": "^2.0.0"
304
+ },
305
+ "type": "library",
306
+ "autoload": {
307
+ "psr-4": {
308
+ "RocketLazyload\\": "src"
309
+ }
310
+ },
311
+ "notification-url": "https://packagist.org/downloads/",
312
+ "license": [
313
+ "GPL-3.0-or-later"
314
+ ],
315
+ "authors": [
316
+ {
317
+ "name": "WP Media",
318
+ "email": "contact@wp-media.me"
319
+ }
320
+ ],
321
+ "description": "Common Code between WP Rocket and Lazyload by WP Rocket",
322
+ "time": "2019-09-06T13:51:56+00:00"
323
+ }
324
+ ],
325
+ "packages-dev": [
326
+ {
327
+ "name": "antecedent/patchwork",
328
+ "version": "2.1.9",
329
+ "source": {
330
+ "type": "git",
331
+ "url": "https://github.com/antecedent/patchwork.git",
332
+ "reference": "1229bb22283177e196b572120de0772d9ee9baac"
333
+ },
334
+ "dist": {
335
+ "type": "zip",
336
+ "url": "https://api.github.com/repos/antecedent/patchwork/zipball/1229bb22283177e196b572120de0772d9ee9baac",
337
+ "reference": "1229bb22283177e196b572120de0772d9ee9baac",
338
+ "shasum": ""
339
+ },
340
+ "require": {
341
+ "php": ">=5.4.0"
342
+ },
343
+ "type": "library",
344
+ "notification-url": "https://packagist.org/downloads/",
345
+ "license": [
346
+ "MIT"
347
+ ],
348
+ "authors": [
349
+ {
350
+ "name": "Ignas Rudaitis",
351
+ "email": "ignas.rudaitis@gmail.com"
352
+ }
353
+ ],
354
+ "description": "Method redefinition (monkey-patching) functionality for PHP.",
355
+ "homepage": "http://patchwork2.org/",
356
+ "keywords": [
357
+ "aop",
358
+ "aspect",
359
+ "interception",
360
+ "monkeypatching",
361
+ "redefinition",
362
+ "runkit",
363
+ "testing"
364
+ ],
365
+ "time": "2019-08-18T15:18:18+00:00"
366
+ },
367
+ {
368
+ "name": "brain/monkey",
369
+ "version": "2.3.1",
370
+ "source": {
371
+ "type": "git",
372
+ "url": "https://github.com/Brain-WP/BrainMonkey.git",
373
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776"
374
+ },
375
+ "dist": {
376
+ "type": "zip",
377
+ "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
378
+ "reference": "74cdccad5dbb7edc59f59e1ad6ef392f83a34776",
379
+ "shasum": ""
380
+ },
381
+ "require": {
382
+ "antecedent/patchwork": "^2.0",
383
+ "mockery/mockery": ">=0.9 <2",
384
+ "php": ">=5.6.0"
385
+ },
386
+ "require-dev": {
387
+ "phpunit/phpunit": "~5.7.9"
388
+ },
389
+ "type": "library",
390
+ "extra": {
391
+ "branch-alias": {
392
+ "dev-version/1": "1.x-dev",
393
+ "dev-master": "2.0.x-dev"
394
+ }
395
+ },
396
+ "autoload": {
397
+ "psr-4": {
398
+ "Brain\\Monkey\\": "src/"
399
+ },
400
+ "files": [
401
+ "inc/api.php"
402
+ ]
403
+ },
404
+ "notification-url": "https://packagist.org/downloads/",
405
+ "license": [
406
+ "MIT"
407
+ ],
408
+ "authors": [
409
+ {
410
+ "name": "Giuseppe Mazzapica",
411
+ "role": "Developer",
412
+ "email": "giuseppe.mazzapica@gmail.com",
413
+ "homepage": "https://gmazzap.me"
414
+ }
415
+ ],
416
+ "description": "Mocking utility for PHP functions and WordPress plugin API",
417
+ "keywords": [
418
+ "Monkey Patching",
419
+ "interception",
420
+ "mock",
421
+ "mock functions",
422
+ "mockery",
423
+ "patchwork",
424
+ "redefinition",
425
+ "runkit",
426
+ "test",
427
+ "testing"
428
+ ],
429
+ "time": "2019-07-26T19:00:28+00:00"
430
+ },
431
+ {
432
+ "name": "coenjacobs/mozart",
433
+ "version": "0.4.0",
434
+ "source": {
435
+ "type": "git",
436
+ "url": "https://github.com/coenjacobs/mozart.git",
437
+ "reference": "2b31a5edf3a4d822e5b23cffd1e2e44875b1f0a5"
438
+ },
439
+ "dist": {
440
+ "type": "zip",
441
+ "url": "https://api.github.com/repos/coenjacobs/mozart/zipball/2b31a5edf3a4d822e5b23cffd1e2e44875b1f0a5",
442
+ "reference": "2b31a5edf3a4d822e5b23cffd1e2e44875b1f0a5",
443
+ "shasum": ""
444
+ },
445
+ "require": {
446
+ "league/flysystem": "^1.0",
447
+ "php": "^7.1",
448
+ "symfony/console": "^4",
449
+ "symfony/finder": "^4"
450
+ },
451
+ "require-dev": {
452
+ "coenjacobs/php-composter-phpcs": "^0.1.0",
453
+ "phpunit/phpunit": "^7.5"
454
+ },
455
+ "bin": [
456
+ "bin/mozart"
457
+ ],
458
+ "type": "library",
459
+ "autoload": {
460
+ "psr-4": {
461
+ "CoenJacobs\\Mozart\\": "src/"
462
+ }
463
+ },
464
+ "notification-url": "https://packagist.org/downloads/",
465
+ "license": [
466
+ "MIT"
467
+ ],
468
+ "authors": [
469
+ {
470
+ "name": "Coen Jacobs",
471
+ "email": "coenjacobs@gmail.com"
472
+ }
473
+ ],
474
+ "description": "Composes all dependencies as a package inside a WordPress plugin",
475
+ "time": "2019-06-27T09:52:52+00:00"
476
+ },
477
+ {
478
+ "name": "dealerdirect/phpcodesniffer-composer-installer",
479
+ "version": "v0.5.0",
480
+ "source": {
481
+ "type": "git",
482
+ "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
483
+ "reference": "e749410375ff6fb7a040a68878c656c2e610b132"
484
+ },
485
+ "dist": {
486
+ "type": "zip",
487
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
488
+ "reference": "e749410375ff6fb7a040a68878c656c2e610b132",
489
+ "shasum": ""
490
+ },
491
+ "require": {
492
+ "composer-plugin-api": "^1.0",
493
+ "php": "^5.3|^7",
494
+ "squizlabs/php_codesniffer": "^2|^3"
495
+ },
496
+ "require-dev": {
497
+ "composer/composer": "*",
498
+ "phpcompatibility/php-compatibility": "^9.0",
499
+ "sensiolabs/security-checker": "^4.1.0"
500
+ },
501
+ "type": "composer-plugin",
502
+ "extra": {
503
+ "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
504
+ },
505
+ "autoload": {
506
+ "psr-4": {
507
+ "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
508
+ }
509
+ },
510
+ "notification-url": "https://packagist.org/downloads/",
511
+ "license": [
512
+ "MIT"
513
+ ],
514
+ "authors": [
515
+ {
516
+ "name": "Franck Nijhof",
517
+ "email": "franck.nijhof@dealerdirect.com",
518
+ "homepage": "http://www.frenck.nl",
519
+ "role": "Developer / IT Manager"
520
+ }
521
+ ],
522
+ "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
523
+ "homepage": "http://www.dealerdirect.com",
524
+ "keywords": [
525
+ "PHPCodeSniffer",
526
+ "PHP_CodeSniffer",
527
+ "code quality",
528
+ "codesniffer",
529
+ "composer",
530
+ "installer",
531
+ "phpcs",
532
+ "plugin",
533
+ "qa",
534
+ "quality",
535
+ "standard",
536
+ "standards",
537
+ "style guide",
538
+ "stylecheck",
539
+ "tests"
540
+ ],
541
+ "time": "2018-10-26T13:21:45+00:00"
542
+ },
543
+ {
544
+ "name": "doctrine/instantiator",
545
+ "version": "1.2.0",
546
+ "source": {
547
+ "type": "git",
548
+ "url": "https://github.com/doctrine/instantiator.git",
549
+ "reference": "a2c590166b2133a4633738648b6b064edae0814a"
550
+ },
551
+ "dist": {
552
+ "type": "zip",
553
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
554
+ "reference": "a2c590166b2133a4633738648b6b064edae0814a",
555
+ "shasum": ""
556
+ },
557
+ "require": {
558
+ "php": "^7.1"
559
+ },
560
+ "require-dev": {
561
+ "doctrine/coding-standard": "^6.0",
562
+ "ext-pdo": "*",
563
+ "ext-phar": "*",
564
+ "phpbench/phpbench": "^0.13",
565
+ "phpstan/phpstan-phpunit": "^0.11",
566
+ "phpstan/phpstan-shim": "^0.11",
567
+ "phpunit/phpunit": "^7.0"
568
+ },
569
+ "type": "library",
570
+ "extra": {
571
+ "branch-alias": {
572
+ "dev-master": "1.2.x-dev"
573
+ }
574
+ },
575
+ "autoload": {
576
+ "psr-4": {
577
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
578
+ }
579
+ },
580
+ "notification-url": "https://packagist.org/downloads/",
581
+ "license": [
582
+ "MIT"
583
+ ],
584
+ "authors": [
585
+ {
586
+ "name": "Marco Pivetta",
587
+ "email": "ocramius@gmail.com",
588
+ "homepage": "http://ocramius.github.com/"
589
+ }
590
+ ],
591
+ "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
592
+ "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
593
+ "keywords": [
594
+ "constructor",
595
+ "instantiate"
596
+ ],
597
+ "time": "2019-03-17T17:37:11+00:00"
598
+ },
599
+ {
600
+ "name": "hamcrest/hamcrest-php",
601
+ "version": "v2.0.0",
602
+ "source": {
603
+ "type": "git",
604
+ "url": "https://github.com/hamcrest/hamcrest-php.git",
605
+ "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
606
+ },
607
+ "dist": {
608
+ "type": "zip",
609
+ "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
610
+ "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
611
+ "shasum": ""
612
+ },
613
+ "require": {
614
+ "php": "^5.3|^7.0"
615
+ },
616
+ "replace": {
617
+ "cordoval/hamcrest-php": "*",
618
+ "davedevelopment/hamcrest-php": "*",
619
+ "kodova/hamcrest-php": "*"
620
+ },
621
+ "require-dev": {
622
+ "phpunit/php-file-iterator": "1.3.3",
623
+ "phpunit/phpunit": "~4.0",
624
+ "satooshi/php-coveralls": "^1.0"
625
+ },
626
+ "type": "library",
627
+ "extra": {
628
+ "branch-alias": {
629
+ "dev-master": "2.0-dev"
630
+ }
631
+ },
632
+ "autoload": {
633
+ "classmap": [
634
+ "hamcrest"
635
+ ]
636
+ },
637
+ "notification-url": "https://packagist.org/downloads/",
638
+ "license": [
639
+ "BSD"
640
+ ],
641
+ "description": "This is the PHP port of Hamcrest Matchers",
642
+ "keywords": [
643
+ "test"
644
+ ],
645
+ "time": "2016-01-20T08:20:44+00:00"
646
+ },
647
+ {
648
+ "name": "league/flysystem",
649
+ "version": "1.0.46",
650
+ "source": {
651
+ "type": "git",
652
+ "url": "https://github.com/thephpleague/flysystem.git",
653
+ "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2"
654
+ },
655
+ "dist": {
656
+ "type": "zip",
657
+ "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2",
658
+ "reference": "f3e0d925c18b92cf3ce84ea5cc58d62a1762a2b2",
659
+ "shasum": ""
660
+ },
661
+ "require": {
662
+ "php": ">=5.5.9"
663
+ },
664
+ "conflict": {
665
+ "league/flysystem-sftp": "<1.0.6"
666
+ },
667
+ "require-dev": {
668
+ "ext-fileinfo": "*",
669
+ "phpspec/phpspec": "^3.4",
670
+ "phpunit/phpunit": "^5.7.10"
671
+ },
672
+ "suggest": {
673
+ "ext-fileinfo": "Required for MimeType",
674
+ "ext-ftp": "Allows you to use FTP server storage",
675
+ "ext-openssl": "Allows you to use FTPS server storage",
676
+ "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
677
+ "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
678
+ "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
679
+ "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
680
+ "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
681
+ "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
682
+ "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
683
+ "league/flysystem-webdav": "Allows you to use WebDAV storage",
684
+ "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
685
+ "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
686
+ "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
687
+ },
688
+ "type": "library",
689
+ "extra": {
690
+ "branch-alias": {
691
+ "dev-master": "1.1-dev"
692
+ }
693
+ },
694
+ "autoload": {
695
+ "psr-4": {
696
+ "League\\Flysystem\\": "src/"
697
+ }
698
+ },
699
+ "notification-url": "https://packagist.org/downloads/",
700
+ "license": [
701
+ "MIT"
702
+ ],
703
+ "authors": [
704
+ {
705
+ "name": "Frank de Jonge",
706
+ "email": "info@frenky.net"
707
+ }
708
+ ],
709
+ "description": "Filesystem abstraction: Many filesystems, one API.",
710
+ "keywords": [
711
+ "Cloud Files",
712
+ "WebDAV",
713
+ "abstraction",
714
+ "aws",
715
+ "cloud",
716
+ "copy.com",
717
+ "dropbox",
718
+ "file systems",
719
+ "files",
720
+ "filesystem",
721
+ "filesystems",
722
+ "ftp",
723
+ "rackspace",
724
+ "remote",
725
+ "s3",
726
+ "sftp",
727
+ "storage"
728
+ ],
729
+ "time": "2018-08-22T07:45:22+00:00"
730
+ },
731
+ {
732
+ "name": "mockery/mockery",
733
+ "version": "1.2.3",
734
+ "source": {
735
+ "type": "git",
736
+ "url": "https://github.com/mockery/mockery.git",
737
+ "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031"
738
+ },
739
+ "dist": {
740
+ "type": "zip",
741
+ "url": "https://api.github.com/repos/mockery/mockery/zipball/4eff936d83eb809bde2c57a3cea0ee9643769031",
742
+ "reference": "4eff936d83eb809bde2c57a3cea0ee9643769031",
743
+ "shasum": ""
744
+ },
745
+ "require": {
746
+ "hamcrest/hamcrest-php": "~2.0",
747
+ "lib-pcre": ">=7.0",
748
+ "php": ">=5.6.0"
749
+ },
750
+ "require-dev": {
751
+ "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
752
+ },
753
+ "type": "library",
754
+ "extra": {
755
+ "branch-alias": {
756
+ "dev-master": "1.0.x-dev"
757
+ }
758
+ },
759
+ "autoload": {
760
+ "psr-0": {
761
+ "Mockery": "library/"
762
+ }
763
+ },
764
+ "notification-url": "https://packagist.org/downloads/",
765
+ "license": [
766
+ "BSD-3-Clause"
767
+ ],
768
+ "authors": [
769
+ {
770
+ "name": "Pádraic Brady",
771
+ "email": "padraic.brady@gmail.com",
772
+ "homepage": "http://blog.astrumfutura.com"
773
+ },
774
+ {
775
+ "name": "Dave Marshall",
776
+ "email": "dave.marshall@atstsolutions.co.uk",
777
+ "homepage": "http://davedevelopment.co.uk"
778
+ }
779
+ ],
780
+ "description": "Mockery is a simple yet flexible PHP mock object framework",
781
+ "homepage": "https://github.com/mockery/mockery",
782
+ "keywords": [
783
+ "BDD",
784
+ "TDD",
785
+ "library",
786
+ "mock",
787
+ "mock objects",
788
+ "mockery",
789
+ "stub",
790
+ "test",
791
+ "test double",
792
+ "testing"
793
+ ],
794
+ "time": "2019-08-07T15:01:07+00:00"
795
+ },
796
+ {
797
+ "name": "myclabs/deep-copy",
798
+ "version": "1.9.3",
799
+ "source": {
800
+ "type": "git",
801
+ "url": "https://github.com/myclabs/DeepCopy.git",
802
+ "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea"
803
+ },
804
+ "dist": {
805
+ "type": "zip",
806
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/007c053ae6f31bba39dfa19a7726f56e9763bbea",
807
+ "reference": "007c053ae6f31bba39dfa19a7726f56e9763bbea",
808
+ "shasum": ""
809
+ },
810
+ "require": {
811
+ "php": "^7.1"
812
+ },
813
+ "replace": {
814
+ "myclabs/deep-copy": "self.version"
815
+ },
816
+ "require-dev": {
817
+ "doctrine/collections": "^1.0",
818
+ "doctrine/common": "^2.6",
819
+ "phpunit/phpunit": "^7.1"
820
+ },
821
+ "type": "library",
822
+ "autoload": {
823
+ "psr-4": {
824
+ "DeepCopy\\": "src/DeepCopy/"
825
+ },
826
+ "files": [
827
+ "src/DeepCopy/deep_copy.php"
828
+ ]
829
+ },
830
+ "notification-url": "https://packagist.org/downloads/",
831
+ "license": [
832
+ "MIT"
833
+ ],
834
+ "description": "Create deep copies (clones) of your objects",
835
+ "keywords": [
836
+ "clone",
837
+ "copy",
838
+ "duplicate",
839
+ "object",
840
+ "object graph"
841
+ ],
842
+ "time": "2019-08-09T12:45:53+00:00"
843
+ },
844
+ {
845
+ "name": "phpcompatibility/php-compatibility",
846
+ "version": "9.3.1",
847
+ "source": {
848
+ "type": "git",
849
+ "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
850
+ "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196"
851
+ },
852
+ "dist": {
853
+ "type": "zip",
854
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9999344e47e7af6b00e1a898eacc4e4368fb7196",
855
+ "reference": "9999344e47e7af6b00e1a898eacc4e4368fb7196",
856
+ "shasum": ""
857
+ },
858
+ "require": {
859
+ "php": ">=5.3",
860
+ "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
861
+ },
862
+ "conflict": {
863
+ "squizlabs/php_codesniffer": "2.6.2"
864
+ },
865
+ "require-dev": {
866
+ "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
867
+ },
868
+ "suggest": {
869
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
870
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
871
+ },
872
+ "type": "phpcodesniffer-standard",
873
+ "notification-url": "https://packagist.org/downloads/",
874
+ "license": [
875
+ "LGPL-3.0-or-later"
876
+ ],
877
+ "authors": [
878
+ {
879
+ "name": "Wim Godden",
880
+ "homepage": "https://github.com/wimg",
881
+ "role": "lead"
882
+ },
883
+ {
884
+ "name": "Juliette Reinders Folmer",
885
+ "homepage": "https://github.com/jrfnl",
886
+ "role": "lead"
887
+ },
888
+ {
889
+ "name": "Contributors",
890
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
891
+ }
892
+ ],
893
+ "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
894
+ "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
895
+ "keywords": [
896
+ "compatibility",
897
+ "phpcs",
898
+ "standards"
899
+ ],
900
+ "time": "2019-09-05T18:36:49+00:00"
901
+ },
902
+ {
903
+ "name": "phpcompatibility/phpcompatibility-paragonie",
904
+ "version": "1.1.0",
905
+ "source": {
906
+ "type": "git",
907
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
908
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936"
909
+ },
910
+ "dist": {
911
+ "type": "zip",
912
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
913
+ "reference": "b1bb79a7cab1fb856b56f1b5cf110b6e52d8e936",
914
+ "shasum": ""
915
+ },
916
+ "require": {
917
+ "phpcompatibility/php-compatibility": "^9.0"
918
+ },
919
+ "require-dev": {
920
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5",
921
+ "paragonie/random_compat": "dev-master",
922
+ "paragonie/sodium_compat": "dev-master"
923
+ },
924
+ "suggest": {
925
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
926
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
927
+ },
928
+ "type": "phpcodesniffer-standard",
929
+ "notification-url": "https://packagist.org/downloads/",
930
+ "license": [
931
+ "LGPL-3.0-or-later"
932
+ ],
933
+ "authors": [
934
+ {
935
+ "name": "Wim Godden",
936
+ "role": "lead"
937
+ },
938
+ {
939
+ "name": "Juliette Reinders Folmer",
940
+ "role": "lead"
941
+ }
942
+ ],
943
+ "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
944
+ "homepage": "http://phpcompatibility.com/",
945
+ "keywords": [
946
+ "compatibility",
947
+ "paragonie",
948
+ "phpcs",
949
+ "polyfill",
950
+ "standards"
951
+ ],
952
+ "time": "2019-08-28T15:58:19+00:00"
953
+ },
954
+ {
955
+ "name": "phpcompatibility/phpcompatibility-wp",
956
+ "version": "2.1.0",
957
+ "source": {
958
+ "type": "git",
959
+ "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
960
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
961
+ },
962
+ "dist": {
963
+ "type": "zip",
964
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
965
+ "reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
966
+ "shasum": ""
967
+ },
968
+ "require": {
969
+ "phpcompatibility/php-compatibility": "^9.0",
970
+ "phpcompatibility/phpcompatibility-paragonie": "^1.0"
971
+ },
972
+ "require-dev": {
973
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5"
974
+ },
975
+ "suggest": {
976
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
977
+ "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
978
+ },
979
+ "type": "phpcodesniffer-standard",
980
+ "notification-url": "https://packagist.org/downloads/",
981
+ "license": [
982
+ "LGPL-3.0-or-later"
983
+ ],
984
+ "authors": [
985
+ {
986
+ "name": "Wim Godden",
987
+ "role": "lead"
988
+ },
989
+ {
990
+ "name": "Juliette Reinders Folmer",
991
+ "role": "lead"
992
+ }
993
+ ],
994
+ "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
995
+ "homepage": "http://phpcompatibility.com/",
996
+ "keywords": [
997
+ "compatibility",
998
+ "phpcs",
999
+ "standards",
1000
+ "wordpress"
1001
+ ],
1002
+ "time": "2019-08-28T14:22:28+00:00"
1003
+ },
1004
+ {
1005
+ "name": "phpdocumentor/reflection-common",
1006
+ "version": "1.0.1",
1007
+ "source": {
1008
+ "type": "git",
1009
+ "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
1010
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
1011
+ },
1012
+ "dist": {
1013
+ "type": "zip",
1014
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
1015
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
1016
+ "shasum": ""
1017
+ },
1018
+ "require": {
1019
+ "php": ">=5.5"
1020
+ },
1021
+ "require-dev": {
1022
+ "phpunit/phpunit": "^4.6"
1023
+ },
1024
+ "type": "library",
1025
+ "extra": {
1026
+ "branch-alias": {
1027
+ "dev-master": "1.0.x-dev"
1028
+ }
1029
+ },
1030
+ "autoload": {
1031
+ "psr-4": {
1032
+ "phpDocumentor\\Reflection\\": [
1033
+ "src"
1034
+ ]
1035
+ }
1036
+ },
1037
+ "notification-url": "https://packagist.org/downloads/",
1038
+ "license": [
1039
+ "MIT"
1040
+ ],
1041
+ "authors": [
1042
+ {
1043
+ "name": "Jaap van Otterdijk",
1044
+ "email": "opensource@ijaap.nl"
1045
+ }
1046
+ ],
1047
+ "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
1048
+ "homepage": "http://www.phpdoc.org",
1049
+ "keywords": [
1050
+ "FQSEN",
1051
+ "phpDocumentor",
1052
+ "phpdoc",
1053
+ "reflection",
1054
+ "static analysis"
1055
+ ],
1056
+ "time": "2017-09-11T18:02:19+00:00"
1057
+ },
1058
+ {
1059
+ "name": "phpdocumentor/reflection-docblock",
1060
+ "version": "4.3.1",
1061
+ "source": {
1062
+ "type": "git",
1063
+ "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
1064
+ "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c"
1065
+ },
1066
+ "dist": {
1067
+ "type": "zip",
1068
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
1069
+ "reference": "bdd9f737ebc2a01c06ea7ff4308ec6697db9b53c",
1070
+ "shasum": ""
1071
+ },
1072
+ "require": {
1073
+ "php": "^7.0",
1074
+ "phpdocumentor/reflection-common": "^1.0.0",
1075
+ "phpdocumentor/type-resolver": "^0.4.0",
1076
+ "webmozart/assert": "^1.0"
1077
+ },
1078
+ "require-dev": {
1079
+ "doctrine/instantiator": "~1.0.5",
1080
+ "mockery/mockery": "^1.0",
1081
+ "phpunit/phpunit": "^6.4"
1082
+ },
1083
+ "type": "library",
1084
+ "extra": {
1085
+ "branch-alias": {
1086
+ "dev-master": "4.x-dev"
1087
+ }
1088
+ },
1089
+ "autoload": {
1090
+ "psr-4": {
1091
+ "phpDocumentor\\Reflection\\": [
1092
+ "src/"
1093
+ ]
1094
+ }
1095
+ },
1096
+ "notification-url": "https://packagist.org/downloads/",
1097
+ "license": [
1098
+ "MIT"
1099
+ ],
1100
+ "authors": [
1101
+ {
1102
+ "name": "Mike van Riel",
1103
+ "email": "me@mikevanriel.com"
1104
+ }
1105
+ ],
1106
+ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
1107
+ "time": "2019-04-30T17:48:53+00:00"
1108
+ },
1109
+ {
1110
+ "name": "phpdocumentor/type-resolver",
1111
+ "version": "0.4.0",
1112
+ "source": {
1113
+ "type": "git",
1114
+ "url": "https://github.com/phpDocumentor/TypeResolver.git",
1115
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
1116
+ },
1117
+ "dist": {
1118
+ "type": "zip",
1119
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
1120
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
1121
+ "shasum": ""
1122
+ },
1123
+ "require": {
1124
+ "php": "^5.5 || ^7.0",
1125
+ "phpdocumentor/reflection-common": "^1.0"
1126
+ },
1127
+ "require-dev": {
1128
+ "mockery/mockery": "^0.9.4",
1129
+ "phpunit/phpunit": "^5.2||^4.8.24"
1130
+ },
1131
+ "type": "library",
1132
+ "extra": {
1133
+ "branch-alias": {
1134
+ "dev-master": "1.0.x-dev"
1135
+ }
1136
+ },
1137
+ "autoload": {
1138
+ "psr-4": {
1139
+ "phpDocumentor\\Reflection\\": [
1140
+ "src/"
1141
+ ]
1142
+ }
1143
+ },
1144
+ "notification-url": "https://packagist.org/downloads/",
1145
+ "license": [
1146
+ "MIT"
1147
+ ],
1148
+ "authors": [
1149
+ {
1150
+ "name": "Mike van Riel",
1151
+ "email": "me@mikevanriel.com"
1152
+ }
1153
+ ],
1154
+ "time": "2017-07-14T14:27:02+00:00"
1155
+ },
1156
+ {
1157
+ "name": "phpspec/prophecy",
1158
+ "version": "1.8.1",
1159
+ "source": {
1160
+ "type": "git",
1161
+ "url": "https://github.com/phpspec/prophecy.git",
1162
+ "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76"
1163
+ },
1164
+ "dist": {
1165
+ "type": "zip",
1166
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
1167
+ "reference": "1927e75f4ed19131ec9bcc3b002e07fb1173ee76",
1168
+ "shasum": ""
1169
+ },
1170
+ "require": {
1171
+ "doctrine/instantiator": "^1.0.2",
1172
+ "php": "^5.3|^7.0",
1173
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
1174
+ "sebastian/comparator": "^1.1|^2.0|^3.0",
1175
+ "sebastian/recursion-context": "^1.0|^2.0|^3.0"
1176
+ },
1177
+ "require-dev": {
1178
+ "phpspec/phpspec": "^2.5|^3.2",
1179
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
1180
+ },
1181
+ "type": "library",
1182
+ "extra": {
1183
+ "branch-alias": {
1184
+ "dev-master": "1.8.x-dev"
1185
+ }
1186
+ },
1187
+ "autoload": {
1188
+ "psr-4": {
1189
+ "Prophecy\\": "src/Prophecy"
1190
+ }
1191
+ },
1192
+ "notification-url": "https://packagist.org/downloads/",
1193
+ "license": [
1194
+ "MIT"
1195
+ ],
1196
+ "authors": [
1197
+ {
1198
+ "name": "Konstantin Kudryashov",
1199
+ "email": "ever.zet@gmail.com",
1200
+ "homepage": "http://everzet.com"
1201
+ },
1202
+ {
1203
+ "name": "Marcello Duarte",
1204
+ "email": "marcello.duarte@gmail.com"
1205
+ }
1206
+ ],
1207
+ "description": "Highly opinionated mocking framework for PHP 5.3+",
1208
+ "homepage": "https://github.com/phpspec/prophecy",
1209
+ "keywords": [
1210
+ "Double",
1211
+ "Dummy",
1212
+ "fake",
1213
+ "mock",
1214
+ "spy",
1215
+ "stub"
1216
+ ],
1217
+ "time": "2019-06-13T12:50:23+00:00"
1218
+ },
1219
+ {
1220
+ "name": "phpunit/php-code-coverage",
1221
+ "version": "4.0.8",
1222
+ "source": {
1223
+ "type": "git",
1224
+ "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
1225
+ "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d"
1226
+ },
1227
+ "dist": {
1228
+ "type": "zip",
1229
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
1230
+ "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
1231
+ "shasum": ""
1232
+ },
1233
+ "require": {
1234
+ "ext-dom": "*",
1235
+ "ext-xmlwriter": "*",
1236
+ "php": "^5.6 || ^7.0",
1237
+ "phpunit/php-file-iterator": "^1.3",
1238
+ "phpunit/php-text-template": "^1.2",
1239
+ "phpunit/php-token-stream": "^1.4.2 || ^2.0",
1240
+ "sebastian/code-unit-reverse-lookup": "^1.0",
1241
+ "sebastian/environment": "^1.3.2 || ^2.0",
1242
+ "sebastian/version": "^1.0 || ^2.0"
1243
+ },
1244
+ "require-dev": {
1245
+ "ext-xdebug": "^2.1.4",
1246
+ "phpunit/phpunit": "^5.7"
1247
+ },
1248
+ "suggest": {
1249
+ "ext-xdebug": "^2.5.1"
1250
+ },
1251
+ "type": "library",
1252
+ "extra": {
1253
+ "branch-alias": {
1254
+ "dev-master": "4.0.x-dev"
1255
+ }
1256
+ },
1257
+ "autoload": {
1258
+ "classmap": [
1259
+ "src/"
1260
+ ]
1261
+ },
1262
+ "notification-url": "https://packagist.org/downloads/",
1263
+ "license": [
1264
+ "BSD-3-Clause"
1265
+ ],
1266
+ "authors": [
1267
+ {
1268
+ "name": "Sebastian Bergmann",
1269
+ "email": "sb@sebastian-bergmann.de",
1270
+ "role": "lead"
1271
+ }
1272
+ ],
1273
+ "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
1274
+ "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
1275
+ "keywords": [
1276
+ "coverage",
1277
+ "testing",
1278
+ "xunit"
1279
+ ],
1280
+ "time": "2017-04-02T07:44:40+00:00"
1281
+ },
1282
+ {
1283
+ "name": "phpunit/php-file-iterator",
1284
+ "version": "1.4.5",
1285
+ "source": {
1286
+ "type": "git",
1287
+ "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
1288
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
1289
+ },
1290
+ "dist": {
1291
+ "type": "zip",
1292
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
1293
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
1294
+ "shasum": ""
1295
+ },
1296
+ "require": {
1297
+ "php": ">=5.3.3"
1298
+ },
1299
+ "type": "library",
1300
+ "extra": {
1301
+ "branch-alias": {
1302
+ "dev-master": "1.4.x-dev"
1303
+ }
1304
+ },
1305
+ "autoload": {
1306
+ "classmap": [
1307
+ "src/"
1308
+ ]
1309
+ },
1310
+ "notification-url": "https://packagist.org/downloads/",
1311
+ "license": [
1312
+ "BSD-3-Clause"
1313
+ ],
1314
+ "authors": [
1315
+ {
1316
+ "name": "Sebastian Bergmann",
1317
+ "email": "sb@sebastian-bergmann.de",
1318
+ "role": "lead"
1319
+ }
1320
+ ],
1321
+ "description": "FilterIterator implementation that filters files based on a list of suffixes.",
1322
+ "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
1323
+ "keywords": [
1324
+ "filesystem",
1325
+ "iterator"
1326
+ ],
1327
+ "time": "2017-11-27T13:52:08+00:00"
1328
+ },
1329
+ {
1330
+ "name": "phpunit/php-text-template",
1331
+ "version": "1.2.1",
1332
+ "source": {
1333
+ "type": "git",
1334
+ "url": "https://github.com/sebastianbergmann/php-text-template.git",
1335
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
1336
+ },
1337
+ "dist": {
1338
+ "type": "zip",
1339
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1340
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
1341
+ "shasum": ""
1342
+ },
1343
+ "require": {
1344
+ "php": ">=5.3.3"
1345
+ },
1346
+ "type": "library",
1347
+ "autoload": {
1348
+ "classmap": [
1349
+ "src/"
1350
+ ]
1351
+ },
1352
+ "notification-url": "https://packagist.org/downloads/",
1353
+ "license": [
1354
+ "BSD-3-Clause"
1355
+ ],
1356
+ "authors": [
1357
+ {
1358
+ "name": "Sebastian Bergmann",
1359
+ "email": "sebastian@phpunit.de",
1360
+ "role": "lead"
1361
+ }
1362
+ ],
1363
+ "description": "Simple template engine.",
1364
+ "homepage": "https://github.com/sebastianbergmann/php-text-template/",
1365
+ "keywords": [
1366
+ "template"
1367
+ ],
1368
+ "time": "2015-06-21T13:50:34+00:00"
1369
+ },
1370
+ {
1371
+ "name": "phpunit/php-timer",
1372
+ "version": "1.0.9",
1373
+ "source": {
1374
+ "type": "git",
1375
+ "url": "https://github.com/sebastianbergmann/php-timer.git",
1376
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f"
1377
+ },
1378
+ "dist": {
1379
+ "type": "zip",
1380
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1381
+ "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f",
1382
+ "shasum": ""
1383
+ },
1384
+ "require": {
1385
+ "php": "^5.3.3 || ^7.0"
1386
+ },
1387
+ "require-dev": {
1388
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1389
+ },
1390
+ "type": "library",
1391
+ "extra": {
1392
+ "branch-alias": {
1393
+ "dev-master": "1.0-dev"
1394
+ }
1395
+ },
1396
+ "autoload": {
1397
+ "classmap": [
1398
+ "src/"
1399
+ ]
1400
+ },
1401
+ "notification-url": "https://packagist.org/downloads/",
1402
+ "license": [
1403
+ "BSD-3-Clause"
1404
+ ],
1405
+ "authors": [
1406
+ {
1407
+ "name": "Sebastian Bergmann",
1408
+ "email": "sb@sebastian-bergmann.de",
1409
+ "role": "lead"
1410
+ }
1411
+ ],
1412
+ "description": "Utility class for timing",
1413
+ "homepage": "https://github.com/sebastianbergmann/php-timer/",
1414
+ "keywords": [
1415
+ "timer"
1416
+ ],
1417
+ "time": "2017-02-26T11:10:40+00:00"
1418
+ },
1419
+ {
1420
+ "name": "phpunit/php-token-stream",
1421
+ "version": "2.0.2",
1422
+ "source": {
1423
+ "type": "git",
1424
+ "url": "https://github.com/sebastianbergmann/php-token-stream.git",
1425
+ "reference": "791198a2c6254db10131eecfe8c06670700904db"
1426
+ },
1427
+ "dist": {
1428
+ "type": "zip",
1429
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
1430
+ "reference": "791198a2c6254db10131eecfe8c06670700904db",
1431
+ "shasum": ""
1432
+ },
1433
+ "require": {
1434
+ "ext-tokenizer": "*",
1435
+ "php": "^7.0"
1436
+ },
1437
+ "require-dev": {
1438
+ "phpunit/phpunit": "^6.2.4"
1439
+ },
1440
+ "type": "library",
1441
+ "extra": {
1442
+ "branch-alias": {
1443
+ "dev-master": "2.0-dev"
1444
+ }
1445
+ },
1446
+ "autoload": {
1447
+ "classmap": [
1448
+ "src/"
1449
+ ]
1450
+ },
1451
+ "notification-url": "https://packagist.org/downloads/",
1452
+ "license": [
1453
+ "BSD-3-Clause"
1454
+ ],
1455
+ "authors": [
1456
+ {
1457
+ "name": "Sebastian Bergmann",
1458
+ "email": "sebastian@phpunit.de"
1459
+ }
1460
+ ],
1461
+ "description": "Wrapper around PHP's tokenizer extension.",
1462
+ "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
1463
+ "keywords": [
1464
+ "tokenizer"
1465
+ ],
1466
+ "time": "2017-11-27T05:48:46+00:00"
1467
+ },
1468
+ {
1469
+ "name": "phpunit/phpunit",
1470
+ "version": "5.7.27",
1471
+ "source": {
1472
+ "type": "git",
1473
+ "url": "https://github.com/sebastianbergmann/phpunit.git",
1474
+ "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c"
1475
+ },
1476
+ "dist": {
1477
+ "type": "zip",
1478
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
1479
+ "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c",
1480
+ "shasum": ""
1481
+ },
1482
+ "require": {
1483
+ "ext-dom": "*",
1484
+ "ext-json": "*",
1485
+ "ext-libxml": "*",
1486
+ "ext-mbstring": "*",
1487
+ "ext-xml": "*",
1488
+ "myclabs/deep-copy": "~1.3",
1489
+ "php": "^5.6 || ^7.0",
1490
+ "phpspec/prophecy": "^1.6.2",
1491
+ "phpunit/php-code-coverage": "^4.0.4",
1492
+ "phpunit/php-file-iterator": "~1.4",
1493
+ "phpunit/php-text-template": "~1.2",
1494
+ "phpunit/php-timer": "^1.0.6",
1495
+ "phpunit/phpunit-mock-objects": "^3.2",
1496
+ "sebastian/comparator": "^1.2.4",
1497
+ "sebastian/diff": "^1.4.3",
1498
+ "sebastian/environment": "^1.3.4 || ^2.0",
1499
+ "sebastian/exporter": "~2.0",
1500
+ "sebastian/global-state": "^1.1",
1501
+ "sebastian/object-enumerator": "~2.0",
1502
+ "sebastian/resource-operations": "~1.0",
1503
+ "sebastian/version": "^1.0.6|^2.0.1",
1504
+ "symfony/yaml": "~2.1|~3.0|~4.0"
1505
+ },
1506
+ "conflict": {
1507
+ "phpdocumentor/reflection-docblock": "3.0.2"
1508
+ },
1509
+ "require-dev": {
1510
+ "ext-pdo": "*"
1511
+ },
1512
+ "suggest": {
1513
+ "ext-xdebug": "*",
1514
+ "phpunit/php-invoker": "~1.1"
1515
+ },
1516
+ "bin": [
1517
+ "phpunit"
1518
+ ],
1519
+ "type": "library",
1520
+ "extra": {
1521
+ "branch-alias": {
1522
+ "dev-master": "5.7.x-dev"
1523
+ }
1524
+ },
1525
+ "autoload": {
1526
+ "classmap": [
1527
+ "src/"
1528
+ ]
1529
+ },
1530
+ "notification-url": "https://packagist.org/downloads/",
1531
+ "license": [
1532
+ "BSD-3-Clause"
1533
+ ],
1534
+ "authors": [
1535
+ {
1536
+ "name": "Sebastian Bergmann",
1537
+ "email": "sebastian@phpunit.de",
1538
+ "role": "lead"
1539
+ }
1540
+ ],
1541
+ "description": "The PHP Unit Testing framework.",
1542
+ "homepage": "https://phpunit.de/",
1543
+ "keywords": [
1544
+ "phpunit",
1545
+ "testing",
1546
+ "xunit"
1547
+ ],
1548
+ "time": "2018-02-01T05:50:59+00:00"
1549
+ },
1550
+ {
1551
+ "name": "phpunit/phpunit-mock-objects",
1552
+ "version": "3.4.4",
1553
+ "source": {
1554
+ "type": "git",
1555
+ "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
1556
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118"
1557
+ },
1558
+ "dist": {
1559
+ "type": "zip",
1560
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118",
1561
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118",
1562
+ "shasum": ""
1563
+ },
1564
+ "require": {
1565
+ "doctrine/instantiator": "^1.0.2",
1566
+ "php": "^5.6 || ^7.0",
1567
+ "phpunit/php-text-template": "^1.2",
1568
+ "sebastian/exporter": "^1.2 || ^2.0"
1569
+ },
1570
+ "conflict": {
1571
+ "phpunit/phpunit": "<5.4.0"
1572
+ },
1573
+ "require-dev": {
1574
+ "phpunit/phpunit": "^5.4"
1575
+ },
1576
+ "suggest": {
1577
+ "ext-soap": "*"
1578
+ },
1579
+ "type": "library",
1580
+ "extra": {
1581
+ "branch-alias": {
1582
+ "dev-master": "3.2.x-dev"
1583
+ }
1584
+ },
1585
+ "autoload": {
1586
+ "classmap": [
1587
+ "src/"
1588
+ ]
1589
+ },
1590
+ "notification-url": "https://packagist.org/downloads/",
1591
+ "license": [
1592
+ "BSD-3-Clause"
1593
+ ],
1594
+ "authors": [
1595
+ {
1596
+ "name": "Sebastian Bergmann",
1597
+ "email": "sb@sebastian-bergmann.de",
1598
+ "role": "lead"
1599
+ }
1600
+ ],
1601
+ "description": "Mock Object library for PHPUnit",
1602
+ "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
1603
+ "keywords": [
1604
+ "mock",
1605
+ "xunit"
1606
+ ],
1607
+ "abandoned": true,
1608
+ "time": "2017-06-30T09:13:00+00:00"
1609
+ },
1610
+ {
1611
+ "name": "sebastian/code-unit-reverse-lookup",
1612
+ "version": "1.0.1",
1613
+ "source": {
1614
+ "type": "git",
1615
+ "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
1616
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
1617
+ },
1618
+ "dist": {
1619
+ "type": "zip",
1620
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1621
+ "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
1622
+ "shasum": ""
1623
+ },
1624
+ "require": {
1625
+ "php": "^5.6 || ^7.0"
1626
+ },
1627
+ "require-dev": {
1628
+ "phpunit/phpunit": "^5.7 || ^6.0"
1629
+ },
1630
+ "type": "library",
1631
+ "extra": {
1632
+ "branch-alias": {
1633
+ "dev-master": "1.0.x-dev"
1634
+ }
1635
+ },
1636
+ "autoload": {
1637
+ "classmap": [
1638
+ "src/"
1639
+ ]
1640
+ },
1641
+ "notification-url": "https://packagist.org/downloads/",
1642
+ "license": [
1643
+ "BSD-3-Clause"
1644
+ ],
1645
+ "authors": [
1646
+ {
1647
+ "name": "Sebastian Bergmann",
1648
+ "email": "sebastian@phpunit.de"
1649
+ }
1650
+ ],
1651
+ "description": "Looks up which function or method a line of code belongs to",
1652
+ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
1653
+ "time": "2017-03-04T06:30:41+00:00"
1654
+ },
1655
+ {
1656
+ "name": "sebastian/comparator",
1657
+ "version": "1.2.4",
1658
+ "source": {
1659
+ "type": "git",
1660
+ "url": "https://github.com/sebastianbergmann/comparator.git",
1661
+ "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
1662
+ },
1663
+ "dist": {
1664
+ "type": "zip",
1665
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1666
+ "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
1667
+ "shasum": ""
1668
+ },
1669
+ "require": {
1670
+ "php": ">=5.3.3",
1671
+ "sebastian/diff": "~1.2",
1672
+ "sebastian/exporter": "~1.2 || ~2.0"
1673
+ },
1674
+ "require-dev": {
1675
+ "phpunit/phpunit": "~4.4"
1676
+ },
1677
+ "type": "library",
1678
+ "extra": {
1679
+ "branch-alias": {
1680
+ "dev-master": "1.2.x-dev"
1681
+ }
1682
+ },
1683
+ "autoload": {
1684
+ "classmap": [
1685
+ "src/"
1686
+ ]
1687
+ },
1688
+ "notification-url": "https://packagist.org/downloads/",
1689
+ "license": [
1690
+ "BSD-3-Clause"
1691
+ ],
1692
+ "authors": [
1693
+ {
1694
+ "name": "Jeff Welch",
1695
+ "email": "whatthejeff@gmail.com"
1696
+ },
1697
+ {
1698
+ "name": "Volker Dusch",
1699
+ "email": "github@wallbash.com"
1700
+ },
1701
+ {
1702
+ "name": "Bernhard Schussek",
1703
+ "email": "bschussek@2bepublished.at"
1704
+ },
1705
+ {
1706
+ "name": "Sebastian Bergmann",
1707
+ "email": "sebastian@phpunit.de"
1708
+ }
1709
+ ],
1710
+ "description": "Provides the functionality to compare PHP values for equality",
1711
+ "homepage": "http://www.github.com/sebastianbergmann/comparator",
1712
+ "keywords": [
1713
+ "comparator",
1714
+ "compare",
1715
+ "equality"
1716
+ ],
1717
+ "time": "2017-01-29T09:50:25+00:00"
1718
+ },
1719
+ {
1720
+ "name": "sebastian/diff",
1721
+ "version": "1.4.3",
1722
+ "source": {
1723
+ "type": "git",
1724
+ "url": "https://github.com/sebastianbergmann/diff.git",
1725
+ "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
1726
+ },
1727
+ "dist": {
1728
+ "type": "zip",
1729
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1730
+ "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
1731
+ "shasum": ""
1732
+ },
1733
+ "require": {
1734
+ "php": "^5.3.3 || ^7.0"
1735
+ },
1736
+ "require-dev": {
1737
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
1738
+ },
1739
+ "type": "library",
1740
+ "extra": {
1741
+ "branch-alias": {
1742
+ "dev-master": "1.4-dev"
1743
+ }
1744
+ },
1745
+ "autoload": {
1746
+ "classmap": [
1747
+ "src/"
1748
+ ]
1749
+ },
1750
+ "notification-url": "https://packagist.org/downloads/",
1751
+ "license": [
1752
+ "BSD-3-Clause"
1753
+ ],
1754
+ "authors": [
1755
+ {
1756
+ "name": "Kore Nordmann",
1757
+ "email": "mail@kore-nordmann.de"
1758
+ },
1759
+ {
1760
+ "name": "Sebastian Bergmann",
1761
+ "email": "sebastian@phpunit.de"
1762
+ }
1763
+ ],
1764
+ "description": "Diff implementation",
1765
+ "homepage": "https://github.com/sebastianbergmann/diff",
1766
+ "keywords": [
1767
+ "diff"
1768
+ ],
1769
+ "time": "2017-05-22T07:24:03+00:00"
1770
+ },
1771
+ {
1772
+ "name": "sebastian/environment",
1773
+ "version": "2.0.0",
1774
+ "source": {
1775
+ "type": "git",
1776
+ "url": "https://github.com/sebastianbergmann/environment.git",
1777
+ "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
1778
+ },
1779
+ "dist": {
1780
+ "type": "zip",
1781
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
1782
+ "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
1783
+ "shasum": ""
1784
+ },
1785
+ "require": {
1786
+ "php": "^5.6 || ^7.0"
1787
+ },
1788
+ "require-dev": {
1789
+ "phpunit/phpunit": "^5.0"
1790
+ },
1791
+ "type": "library",
1792
+ "extra": {
1793
+ "branch-alias": {
1794
+ "dev-master": "2.0.x-dev"
1795
+ }
1796
+ },
1797
+ "autoload": {
1798
+ "classmap": [
1799
+ "src/"
1800
+ ]
1801
+ },
1802
+ "notification-url": "https://packagist.org/downloads/",
1803
+ "license": [
1804
+ "BSD-3-Clause"
1805
+ ],
1806
+ "authors": [
1807
+ {
1808
+ "name": "Sebastian Bergmann",
1809
+ "email": "sebastian@phpunit.de"
1810
+ }
1811
+ ],
1812
+ "description": "Provides functionality to handle HHVM/PHP environments",
1813
+ "homepage": "http://www.github.com/sebastianbergmann/environment",
1814
+ "keywords": [
1815
+ "Xdebug",
1816
+ "environment",
1817
+ "hhvm"
1818
+ ],
1819
+ "time": "2016-11-26T07:53:53+00:00"
1820
+ },
1821
+ {
1822
+ "name": "sebastian/exporter",
1823
+ "version": "2.0.0",
1824
+ "source": {
1825
+ "type": "git",
1826
+ "url": "https://github.com/sebastianbergmann/exporter.git",
1827
+ "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
1828
+ },
1829
+ "dist": {
1830
+ "type": "zip",
1831
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
1832
+ "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
1833
+ "shasum": ""
1834
+ },
1835
+ "require": {
1836
+ "php": ">=5.3.3",
1837
+ "sebastian/recursion-context": "~2.0"
1838
+ },
1839
+ "require-dev": {
1840
+ "ext-mbstring": "*",
1841
+ "phpunit/phpunit": "~4.4"
1842
+ },
1843
+ "type": "library",
1844
+ "extra": {
1845
+ "branch-alias": {
1846
+ "dev-master": "2.0.x-dev"
1847
+ }
1848
+ },
1849
+ "autoload": {
1850
+ "classmap": [
1851
+ "src/"
1852
+ ]
1853
+ },
1854
+ "notification-url": "https://packagist.org/downloads/",
1855
+ "license": [
1856
+ "BSD-3-Clause"
1857
+ ],
1858
+ "authors": [
1859
+ {
1860
+ "name": "Jeff Welch",
1861
+ "email": "whatthejeff@gmail.com"
1862
+ },
1863
+ {
1864
+ "name": "Volker Dusch",
1865
+ "email": "github@wallbash.com"
1866
+ },
1867
+ {
1868
+ "name": "Bernhard Schussek",
1869
+ "email": "bschussek@2bepublished.at"
1870
+ },
1871
+ {
1872
+ "name": "Sebastian Bergmann",
1873
+ "email": "sebastian@phpunit.de"
1874
+ },
1875
+ {
1876
+ "name": "Adam Harvey",
1877
+ "email": "aharvey@php.net"
1878
+ }
1879
+ ],
1880
+ "description": "Provides the functionality to export PHP variables for visualization",
1881
+ "homepage": "http://www.github.com/sebastianbergmann/exporter",
1882
+ "keywords": [
1883
+ "export",
1884
+ "exporter"
1885
+ ],
1886
+ "time": "2016-11-19T08:54:04+00:00"
1887
+ },
1888
+ {
1889
+ "name": "sebastian/global-state",
1890
+ "version": "1.1.1",
1891
+ "source": {
1892
+ "type": "git",
1893
+ "url": "https://github.com/sebastianbergmann/global-state.git",
1894
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
1895
+ },
1896
+ "dist": {
1897
+ "type": "zip",
1898
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
1899
+ "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
1900
+ "shasum": ""
1901
+ },
1902
+ "require": {
1903
+ "php": ">=5.3.3"
1904
+ },
1905
+ "require-dev": {
1906
+ "phpunit/phpunit": "~4.2"
1907
+ },
1908
+ "suggest": {
1909
+ "ext-uopz": "*"
1910
+ },
1911
+ "type": "library",
1912
+ "extra": {
1913
+ "branch-alias": {
1914
+ "dev-master": "1.0-dev"
1915
+ }
1916
+ },
1917
+ "autoload": {
1918
+ "classmap": [
1919
+ "src/"
1920
+ ]
1921
+ },
1922
+ "notification-url": "https://packagist.org/downloads/",
1923
+ "license": [
1924
+ "BSD-3-Clause"
1925
+ ],
1926
+ "authors": [
1927
+ {
1928
+ "name": "Sebastian Bergmann",
1929
+ "email": "sebastian@phpunit.de"
1930
+ }
1931
+ ],
1932
+ "description": "Snapshotting of global state",
1933
+ "homepage": "http://www.github.com/sebastianbergmann/global-state",
1934
+ "keywords": [
1935
+ "global state"
1936
+ ],
1937
+ "time": "2015-10-12T03:26:01+00:00"
1938
+ },
1939
+ {
1940
+ "name": "sebastian/object-enumerator",
1941
+ "version": "2.0.1",
1942
+ "source": {
1943
+ "type": "git",
1944
+ "url": "https://github.com/sebastianbergmann/object-enumerator.git",
1945
+ "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
1946
+ },
1947
+ "dist": {
1948
+ "type": "zip",
1949
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
1950
+ "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
1951
+ "shasum": ""
1952
+ },
1953
+ "require": {
1954
+ "php": ">=5.6",
1955
+ "sebastian/recursion-context": "~2.0"
1956
+ },
1957
+ "require-dev": {
1958
+ "phpunit/phpunit": "~5"
1959
+ },
1960
+ "type": "library",
1961
+ "extra": {
1962
+ "branch-alias": {
1963
+ "dev-master": "2.0.x-dev"
1964
+ }
1965
+ },
1966
+ "autoload": {
1967
+ "classmap": [
1968
+ "src/"
1969
+ ]
1970
+ },
1971
+ "notification-url": "https://packagist.org/downloads/",
1972
+ "license": [
1973
+ "BSD-3-Clause"
1974
+ ],
1975
+ "authors": [
1976
+ {
1977
+ "name": "Sebastian Bergmann",
1978
+ "email": "sebastian@phpunit.de"
1979
+ }
1980
+ ],
1981
+ "description": "Traverses array structures and object graphs to enumerate all referenced objects",
1982
+ "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
1983
+ "time": "2017-02-18T15:18:39+00:00"
1984
+ },
1985
+ {
1986
+ "name": "sebastian/recursion-context",
1987
+ "version": "2.0.0",
1988
+ "source": {
1989
+ "type": "git",
1990
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
1991
+ "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
1992
+ },
1993
+ "dist": {
1994
+ "type": "zip",
1995
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
1996
+ "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
1997
+ "shasum": ""
1998
+ },
1999
+ "require": {
2000
+ "php": ">=5.3.3"
2001
+ },
2002
+ "require-dev": {
2003
+ "phpunit/phpunit": "~4.4"
2004
+ },
2005
+ "type": "library",
2006
+ "extra": {
2007
+ "branch-alias": {
2008
+ "dev-master": "2.0.x-dev"
2009
+ }
2010
+ },
2011
+ "autoload": {
2012
+ "classmap": [
2013
+ "src/"
2014
+ ]
2015
+ },
2016
+ "notification-url": "https://packagist.org/downloads/",
2017
+ "license": [
2018
+ "BSD-3-Clause"
2019
+ ],
2020
+ "authors": [
2021
+ {
2022
+ "name": "Jeff Welch",
2023
+ "email": "whatthejeff@gmail.com"
2024
+ },
2025
+ {
2026
+ "name": "Sebastian Bergmann",
2027
+ "email": "sebastian@phpunit.de"
2028
+ },
2029
+ {
2030
+ "name": "Adam Harvey",
2031
+ "email": "aharvey@php.net"
2032
+ }
2033
+ ],
2034
+ "description": "Provides functionality to recursively process PHP variables",
2035
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
2036
+ "time": "2016-11-19T07:33:16+00:00"
2037
+ },
2038
+ {
2039
+ "name": "sebastian/resource-operations",
2040
+ "version": "1.0.0",
2041
+ "source": {
2042
+ "type": "git",
2043
+ "url": "https://github.com/sebastianbergmann/resource-operations.git",
2044
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
2045
+ },
2046
+ "dist": {
2047
+ "type": "zip",
2048
+ "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
2049
+ "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
2050
+ "shasum": ""
2051
+ },
2052
+ "require": {
2053
+ "php": ">=5.6.0"
2054
+ },
2055
+ "type": "library",
2056
+ "extra": {
2057
+ "branch-alias": {
2058
+ "dev-master": "1.0.x-dev"
2059
+ }
2060
+ },
2061
+ "autoload": {
2062
+ "classmap": [
2063
+ "src/"
2064
+ ]
2065
+ },
2066
+ "notification-url": "https://packagist.org/downloads/",
2067
+ "license": [
2068
+ "BSD-3-Clause"
2069
+ ],
2070
+ "authors": [
2071
+ {
2072
+ "name": "Sebastian Bergmann",
2073
+ "email": "sebastian@phpunit.de"
2074
+ }
2075
+ ],
2076
+ "description": "Provides a list of PHP built-in functions that operate on resources",
2077
+ "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
2078
+ "time": "2015-07-28T20:34:47+00:00"
2079
+ },
2080
+ {
2081
+ "name": "sebastian/version",
2082
+ "version": "2.0.1",
2083
+ "source": {
2084
+ "type": "git",
2085
+ "url": "https://github.com/sebastianbergmann/version.git",
2086
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
2087
+ },
2088
+ "dist": {
2089
+ "type": "zip",
2090
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
2091
+ "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
2092
+ "shasum": ""
2093
+ },
2094
+ "require": {
2095
+ "php": ">=5.6"
2096
+ },
2097
+ "type": "library",
2098
+ "extra": {
2099
+ "branch-alias": {
2100
+ "dev-master": "2.0.x-dev"
2101
+ }
2102
+ },
2103
+ "autoload": {
2104
+ "classmap": [
2105
+ "src/"
2106
+ ]
2107
+ },
2108
+ "notification-url": "https://packagist.org/downloads/",
2109
+ "license": [
2110
+ "BSD-3-Clause"
2111
+ ],
2112
+ "authors": [
2113
+ {
2114
+ "name": "Sebastian Bergmann",
2115
+ "email": "sebastian@phpunit.de",
2116
+ "role": "lead"
2117
+ }
2118
+ ],
2119
+ "description": "Library that helps with managing the version number of Git-hosted PHP projects",
2120
+ "homepage": "https://github.com/sebastianbergmann/version",
2121
+ "time": "2016-10-03T07:35:21+00:00"
2122
+ },
2123
+ {
2124
+ "name": "squizlabs/php_codesniffer",
2125
+ "version": "3.4.2",
2126
+ "source": {
2127
+ "type": "git",
2128
+ "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
2129
+ "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
2130
+ },
2131
+ "dist": {
2132
+ "type": "zip",
2133
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
2134
+ "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
2135
+ "shasum": ""
2136
+ },
2137
+ "require": {
2138
+ "ext-simplexml": "*",
2139
+ "ext-tokenizer": "*",
2140
+ "ext-xmlwriter": "*",
2141
+ "php": ">=5.4.0"
2142
+ },
2143
+ "require-dev": {
2144
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2145
+ },
2146
+ "bin": [
2147
+ "bin/phpcs",
2148
+ "bin/phpcbf"
2149
+ ],
2150
+ "type": "library",
2151
+ "extra": {
2152
+ "branch-alias": {
2153
+ "dev-master": "3.x-dev"
2154
+ }
2155
+ },
2156
+ "notification-url": "https://packagist.org/downloads/",
2157
+ "license": [
2158
+ "BSD-3-Clause"
2159
+ ],
2160
+ "authors": [
2161
+ {
2162
+ "name": "Greg Sherwood",
2163
+ "role": "lead"
2164
+ }
2165
+ ],
2166
+ "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
2167
+ "homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
2168
+ "keywords": [
2169
+ "phpcs",
2170
+ "standards"
2171
+ ],
2172
+ "time": "2019-04-10T23:49:02+00:00"
2173
+ },
2174
+ {
2175
+ "name": "symfony/console",
2176
+ "version": "v4.3.4",
2177
+ "source": {
2178
+ "type": "git",
2179
+ "url": "https://github.com/symfony/console.git",
2180
+ "reference": "de63799239b3881b8a08f8481b22348f77ed7b36"
2181
+ },
2182
+ "dist": {
2183
+ "type": "zip",
2184
+ "url": "https://api.github.com/repos/symfony/console/zipball/de63799239b3881b8a08f8481b22348f77ed7b36",
2185
+ "reference": "de63799239b3881b8a08f8481b22348f77ed7b36",
2186
+ "shasum": ""
2187
+ },
2188
+ "require": {
2189
+ "php": "^7.1.3",
2190
+ "symfony/polyfill-mbstring": "~1.0",
2191
+ "symfony/polyfill-php73": "^1.8",
2192
+ "symfony/service-contracts": "^1.1"
2193
+ },
2194
+ "conflict": {
2195
+ "symfony/dependency-injection": "<3.4",
2196
+ "symfony/event-dispatcher": "<4.3",
2197
+ "symfony/process": "<3.3"
2198
+ },
2199
+ "provide": {
2200
+ "psr/log-implementation": "1.0"
2201
+ },
2202
+ "require-dev": {
2203
+ "psr/log": "~1.0",
2204
+ "symfony/config": "~3.4|~4.0",
2205
+ "symfony/dependency-injection": "~3.4|~4.0",
2206
+ "symfony/event-dispatcher": "^4.3",
2207
+ "symfony/lock": "~3.4|~4.0",
2208
+ "symfony/process": "~3.4|~4.0",
2209
+ "symfony/var-dumper": "^4.3"
2210
+ },
2211
+ "suggest": {
2212
+ "psr/log": "For using the console logger",
2213
+ "symfony/event-dispatcher": "",
2214
+ "symfony/lock": "",
2215
+ "symfony/process": ""
2216
+ },
2217
+ "type": "library",
2218
+ "extra": {
2219
+ "branch-alias": {
2220
+ "dev-master": "4.3-dev"
2221
+ }
2222
+ },
2223
+ "autoload": {
2224
+ "psr-4": {
2225
+ "Symfony\\Component\\Console\\": ""
2226
+ },
2227
+ "exclude-from-classmap": [
2228
+ "/Tests/"
2229
+ ]
2230
+ },
2231
+ "notification-url": "https://packagist.org/downloads/",
2232
+ "license": [
2233
+ "MIT"
2234
+ ],
2235
+ "authors": [
2236
+ {
2237
+ "name": "Fabien Potencier",
2238
+ "email": "fabien@symfony.com"
2239
+ },
2240
+ {
2241
+ "name": "Symfony Community",
2242
+ "homepage": "https://symfony.com/contributors"
2243
+ }
2244
+ ],
2245
+ "description": "Symfony Console Component",
2246
+ "homepage": "https://symfony.com",
2247
+ "time": "2019-08-26T08:26:39+00:00"
2248
+ },
2249
+ {
2250
+ "name": "symfony/finder",
2251
+ "version": "v4.3.4",
2252
+ "source": {
2253
+ "type": "git",
2254
+ "url": "https://github.com/symfony/finder.git",
2255
+ "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2"
2256
+ },
2257
+ "dist": {
2258
+ "type": "zip",
2259
+ "url": "https://api.github.com/repos/symfony/finder/zipball/86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
2260
+ "reference": "86c1c929f0a4b24812e1eb109262fc3372c8e9f2",
2261
+ "shasum": ""
2262
+ },
2263
+ "require": {
2264
+ "php": "^7.1.3"
2265
+ },
2266
+ "type": "library",
2267
+ "extra": {
2268
+ "branch-alias": {
2269
+ "dev-master": "4.3-dev"
2270
+ }
2271
+ },
2272
+ "autoload": {
2273
+ "psr-4": {
2274
+ "Symfony\\Component\\Finder\\": ""
2275
+ },
2276
+ "exclude-from-classmap": [
2277
+ "/Tests/"
2278
+ ]
2279
+ },
2280
+ "notification-url": "https://packagist.org/downloads/",
2281
+ "license": [
2282
+ "MIT"
2283
+ ],
2284
+ "authors": [
2285
+ {
2286
+ "name": "Fabien Potencier",
2287
+ "email": "fabien@symfony.com"
2288
+ },
2289
+ {
2290
+ "name": "Symfony Community",
2291
+ "homepage": "https://symfony.com/contributors"
2292
+ }
2293
+ ],
2294
+ "description": "Symfony Finder Component",
2295
+ "homepage": "https://symfony.com",
2296
+ "time": "2019-08-14T12:26:46+00:00"
2297
+ },
2298
+ {
2299
+ "name": "symfony/polyfill-ctype",
2300
+ "version": "v1.12.0",
2301
+ "source": {
2302
+ "type": "git",
2303
+ "url": "https://github.com/symfony/polyfill-ctype.git",
2304
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
2305
+ },
2306
+ "dist": {
2307
+ "type": "zip",
2308
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
2309
+ "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
2310
+ "shasum": ""
2311
+ },
2312
+ "require": {
2313
+ "php": ">=5.3.3"
2314
+ },
2315
+ "suggest": {
2316
+ "ext-ctype": "For best performance"
2317
+ },
2318
+ "type": "library",
2319
+ "extra": {
2320
+ "branch-alias": {
2321
+ "dev-master": "1.12-dev"
2322
+ }
2323
+ },
2324
+ "autoload": {
2325
+ "psr-4": {
2326
+ "Symfony\\Polyfill\\Ctype\\": ""
2327
+ },
2328
+ "files": [
2329
+ "bootstrap.php"
2330
+ ]
2331
+ },
2332
+ "notification-url": "https://packagist.org/downloads/",
2333
+ "license": [
2334
+ "MIT"
2335
+ ],
2336
+ "authors": [
2337
+ {
2338
+ "name": "Gert de Pagter",
2339
+ "email": "BackEndTea@gmail.com"
2340
+ },
2341
+ {
2342
+ "name": "Symfony Community",
2343
+ "homepage": "https://symfony.com/contributors"
2344
+ }
2345
+ ],
2346
+ "description": "Symfony polyfill for ctype functions",
2347
+ "homepage": "https://symfony.com",
2348
+ "keywords": [
2349
+ "compatibility",
2350
+ "ctype",
2351
+ "polyfill",
2352
+ "portable"
2353
+ ],
2354
+ "time": "2019-08-06T08:03:45+00:00"
2355
+ },
2356
+ {
2357
+ "name": "symfony/polyfill-mbstring",
2358
+ "version": "v1.12.0",
2359
+ "source": {
2360
+ "type": "git",
2361
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
2362
+ "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17"
2363
+ },
2364
+ "dist": {
2365
+ "type": "zip",
2366
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17",
2367
+ "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17",
2368
+ "shasum": ""
2369
+ },
2370
+ "require": {
2371
+ "php": ">=5.3.3"
2372
+ },
2373
+ "suggest": {
2374
+ "ext-mbstring": "For best performance"
2375
+ },
2376
+ "type": "library",
2377
+ "extra": {
2378
+ "branch-alias": {
2379
+ "dev-master": "1.12-dev"
2380
+ }
2381
+ },
2382
+ "autoload": {
2383
+ "psr-4": {
2384
+ "Symfony\\Polyfill\\Mbstring\\": ""
2385
+ },
2386
+ "files": [
2387
+ "bootstrap.php"
2388
+ ]
2389
+ },
2390
+ "notification-url": "https://packagist.org/downloads/",
2391
+ "license": [
2392
+ "MIT"
2393
+ ],
2394
+ "authors": [
2395
+ {
2396
+ "name": "Nicolas Grekas",
2397
+ "email": "p@tchwork.com"
2398
+ },
2399
+ {
2400
+ "name": "Symfony Community",
2401
+ "homepage": "https://symfony.com/contributors"
2402
+ }
2403
+ ],
2404
+ "description": "Symfony polyfill for the Mbstring extension",
2405
+ "homepage": "https://symfony.com",
2406
+ "keywords": [
2407
+ "compatibility",
2408
+ "mbstring",
2409
+ "polyfill",
2410
+ "portable",
2411
+ "shim"
2412
+ ],
2413
+ "time": "2019-08-06T08:03:45+00:00"
2414
+ },
2415
+ {
2416
+ "name": "symfony/polyfill-php73",
2417
+ "version": "v1.12.0",
2418
+ "source": {
2419
+ "type": "git",
2420
+ "url": "https://github.com/symfony/polyfill-php73.git",
2421
+ "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188"
2422
+ },
2423
+ "dist": {
2424
+ "type": "zip",
2425
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/2ceb49eaccb9352bff54d22570276bb75ba4a188",
2426
+ "reference": "2ceb49eaccb9352bff54d22570276bb75ba4a188",
2427
+ "shasum": ""
2428
+ },
2429
+ "require": {
2430
+ "php": ">=5.3.3"
2431
+ },
2432
+ "type": "library",
2433
+ "extra": {
2434
+ "branch-alias": {
2435
+ "dev-master": "1.12-dev"
2436
+ }
2437
+ },
2438
+ "autoload": {
2439
+ "psr-4": {
2440
+ "Symfony\\Polyfill\\Php73\\": ""
2441
+ },
2442
+ "files": [
2443
+ "bootstrap.php"
2444
+ ],
2445
+ "classmap": [
2446
+ "Resources/stubs"
2447
+ ]
2448
+ },
2449
+ "notification-url": "https://packagist.org/downloads/",
2450
+ "license": [
2451
+ "MIT"
2452
+ ],
2453
+ "authors": [
2454
+ {
2455
+ "name": "Nicolas Grekas",
2456
+ "email": "p@tchwork.com"
2457
+ },
2458
+ {
2459
+ "name": "Symfony Community",
2460
+ "homepage": "https://symfony.com/contributors"
2461
+ }
2462
+ ],
2463
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
2464
+ "homepage": "https://symfony.com",
2465
+ "keywords": [
2466
+ "compatibility",
2467
+ "polyfill",
2468
+ "portable",
2469
+ "shim"
2470
+ ],
2471
+ "time": "2019-08-06T08:03:45+00:00"
2472
+ },
2473
+ {
2474
+ "name": "symfony/service-contracts",
2475
+ "version": "v1.1.6",
2476
+ "source": {
2477
+ "type": "git",
2478
+ "url": "https://github.com/symfony/service-contracts.git",
2479
+ "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3"
2480
+ },
2481
+ "dist": {
2482
+ "type": "zip",
2483
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3",
2484
+ "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3",
2485
+ "shasum": ""
2486
+ },
2487
+ "require": {
2488
+ "php": "^7.1.3",
2489
+ "psr/container": "^1.0"
2490
+ },
2491
+ "suggest": {
2492
+ "symfony/service-implementation": ""
2493
+ },
2494
+ "type": "library",
2495
+ "extra": {
2496
+ "branch-alias": {
2497
+ "dev-master": "1.1-dev"
2498
+ }
2499
+ },
2500
+ "autoload": {
2501
+ "psr-4": {
2502
+ "Symfony\\Contracts\\Service\\": ""
2503
+ }
2504
+ },
2505
+ "notification-url": "https://packagist.org/downloads/",
2506
+ "license": [
2507
+ "MIT"
2508
+ ],
2509
+ "authors": [
2510
+ {
2511
+ "name": "Nicolas Grekas",
2512
+ "email": "p@tchwork.com"
2513
+ },
2514
+ {
2515
+ "name": "Symfony Community",
2516
+ "homepage": "https://symfony.com/contributors"
2517
+ }
2518
+ ],
2519
+ "description": "Generic abstractions related to writing services",
2520
+ "homepage": "https://symfony.com",
2521
+ "keywords": [
2522
+ "abstractions",
2523
+ "contracts",
2524
+ "decoupling",
2525
+ "interfaces",
2526
+ "interoperability",
2527
+ "standards"
2528
+ ],
2529
+ "time": "2019-08-20T14:44:19+00:00"
2530
+ },
2531
+ {
2532
+ "name": "symfony/yaml",
2533
+ "version": "v4.3.4",
2534
+ "source": {
2535
+ "type": "git",
2536
+ "url": "https://github.com/symfony/yaml.git",
2537
+ "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686"
2538
+ },
2539
+ "dist": {
2540
+ "type": "zip",
2541
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
2542
+ "reference": "5a0b7c32dc3ec56fd4abae8a4a71b0cf05013686",
2543
+ "shasum": ""
2544
+ },
2545
+ "require": {
2546
+ "php": "^7.1.3",
2547
+ "symfony/polyfill-ctype": "~1.8"
2548
+ },
2549
+ "conflict": {
2550
+ "symfony/console": "<3.4"
2551
+ },
2552
+ "require-dev": {
2553
+ "symfony/console": "~3.4|~4.0"
2554
+ },
2555
+ "suggest": {
2556
+ "symfony/console": "For validating YAML files using the lint command"
2557
+ },
2558
+ "type": "library",
2559
+ "extra": {
2560
+ "branch-alias": {
2561
+ "dev-master": "4.3-dev"
2562
+ }
2563
+ },
2564
+ "autoload": {
2565
+ "psr-4": {
2566
+ "Symfony\\Component\\Yaml\\": ""
2567
+ },
2568
+ "exclude-from-classmap": [
2569
+ "/Tests/"
2570
+ ]
2571
+ },
2572
+ "notification-url": "https://packagist.org/downloads/",
2573
+ "license": [
2574
+ "MIT"
2575
+ ],
2576
+ "authors": [
2577
+ {
2578
+ "name": "Fabien Potencier",
2579
+ "email": "fabien@symfony.com"
2580
+ },
2581
+ {
2582
+ "name": "Symfony Community",
2583
+ "homepage": "https://symfony.com/contributors"
2584
+ }
2585
+ ],
2586
+ "description": "Symfony Yaml Component",
2587
+ "homepage": "https://symfony.com",
2588
+ "time": "2019-08-20T14:27:59+00:00"
2589
+ },
2590
+ {
2591
+ "name": "webmozart/assert",
2592
+ "version": "1.5.0",
2593
+ "source": {
2594
+ "type": "git",
2595
+ "url": "https://github.com/webmozart/assert.git",
2596
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
2597
+ },
2598
+ "dist": {
2599
+ "type": "zip",
2600
+ "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
2601
+ "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
2602
+ "shasum": ""
2603
+ },
2604
+ "require": {
2605
+ "php": "^5.3.3 || ^7.0",
2606
+ "symfony/polyfill-ctype": "^1.8"
2607
+ },
2608
+ "require-dev": {
2609
+ "phpunit/phpunit": "^4.8.36 || ^7.5.13"
2610
+ },
2611
+ "type": "library",
2612
+ "extra": {
2613
+ "branch-alias": {
2614
+ "dev-master": "1.3-dev"
2615
+ }
2616
+ },
2617
+ "autoload": {
2618
+ "psr-4": {
2619
+ "Webmozart\\Assert\\": "src/"
2620
+ }
2621
+ },
2622
+ "notification-url": "https://packagist.org/downloads/",
2623
+ "license": [
2624
+ "MIT"
2625
+ ],
2626
+ "authors": [
2627
+ {
2628
+ "name": "Bernhard Schussek",
2629
+ "email": "bschussek@gmail.com"
2630
+ }
2631
+ ],
2632
+ "description": "Assertions to validate method input/output with nice error messages.",
2633
+ "keywords": [
2634
+ "assert",
2635
+ "check",
2636
+ "validate"
2637
+ ],
2638
+ "time": "2019-08-24T08:43:50+00:00"
2639
+ },
2640
+ {
2641
+ "name": "wp-coding-standards/wpcs",
2642
+ "version": "2.1.1",
2643
+ "source": {
2644
+ "type": "git",
2645
+ "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
2646
+ "reference": "bd9c33152115e6741e3510ff7189605b35167908"
2647
+ },
2648
+ "dist": {
2649
+ "type": "zip",
2650
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908",
2651
+ "reference": "bd9c33152115e6741e3510ff7189605b35167908",
2652
+ "shasum": ""
2653
+ },
2654
+ "require": {
2655
+ "php": ">=5.4",
2656
+ "squizlabs/php_codesniffer": "^3.3.1"
2657
+ },
2658
+ "require-dev": {
2659
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
2660
+ "phpcompatibility/php-compatibility": "^9.0",
2661
+ "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
2662
+ },
2663
+ "suggest": {
2664
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
2665
+ },
2666
+ "type": "phpcodesniffer-standard",
2667
+ "notification-url": "https://packagist.org/downloads/",
2668
+ "license": [
2669
+ "MIT"
2670
+ ],
2671
+ "authors": [
2672
+ {
2673
+ "name": "Contributors",
2674
+ "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
2675
+ }
2676
+ ],
2677
+ "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
2678
+ "keywords": [
2679
+ "phpcs",
2680
+ "standards",
2681
+ "wordpress"
2682
+ ],
2683
+ "time": "2019-05-21T02:50:00+00:00"
2684
+ }
2685
+ ],
2686
+ "aliases": [],
2687
+ "minimum-stability": "stable",
2688
+ "stability-flags": [],
2689
+ "prefer-stable": false,
2690
+ "prefer-lowest": false,
2691
+ "platform": {
2692
+ "php": ">=5.6"
2693
+ },
2694
+ "platform-dev": []
2695
+ }
readme.txt CHANGED
@@ -1,299 +1,304 @@
1
- === Lazy Load by WP Rocket ===
2
- Contributors: wp_rocket, wp_media
3
- Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar, youtube
4
- Requires at least: 4.7
5
- Tested up to: 5.2
6
- Requires PHP: 5.6
7
- Stable tag: 2.3
8
-
9
- Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
-
11
- == Description ==
12
-
13
- Lazy Load by WP Rocket displays images and/or iframes on a page only when they are visible to the user. This reduces the number of HTTP requests mechanism and improves the loading time.
14
-
15
- This plugin works on thumbnails, all images in a post content or in a widget text, avatars, smilies and iframes. No JavaScript library such as jQuery is used and the script weight is less than 10KB.
16
-
17
- You can also replace Youtube iframes by a preview thumbnail to further speed up the loading time of your website.
18
-
19
- = Dependencies =
20
-
21
- Lazyload script: [https://github.com/verlok/lazyload](https://github.com/verlok/lazyload)
22
-
23
- = Related Plugins =
24
- * [Imagify](https://imagify.io/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=LazyLoadPlugin): Best Image Optimizer to speed up your website with lighter images.
25
- * [WP Rocket](https://wp-rocket.me/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=LazyLoadPlugin): Best caching plugin to speed-up your WordPress website.
26
- * [Heartbeat Control by WP Rocket](https://wordpress.org/plugins/heartbeat-control/): Heartbeat Control by WP Rocket: Best plugin to control the WordPress Heartbeat API and reduce CPU usage.
27
-
28
- == Installation ==
29
-
30
- 1. Upload the complete `rocket-lazy-load` folder to the `/wp-content/plugins/` directory
31
- 2. Activate the plugin through the 'Plugins' menu in WordPress
32
-
33
- == Frequently Asked Questions ==
34
-
35
- = How can I deactivate Lazy Load on some pages? =
36
-
37
- You can use the `do_rocket_lazyload` filter.
38
-
39
- Here is an example to put in functions.php files that disable lazyload on posts:
40
-
41
- `
42
- add_action( 'wp', 'deactivate_rocket_lazyload_on_single' );
43
- function deactivate_rocket_lazyload_on_single() {
44
- if ( is_single() ) {
45
- add_filter( 'do_rocket_lazyload', '__return_false' );
46
- }
47
- }
48
- `
49
-
50
- = How can I deactivate Lazy Load on some images? =
51
-
52
- Simply add a `data-no-lazy="1"` property in you `img` or `iframe` tag.
53
-
54
- You can also use the filters `rocket_lazyload_excluded_attributes` or `rocket_lazyload_excluded_src` to exclude specific patterns.
55
-
56
- For iframes, the filter is `rocket_lazyload_iframe_excluded_patterns`.
57
-
58
- = How can I change the threshold to trigger the load? =
59
-
60
- You can use the `rocket_lazyload_threshold` filter.
61
-
62
- Code sample:
63
-
64
- `
65
- function rocket_lazyload_custom_threshold( $threshold ) {
66
- return 100;
67
- }
68
- add_filter( 'rocket_lazyload_threshold', 'rocket_lazyload_custom_threshold' );
69
- `
70
-
71
- = I use plugin X and my images don't show anymore =
72
-
73
- Some plugins are not compatible without lazy loading. Please open a support thread, and we will see how we can solve the issue by excluding lazy loading for this plugin.
74
-
75
- = How can I lazyload a background-image? =
76
-
77
- The plugin will automatically lazyload background-images set with a `style` attribute to a `div` element:
78
-
79
- `<div style="background-image: url(image.jpg);">`
80
-
81
- You can also apply it manually. The element you want to apply lazyload on must have this specific markup:
82
-
83
- `<div class="rocket-lazyload" data-bg="url(../img/image.jpg)"></div>`
84
-
85
- The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
-
87
- == Changelog ==
88
- = 2.3 =
89
- Enhancement: Add support for browser native lazyload
90
- Bugfix: Prevent broken image in some cases for picture element
91
- Bugfix: Prevent wrong lazy attributes for srcset and sizes on an image inside a picture element
92
-
93
- = 2.2.3 =
94
- * Enhancement: Improve compatibility for the picture element
95
- * Enhancement: Apply lazyload on background images set on section, span and li elements
96
- * Enhancement: also pass $width and $height values to the rocket_lazyload_placeholder filter
97
- * Bugfix: Use 0 instead of 1 for the default placeholder dimensions to improve compatibility
98
- * Bugfix: Improve infinite scroll support
99
- * Bugfix: Exclude Enfold avia-background-fixed background images and data-large_image from lazyload
100
-
101
- = 2.2.2 =
102
- * Bugfix: Auto-exclude data-height-percentage attribute to prevent display issues
103
- * Bugfix: Correctly handle responsive videos using fitVids again
104
-
105
- = 2.2.1 =
106
- * Enhancement: add a way to customize the lazyload script options
107
- * Bugfix: Prevent error on Internet Explorer 11
108
- * Bugfix: Prevent conflict with WooCommerce variation swatches
109
- * Bugfix: Prevent empty `src` when the image is an inline base64
110
- * Bugfix: Prevent issue when the original `src` attribute uses single quotes
111
-
112
- = 2.2 =
113
- * Enhancement: Update lazyload script to the latest version
114
- * Enhancement: Use the dimensions of the original image for the placeholder size when possible, to reduce content reflow
115
- * Enhancement: Ignore images using the new loading attribute introduce by Chrome for browser-native lazyload
116
-
117
- = 2.1.5 =
118
- * Bugfix: Prevent matching with the wrong data when a data-style attribute is on a div for background images
119
- * Remove data-cfasync="false" by default
120
- * Enhancement: Add filter rocket_lazyload_script_tag to modify the lazyload script HTML if needed
121
- * Enhancement: Add data-no-minify attribute to the lazyload script tag to prevent it from being combined by JS combiners
122
- * Enhancement: Improve MutationObserver code to only call the lazyload update method if an image/iframe or element with .rocket-lazyload is contained in the new node(s) added to the DOM
123
-
124
- = 2.1.4 =
125
- * Regression fix: Correctly exclude scripts from lazyload again
126
-
127
- = 2.1.3 =
128
- * Bugfix: Ignore content inside noscript tags to prevent modifying them and causing some display issues
129
-
130
- = 2.1.2 =
131
- * Enhancement: Update lazyload script to the latest version
132
- * Enhancement: Add a way to lazyload the Youtube thumbnail image
133
- * Enhancement: Add width and height attributes to the Youtube thumbnail image depending on the resolution
134
- * Enhancement: Disable polyfill for intersectionObserver by default, added a way to activate it instead
135
- * Enhancement: Add data-cfasync="false" to the lazyload script tag
136
- * Enhancement: Prevent lazyload on the Oxygen Builder page editor
137
- * Bugfix: Wrap no JS CSS in noscript tag and remove the no-js identifier
138
-
139
-
140
- = 2.1.1 =
141
- * Bugfix: Correctly apply lazyload on `picture` elements
142
- * Bugfix: Prevent double loading of an image when an `img` element inside a `picture` element only has a `srcset` attribute and no `src` attribute
143
-
144
- = 2.1 =
145
- * Enhancement: Update lazyload script to the latest version
146
- * Enhancement: Apply lazyload on picture elements found on the page
147
- * Enhancement: Apply lazyload on div elements with a background image found on the page. See FAQ for more info.
148
-
149
- = 2.0.4 =
150
- * Enhancement: Add filter for iframe lazyload pattern exclusion
151
- * Enhancement: Auto-exclude soliloquy-image pattern from lazyload
152
- * Bugfix: Prevent issue when an image/iframe is duplicated on the same page
153
- * Bugfix: Prevent W3C validation error for the SVG placeholder
154
-
155
- = 2.0.3.2 =
156
- * Bugfix: Correctly ignore inline scripts with line breaks inside
157
-
158
- = 2.0.3.1 =
159
- * Bugfix: Correct an issue preventing lazyload from working
160
-
161
- = 2.0.3 =
162
- * Bugfix: Prevent incorrect display if JavaScript is disabled
163
- * Bugfix: Don't apply lazyload on Divi/Extra/Beaver Builder Editor pages
164
- * Bugfix: Use the correct URL for each iframe when multiple iframes are on the same page
165
- * Bugfix: Ignore content inside inline script tags to prevent applying lazyload in it
166
-
167
- = 2.0.2 =
168
- * Bugfix: Fix an error in the compatibility for the AMP plugin
169
-
170
- = 2.0.1 =
171
- * Bugfix: Prevent a fatal error on case sensitive operating systems
172
-
173
- = 2.0 =
174
- * Enhancement: Lazyload is now applied on the template_redirect hook, which should allow the plugin to apply the optimization on more images and encountering less conflicts at the same time
175
- * Enhancement: Specifically target with the lazyload script images/iframes elements with a data-lazy-src attribute
176
- * Enhancement: Update lazyload script to the latest version
177
- * Enhancement: Possibility to apply lazyload on background-images with a specific markup, see FAQ
178
- * Enhancement: Use a svg image as placeholder instead of a base64 gif
179
- * Bugfix: Only use MutationObserver if available in the browser
180
- * Bugfix: When using the Youtube thumbnail option, correctly format the Youtube query if the video URL is encoded
181
- * Bugfix: Improve iframe matching to prevent unexpected results
182
- * Bugfix: Update CSS for the Youtube thumbnail option to prevent issue with the Gutenberg embeds block
183
-
184
- = 1.4.9 =
185
- * Enhancement: Update lazyload script to the latest available version
186
- * Enhancement: Use lazy-sizes to prevent W3C validation error when sizes is defined but srcset is not
187
- * Enhancement: Parse images or iframes only if the element is selected to be lazyloaded in the options
188
- * Fix: Prevent warning for lazyload+v in Google Search Console
189
- * Fix: Prevent PHP Notice with WooCommerce for product images
190
-
191
- = 1.4.8 =
192
- * Notice: Minimum WordPress version required is now 4.7
193
- * Enhancement: Update lazyload script version
194
- * Enhancement: Remove placeholder image to improve perceived loading time
195
- * Enhancement: Compatibility with Youtube privacy URL
196
- * Enhancement: Update play image to match Youtube logo
197
- * Enhancement: Support Youtube URL parameters
198
- * Enhancement: Lazyload images displayed with wp_get_attachment_image(). /!\ no fallback if JavaScript is disabled
199
- * Fix: Use the correct size set in srcset for the lazyloaded image
200
- * Fix: Prevent Youtube thumbnail replacement on playlists
201
- * Fix: Prevent iframe lazyload on AMP pages
202
- * Fix: Correct text domain for translations (thanks @ Chantal Coolsma)
203
-
204
- = 1.4.7 =
205
- * Fix compatibility with infinite scroll
206
- * Prevent lazyload on masterSlider images
207
-
208
- = 1.4.6 =
209
- * Correctly include version 8.5.2 of lazyload script
210
- * Prevent 404 error on lazyload script if URL contains "-v"
211
-
212
- = 1.4.5 =
213
- * Rename Setting Page Name in WP Menu
214
- * New Product Banner in Settings Page
215
- * Conditionally load a different version of the script depending on browser support of IntersectionObserver
216
- * Fix a bug where images initially hidden are not correctly displayed when coming into view (slider, tabs, accordion)
217
-
218
- = 1.4.4 =
219
- * Admin Redesign
220
-
221
- = 1.4.3 =
222
- * Plugin is compatible again with PHP < 5.4
223
-
224
- = 1.4.2 =
225
- * Update lazyload script to bring back compatibility with IE9/10
226
-
227
- = 1.4.1 =
228
- * Fix bug caused by a too aggressive cleanup
229
-
230
- = 1.4 =
231
- * New option: replace Youtube videos by thumbnail. This option can improve your loading time a lot, especially if you have multiple videos on the same page
232
-
233
- = 1.3.3 =
234
- * 2017-09-16
235
- * Prevent scripts and styles being removed during html parsing
236
-
237
- = 1.3.2 =
238
- * 2017-09-12
239
- * Fix images not displaying in certain conditions because image attributes exclusion was not working correctly
240
-
241
- = 1.3.1 =
242
- * 2017-09-07
243
- * Don't apply lazyload on Divi slider
244
-
245
- = 1.3 =
246
- * 2017-09-01
247
- * Improve HTML parsing of images and iframes to be faster and more efficient
248
- * Make the lazyload compatible with fitVids for iframes
249
- * Don't apply lazyload on AMP pages (compatible with AMP plugin from Automattic)
250
- * Use about:blank as default iframe placeholder to prevent warning in browser console
251
- * Don't apply lazyload on upPrev thumbnail
252
-
253
- = 1.2.1 =
254
- * 2017-08-22
255
- * Fix missing lazyload script
256
- * Don't lazyload for images in REST API requests
257
-
258
- = 1.2 =
259
- * 2017-08-22
260
- * Update lazyload script to latest version
261
- * Change the way the script is loaded
262
-
263
- = 1.1.1 =
264
- * 2017-02-13
265
- * Bug fix: Remove use of short tag to prevent 500 error on some installations
266
-
267
- = 1.1 =
268
- * 2017-02-12
269
- * *New*
270
- * JS library updated
271
- * Support for iFrame
272
- * Support for srcset and sizes
273
- * New options page
274
-
275
- = 1.0.4 =
276
- * 2015-04-28
277
- * Bug Fix: Resolved a conflict between LazyLoad & Emoji since WordPress 4.2
278
-
279
- = 1.0.3 =
280
- * 2015-01-08
281
- * Bug Fix: Don't apply LazyLoad on captcha from Really Simple CAPTCHA to prevent conflicts.
282
-
283
- = 1.0.2 =
284
- * 2014-12-28
285
- * Improvement: Add « rocket_lazyload_html » filter to manage the output that will be printed.
286
-
287
- = 1.0.1.1 =
288
- * 2014-07-25
289
- * Fix stupid error with new regex in 1.0.1
290
-
291
- = 1.0.1 =
292
- * 2014-07-16
293
- * Bug Fix: when a IMG tag or content (widget or post) contains the string "data-no-lazy", all IMG tags were ignored instead of one.
294
- * Security fix: The preg_replace() could lead to a XSS vuln, thanks to Alexander Concha
295
- * Code compliance
296
-
297
- = 1.0 =
298
- * 2014-01-01
299
- * Initial release.
 
 
 
 
 
1
+ === Lazy Load by WP Rocket ===
2
+ Contributors: wp_rocket, wp_media
3
+ Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar, youtube
4
+ Requires at least: 4.7
5
+ Tested up to: 5.2
6
+ Requires PHP: 5.6
7
+ Stable tag: 2.3.1
8
+
9
+ Lazy Load your images and iframes, replace Youtube videos by a preview thumbnail.
10
+
11
+ == Description ==
12
+
13
+ Lazy Load by WP Rocket displays images and/or iframes on a page only when they are visible to the user. This reduces the number of HTTP requests mechanism and improves the loading time.
14
+
15
+ This plugin works on thumbnails, all images in a post content or in a widget text, avatars, smilies and iframes. No JavaScript library such as jQuery is used and the script weight is less than 10KB.
16
+
17
+ You can also replace Youtube iframes by a preview thumbnail to further speed up the loading time of your website.
18
+
19
+ = Dependencies =
20
+
21
+ Lazyload script: [https://github.com/verlok/lazyload](https://github.com/verlok/lazyload)
22
+
23
+ = Related Plugins =
24
+ * [Imagify](https://imagify.io/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=LazyLoadPlugin): Best Image Optimizer to speed up your website with lighter images.
25
+ * [WP Rocket](https://wp-rocket.me/?utm_source=wordpress.org&utm_medium=referral&utm_campaign=LazyLoadPlugin): Best caching plugin to speed-up your WordPress website.
26
+ * [Heartbeat Control by WP Rocket](https://wordpress.org/plugins/heartbeat-control/): Heartbeat Control by WP Rocket: Best plugin to control the WordPress Heartbeat API and reduce CPU usage.
27
+
28
+ == Installation ==
29
+
30
+ 1. Upload the complete `rocket-lazy-load` folder to the `/wp-content/plugins/` directory
31
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
32
+
33
+ == Frequently Asked Questions ==
34
+
35
+ = How can I deactivate Lazy Load on some pages? =
36
+
37
+ You can use the `do_rocket_lazyload` filter.
38
+
39
+ Here is an example to put in functions.php files that disable lazyload on posts:
40
+
41
+ `
42
+ add_action( 'wp', 'deactivate_rocket_lazyload_on_single' );
43
+ function deactivate_rocket_lazyload_on_single() {
44
+ if ( is_single() ) {
45
+ add_filter( 'do_rocket_lazyload', '__return_false' );
46
+ }
47
+ }
48
+ `
49
+
50
+ = How can I deactivate Lazy Load on some images? =
51
+
52
+ Simply add a `data-no-lazy="1"` property in you `img` or `iframe` tag.
53
+
54
+ You can also use the filters `rocket_lazyload_excluded_attributes` or `rocket_lazyload_excluded_src` to exclude specific patterns.
55
+
56
+ For iframes, the filter is `rocket_lazyload_iframe_excluded_patterns`.
57
+
58
+ = How can I change the threshold to trigger the load? =
59
+
60
+ You can use the `rocket_lazyload_threshold` filter.
61
+
62
+ Code sample:
63
+
64
+ `
65
+ function rocket_lazyload_custom_threshold( $threshold ) {
66
+ return 100;
67
+ }
68
+ add_filter( 'rocket_lazyload_threshold', 'rocket_lazyload_custom_threshold' );
69
+ `
70
+
71
+ = I use plugin X and my images don't show anymore =
72
+
73
+ Some plugins are not compatible without lazy loading. Please open a support thread, and we will see how we can solve the issue by excluding lazy loading for this plugin.
74
+
75
+ = How can I lazyload a background-image? =
76
+
77
+ The plugin will automatically lazyload background-images set with a `style` attribute to a `div` element:
78
+
79
+ `<div style="background-image: url(image.jpg);">`
80
+
81
+ You can also apply it manually. The element you want to apply lazyload on must have this specific markup:
82
+
83
+ `<div class="rocket-lazyload" data-bg="url(../img/image.jpg)"></div>`
84
+
85
+ The element must have the class `rocket-lazyload`, and a `data-bg` attribute, which value is the CSS url for the image.
86
+
87
+ == Changelog ==
88
+ = 2.3.1 =
89
+ Bugfix: Prevent a conflict with WP Rocket
90
+ Bugfix: apply loading="lazy" on Youtube thumbnail
91
+ Bugfix: Add autoplay attribute on iframe loaded with Youtube thumbnail
92
+
93
+ = 2.3 =
94
+ Enhancement: Add support for browser native lazyload
95
+ Bugfix: Prevent broken image in some cases for picture element
96
+ Bugfix: Prevent wrong lazy attributes for srcset and sizes on an image inside a picture element
97
+
98
+ = 2.2.3 =
99
+ * Enhancement: Improve compatibility for the picture element
100
+ * Enhancement: Apply lazyload on background images set on section, span and li elements
101
+ * Enhancement: also pass $width and $height values to the rocket_lazyload_placeholder filter
102
+ * Bugfix: Use 0 instead of 1 for the default placeholder dimensions to improve compatibility
103
+ * Bugfix: Improve infinite scroll support
104
+ * Bugfix: Exclude Enfold avia-background-fixed background images and data-large_image from lazyload
105
+
106
+ = 2.2.2 =
107
+ * Bugfix: Auto-exclude data-height-percentage attribute to prevent display issues
108
+ * Bugfix: Correctly handle responsive videos using fitVids again
109
+
110
+ = 2.2.1 =
111
+ * Enhancement: add a way to customize the lazyload script options
112
+ * Bugfix: Prevent error on Internet Explorer 11
113
+ * Bugfix: Prevent conflict with WooCommerce variation swatches
114
+ * Bugfix: Prevent empty `src` when the image is an inline base64
115
+ * Bugfix: Prevent issue when the original `src` attribute uses single quotes
116
+
117
+ = 2.2 =
118
+ * Enhancement: Update lazyload script to the latest version
119
+ * Enhancement: Use the dimensions of the original image for the placeholder size when possible, to reduce content reflow
120
+ * Enhancement: Ignore images using the new loading attribute introduce by Chrome for browser-native lazyload
121
+
122
+ = 2.1.5 =
123
+ * Bugfix: Prevent matching with the wrong data when a data-style attribute is on a div for background images
124
+ * Remove data-cfasync="false" by default
125
+ * Enhancement: Add filter rocket_lazyload_script_tag to modify the lazyload script HTML if needed
126
+ * Enhancement: Add data-no-minify attribute to the lazyload script tag to prevent it from being combined by JS combiners
127
+ * Enhancement: Improve MutationObserver code to only call the lazyload update method if an image/iframe or element with .rocket-lazyload is contained in the new node(s) added to the DOM
128
+
129
+ = 2.1.4 =
130
+ * Regression fix: Correctly exclude scripts from lazyload again
131
+
132
+ = 2.1.3 =
133
+ * Bugfix: Ignore content inside noscript tags to prevent modifying them and causing some display issues
134
+
135
+ = 2.1.2 =
136
+ * Enhancement: Update lazyload script to the latest version
137
+ * Enhancement: Add a way to lazyload the Youtube thumbnail image
138
+ * Enhancement: Add width and height attributes to the Youtube thumbnail image depending on the resolution
139
+ * Enhancement: Disable polyfill for intersectionObserver by default, added a way to activate it instead
140
+ * Enhancement: Add data-cfasync="false" to the lazyload script tag
141
+ * Enhancement: Prevent lazyload on the Oxygen Builder page editor
142
+ * Bugfix: Wrap no JS CSS in noscript tag and remove the no-js identifier
143
+
144
+
145
+ = 2.1.1 =
146
+ * Bugfix: Correctly apply lazyload on `picture` elements
147
+ * Bugfix: Prevent double loading of an image when an `img` element inside a `picture` element only has a `srcset` attribute and no `src` attribute
148
+
149
+ = 2.1 =
150
+ * Enhancement: Update lazyload script to the latest version
151
+ * Enhancement: Apply lazyload on picture elements found on the page
152
+ * Enhancement: Apply lazyload on div elements with a background image found on the page. See FAQ for more info.
153
+
154
+ = 2.0.4 =
155
+ * Enhancement: Add filter for iframe lazyload pattern exclusion
156
+ * Enhancement: Auto-exclude soliloquy-image pattern from lazyload
157
+ * Bugfix: Prevent issue when an image/iframe is duplicated on the same page
158
+ * Bugfix: Prevent W3C validation error for the SVG placeholder
159
+
160
+ = 2.0.3.2 =
161
+ * Bugfix: Correctly ignore inline scripts with line breaks inside
162
+
163
+ = 2.0.3.1 =
164
+ * Bugfix: Correct an issue preventing lazyload from working
165
+
166
+ = 2.0.3 =
167
+ * Bugfix: Prevent incorrect display if JavaScript is disabled
168
+ * Bugfix: Don't apply lazyload on Divi/Extra/Beaver Builder Editor pages
169
+ * Bugfix: Use the correct URL for each iframe when multiple iframes are on the same page
170
+ * Bugfix: Ignore content inside inline script tags to prevent applying lazyload in it
171
+
172
+ = 2.0.2 =
173
+ * Bugfix: Fix an error in the compatibility for the AMP plugin
174
+
175
+ = 2.0.1 =
176
+ * Bugfix: Prevent a fatal error on case sensitive operating systems
177
+
178
+ = 2.0 =
179
+ * Enhancement: Lazyload is now applied on the template_redirect hook, which should allow the plugin to apply the optimization on more images and encountering less conflicts at the same time
180
+ * Enhancement: Specifically target with the lazyload script images/iframes elements with a data-lazy-src attribute
181
+ * Enhancement: Update lazyload script to the latest version
182
+ * Enhancement: Possibility to apply lazyload on background-images with a specific markup, see FAQ
183
+ * Enhancement: Use a svg image as placeholder instead of a base64 gif
184
+ * Bugfix: Only use MutationObserver if available in the browser
185
+ * Bugfix: When using the Youtube thumbnail option, correctly format the Youtube query if the video URL is encoded
186
+ * Bugfix: Improve iframe matching to prevent unexpected results
187
+ * Bugfix: Update CSS for the Youtube thumbnail option to prevent issue with the Gutenberg embeds block
188
+
189
+ = 1.4.9 =
190
+ * Enhancement: Update lazyload script to the latest available version
191
+ * Enhancement: Use lazy-sizes to prevent W3C validation error when sizes is defined but srcset is not
192
+ * Enhancement: Parse images or iframes only if the element is selected to be lazyloaded in the options
193
+ * Fix: Prevent warning for lazyload+v in Google Search Console
194
+ * Fix: Prevent PHP Notice with WooCommerce for product images
195
+
196
+ = 1.4.8 =
197
+ * Notice: Minimum WordPress version required is now 4.7
198
+ * Enhancement: Update lazyload script version
199
+ * Enhancement: Remove placeholder image to improve perceived loading time
200
+ * Enhancement: Compatibility with Youtube privacy URL
201
+ * Enhancement: Update play image to match Youtube logo
202
+ * Enhancement: Support Youtube URL parameters
203
+ * Enhancement: Lazyload images displayed with wp_get_attachment_image(). /!\ no fallback if JavaScript is disabled
204
+ * Fix: Use the correct size set in srcset for the lazyloaded image
205
+ * Fix: Prevent Youtube thumbnail replacement on playlists
206
+ * Fix: Prevent iframe lazyload on AMP pages
207
+ * Fix: Correct text domain for translations (thanks @ Chantal Coolsma)
208
+
209
+ = 1.4.7 =
210
+ * Fix compatibility with infinite scroll
211
+ * Prevent lazyload on masterSlider images
212
+
213
+ = 1.4.6 =
214
+ * Correctly include version 8.5.2 of lazyload script
215
+ * Prevent 404 error on lazyload script if URL contains "-v"
216
+
217
+ = 1.4.5 =
218
+ * Rename Setting Page Name in WP Menu
219
+ * New Product Banner in Settings Page
220
+ * Conditionally load a different version of the script depending on browser support of IntersectionObserver
221
+ * Fix a bug where images initially hidden are not correctly displayed when coming into view (slider, tabs, accordion)
222
+
223
+ = 1.4.4 =
224
+ * Admin Redesign
225
+
226
+ = 1.4.3 =
227
+ * Plugin is compatible again with PHP < 5.4
228
+
229
+ = 1.4.2 =
230
+ * Update lazyload script to bring back compatibility with IE9/10
231
+
232
+ = 1.4.1 =
233
+ * Fix bug caused by a too aggressive cleanup
234
+
235
+ = 1.4 =
236
+ * New option: replace Youtube videos by thumbnail. This option can improve your loading time a lot, especially if you have multiple videos on the same page
237
+
238
+ = 1.3.3 =
239
+ * 2017-09-16
240
+ * Prevent scripts and styles being removed during html parsing
241
+
242
+ = 1.3.2 =
243
+ * 2017-09-12
244
+ * Fix images not displaying in certain conditions because image attributes exclusion was not working correctly
245
+
246
+ = 1.3.1 =
247
+ * 2017-09-07
248
+ * Don't apply lazyload on Divi slider
249
+
250
+ = 1.3 =
251
+ * 2017-09-01
252
+ * Improve HTML parsing of images and iframes to be faster and more efficient
253
+ * Make the lazyload compatible with fitVids for iframes
254
+ * Don't apply lazyload on AMP pages (compatible with AMP plugin from Automattic)
255
+ * Use about:blank as default iframe placeholder to prevent warning in browser console
256
+ * Don't apply lazyload on upPrev thumbnail
257
+
258
+ = 1.2.1 =
259
+ * 2017-08-22
260
+ * Fix missing lazyload script
261
+ * Don't lazyload for images in REST API requests
262
+
263
+ = 1.2 =
264
+ * 2017-08-22
265
+ * Update lazyload script to latest version
266
+ * Change the way the script is loaded
267
+
268
+ = 1.1.1 =
269
+ * 2017-02-13
270
+ * Bug fix: Remove use of short tag to prevent 500 error on some installations
271
+
272
+ = 1.1 =
273
+ * 2017-02-12
274
+ * *New*
275
+ * JS library updated
276
+ * Support for iFrame
277
+ * Support for srcset and sizes
278
+ * New options page
279
+
280
+ = 1.0.4 =
281
+ * 2015-04-28
282
+ * Bug Fix: Resolved a conflict between LazyLoad & Emoji since WordPress 4.2
283
+
284
+ = 1.0.3 =
285
+ * 2015-01-08
286
+ * Bug Fix: Don't apply LazyLoad on captcha from Really Simple CAPTCHA to prevent conflicts.
287
+
288
+ = 1.0.2 =
289
+ * 2014-12-28
290
+ * Improvement: Add « rocket_lazyload_html » filter to manage the output that will be printed.
291
+
292
+ = 1.0.1.1 =
293
+ * 2014-07-25
294
+ * Fix stupid error with new regex in 1.0.1
295
+
296
+ = 1.0.1 =
297
+ * 2014-07-16
298
+ * Bug Fix: when a IMG tag or content (widget or post) contains the string "data-no-lazy", all IMG tags were ignored instead of one.
299
+ * Security fix: The preg_replace() could lead to a XSS vuln, thanks to Alexander Concha
300
+ * Code compliance
301
+
302
+ = 1.0 =
303
+ * 2014-01-01
304
+ * Initial release.
rocket-lazy-load.php CHANGED
@@ -1,78 +1,78 @@
1
- <?php
2
- /**
3
- * Plugin Name: Lazy Load by WP Rocket
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
- * Author: WP Rocket
8
- * Author URI: https://wp-rocket.me
9
- * Text Domain: rocket-lazy-load
10
- * Domain Path: /languages
11
- *
12
- * @package RocketLazyloadPlugin
13
- *
14
- * Copyright 2015-2019 WP Media
15
- *
16
- * This program is free software; you can redistribute it and/or modify
17
- * it under the terms of the GNU General Public License as published by
18
- * the Free Software Foundation; either version 2 of the License, or
19
- * (at your option) any later version.
20
- *
21
- * This program is distributed in the hope that it will be useful,
22
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
- * GNU General Public License for more details.
25
- *
26
- * You should have received a copy of the GNU General Public License
27
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
28
- */
29
-
30
- defined('ABSPATH') || die('Cheatin\' uh?');
31
-
32
- define('ROCKET_LL_VERSION', '2.3');
33
- define('ROCKET_LL_WP_VERSION', '4.7');
34
- define('ROCKET_LL_PHP_VERSION', '5.6');
35
- define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
36
- define('ROCKET_LL_PATH', realpath(plugin_dir_path(__FILE__)) . '/');
37
- define('ROCKET_LL_ASSETS_URL', plugin_dir_url(__FILE__) . 'assets/');
38
- define('ROCKET_LL_FRONT_JS_URL', ROCKET_LL_ASSETS_URL . 'js/');
39
- define('ROCKET_LL_INT_MAX', PHP_INT_MAX - 15);
40
-
41
- require ROCKET_LL_PATH . 'src/rocket-lazyload-requirements-check.php';
42
-
43
- /**
44
- * Loads plugin translations
45
- *
46
- * @since 2.0
47
- * @author Remy Perona
48
- *
49
- * @return void
50
- */
51
- function rocket_lazyload_textdomain()
52
- {
53
- // Load translations from the languages directory.
54
- $locale = get_locale();
55
-
56
- // This filter is documented in /wp-includes/l10n.php.
57
- $locale = apply_filters('plugin_locale', $locale, 'rocket-lazy-load'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals
58
- load_textdomain('rocket-lazy-load', WP_LANG_DIR . '/plugins/rocket-lazy-load-' . $locale . '.mo');
59
-
60
- load_plugin_textdomain('rocket-lazy-load', false, dirname(plugin_basename(__FILE__)) . '/languages/');
61
- }
62
-
63
- add_action('plugins_loaded', 'rocket_lazyload_textdomain');
64
-
65
- $rocket_lazyload_requirement_checks = new Rocket_Lazyload_Requirements_Check(
66
- array(
67
- 'plugin_name' => 'Lazy Load by WP Rocket',
68
- 'plugin_version' => ROCKET_LL_VERSION,
69
- 'wp_version' => ROCKET_LL_WP_VERSION,
70
- 'php_version' => ROCKET_LL_PHP_VERSION,
71
- )
72
- );
73
-
74
- if ($rocket_lazyload_requirement_checks->check()) {
75
- require ROCKET_LL_PATH . 'main.php';
76
- }
77
-
78
- unset($rocket_lazyload_requirement_checks);
1
+ <?php
2
+ /**
3
+ * Plugin Name: Lazy Load by WP Rocket
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.1
7
+ * Author: WP Rocket
8
+ * Author URI: https://wp-rocket.me
9
+ * Text Domain: rocket-lazy-load
10
+ * Domain Path: /languages
11
+ *
12
+ * @package RocketLazyloadPlugin
13
+ *
14
+ * Copyright 2015-2019 WP Media
15
+ *
16
+ * This program is free software; you can redistribute it and/or modify
17
+ * it under the terms of the GNU General Public License as published by
18
+ * the Free Software Foundation; either version 2 of the License, or
19
+ * (at your option) any later version.
20
+ *
21
+ * This program is distributed in the hope that it will be useful,
22
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ * GNU General Public License for more details.
25
+ *
26
+ * You should have received a copy of the GNU General Public License
27
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
28
+ */
29
+
30
+ defined('ABSPATH') || die('Cheatin\' uh?');
31
+
32
+ define('ROCKET_LL_VERSION', '2.3.1');
33
+ define('ROCKET_LL_WP_VERSION', '4.7');
34
+ define('ROCKET_LL_PHP_VERSION', '5.6');
35
+ define('ROCKET_LL_BASENAME', plugin_basename(__FILE__));
36
+ define('ROCKET_LL_PATH', realpath(plugin_dir_path(__FILE__)) . '/');
37
+ define('ROCKET_LL_ASSETS_URL', plugin_dir_url(__FILE__) . 'assets/');
38
+ define('ROCKET_LL_FRONT_JS_URL', ROCKET_LL_ASSETS_URL . 'js/');
39
+ define('ROCKET_LL_INT_MAX', PHP_INT_MAX - 15);
40
+
41
+ require ROCKET_LL_PATH . 'src/rocket-lazyload-requirements-check.php';
42
+
43
+ /**
44
+ * Loads plugin translations
45
+ *
46
+ * @since 2.0
47
+ * @author Remy Perona
48
+ *
49
+ * @return void
50
+ */
51
+ function rocket_lazyload_textdomain()
52
+ {
53
+ // Load translations from the languages directory.
54
+ $locale = get_locale();
55
+
56
+ // This filter is documented in /wp-includes/l10n.php.
57
+ $locale = apply_filters('plugin_locale', $locale, 'rocket-lazy-load'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals
58
+ load_textdomain('rocket-lazy-load', WP_LANG_DIR . '/plugins/rocket-lazy-load-' . $locale . '.mo');
59
+
60
+ load_plugin_textdomain('rocket-lazy-load', false, dirname(plugin_basename(__FILE__)) . '/languages/');
61
+ }
62
+
63
+ add_action('plugins_loaded', 'rocket_lazyload_textdomain');
64
+
65
+ $rocket_lazyload_requirement_checks = new Rocket_Lazyload_Requirements_Check(
66
+ array(
67
+ 'plugin_name' => 'Lazy Load by WP Rocket',
68
+ 'plugin_version' => ROCKET_LL_VERSION,
69
+ 'wp_version' => ROCKET_LL_WP_VERSION,
70
+ 'php_version' => ROCKET_LL_PHP_VERSION,
71
+ )
72
+ );
73
+
74
+ if ($rocket_lazyload_requirement_checks->check()) {
75
+ require ROCKET_LL_PATH . 'main.php';
76
+ }
77
+
78
+ unset($rocket_lazyload_requirement_checks);
src/Admin/AdminPage.php CHANGED
@@ -1,176 +1,176 @@
1
- <?php
2
- /**
3
- * Admin Page Class
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Admin;
9
-
10
- defined('ABSPATH') || die('Cheatin\' uh?');
11
-
12
- use RocketLazyLoadPlugin\Options\Options;
13
- use RocketLazyLoadPlugin\Options\OptionArray;
14
-
15
- /**
16
- * Admin page configuration
17
- *
18
- * @since 2.0
19
- * @author Remy Perona
20
- */
21
- class AdminPage
22
- {
23
- /**
24
- * Plugin slug
25
- *
26
- * @since 2.0
27
- * @author Remy Perona
28
- *
29
- * @var string
30
- */
31
- private $slug = 'rocket_lazyload';
32
-
33
- /**
34
- * Options instance
35
- *
36
- * @since 2.0
37
- * @author Remy Perona
38
- *
39
- * @var Options
40
- */
41
- private $options;
42
-
43
- /**
44
- * OptionArray instance
45
- *
46
- * @since 2.0
47
- * @author Remy Perona
48
- *
49
- * @var OptionArray
50
- */
51
- private $option_array;
52
-
53
- /**
54
- * Template path
55
- *
56
- * @since 2.0
57
- * @author Remy Perona
58
- *
59
- * @var string
60
- */
61
- private $template_path;
62
-
63
- /**
64
- * Constructor
65
- *
66
- * @since 2.0
67
- * @author Remy Perona
68
- *
69
- * @param Options $options Options instance.
70
- * @param OptionArray $option_array OptionArray instance.
71
- * @param string $template_path Template path.
72
- */
73
- public function __construct(Options $options, OptionArray $option_array, $template_path)
74
- {
75
- $this->options = $options;
76
- $this->option_array = $option_array;
77
- $this->template_path = $template_path;
78
- }
79
-
80
- /**
81
- * Registers plugin settings with WordPress
82
- *
83
- * @since 2.0
84
- * @author Remy Perona
85
- *
86
- * @return void
87
- */
88
- public function configure()
89
- {
90
- register_setting($this->getSlug(), $this->options->getOptionName('_options'));
91
- }
92
-
93
- /**
94
- * Gets the settings page title
95
- *
96
- * @since 2.0
97
- * @author Remy Perona
98
- *
99
- * @return string
100
- */
101
- public function getPageTitle()
102
- {
103
- return __('LazyLoad by WP Rocket', 'rocket-lazy-load');
104
- }
105
-
106
- /**
107
- * Gets the settings submenu title
108
- *
109
- * @since 2.0
110
- * @author Remy Perona
111
- *
112
- * @return string
113
- */
114
- public function getMenuTitle()
115
- {
116
- return __('LazyLoad', 'rocket-lazy-load');
117
- }
118
-
119
- /**
120
- * Gets the plugin slug
121
- *
122
- * @since 2.0
123
- * @author Remy Perona
124
- *
125
- * @return string
126
- */
127
- public function getSlug()
128
- {
129
- return $this->slug;
130
- }
131
-
132
- /**
133
- * Gets the plugin required capability
134
- *
135
- * @since 2.0
136
- * @author Remy Perona
137
- *
138
- * @return string
139
- */
140
- public function getCapability()
141
- {
142
- return 'manage_options';
143
- }
144
-
145
- /**
146
- * Renders the admin page template
147
- *
148
- * @since 2.0
149
- * @author Remy Perona
150
- *
151
- * @return void
152
- */
153
- public function renderPage()
154
- {
155
- $this->renderTemplate('admin-page');
156
- }
157
-
158
- /**
159
- * Renders the given template if it's readable.
160
- *
161
- * @since 2.0
162
- * @author Remy Perona
163
- *
164
- * @param string $template Template name.
165
- */
166
- protected function renderTemplate($template)
167
- {
168
- $template_path = $this->template_path . $template . '.php';
169
-
170
- if (! is_readable($template_path)) {
171
- return;
172
- }
173
-
174
- include $template_path;
175
- }
176
- }
1
+ <?php
2
+ /**
3
+ * Admin Page Class
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Admin;
9
+
10
+ defined('ABSPATH') || die('Cheatin\' uh?');
11
+
12
+ use RocketLazyLoadPlugin\Options\Options;
13
+ use RocketLazyLoadPlugin\Options\OptionArray;
14
+
15
+ /**
16
+ * Admin page configuration
17
+ *
18
+ * @since 2.0
19
+ * @author Remy Perona
20
+ */
21
+ class AdminPage
22
+ {
23
+ /**
24
+ * Plugin slug
25
+ *
26
+ * @since 2.0
27
+ * @author Remy Perona
28
+ *
29
+ * @var string
30
+ */
31
+ private $slug = 'rocket_lazyload';
32
+
33
+ /**
34
+ * Options instance
35
+ *
36
+ * @since 2.0
37
+ * @author Remy Perona
38
+ *
39
+ * @var Options
40
+ */
41
+ private $options;
42
+
43
+ /**
44
+ * OptionArray instance
45
+ *
46
+ * @since 2.0
47
+ * @author Remy Perona
48
+ *
49
+ * @var OptionArray
50
+ */
51
+ private $option_array;
52
+
53
+ /**
54
+ * Template path
55
+ *
56
+ * @since 2.0
57
+ * @author Remy Perona
58
+ *
59
+ * @var string
60
+ */
61
+ private $template_path;
62
+
63
+ /**
64
+ * Constructor
65
+ *
66
+ * @since 2.0
67
+ * @author Remy Perona
68
+ *
69
+ * @param Options $options Options instance.
70
+ * @param OptionArray $option_array OptionArray instance.
71
+ * @param string $template_path Template path.
72
+ */
73
+ public function __construct(Options $options, OptionArray $option_array, $template_path)
74
+ {
75
+ $this->options = $options;
76
+ $this->option_array = $option_array;
77
+ $this->template_path = $template_path;
78
+ }
79
+
80
+ /**
81
+ * Registers plugin settings with WordPress
82
+ *
83
+ * @since 2.0
84
+ * @author Remy Perona
85
+ *
86
+ * @return void
87
+ */
88
+ public function configure()
89
+ {
90
+ register_setting($this->getSlug(), $this->options->getOptionName('_options'));
91
+ }
92
+
93
+ /**
94
+ * Gets the settings page title
95
+ *
96
+ * @since 2.0
97
+ * @author Remy Perona
98
+ *
99
+ * @return string
100
+ */
101
+ public function getPageTitle()
102
+ {
103
+ return __('LazyLoad by WP Rocket', 'rocket-lazy-load');
104
+ }
105
+
106
+ /**
107
+ * Gets the settings submenu title
108
+ *
109
+ * @since 2.0
110
+ * @author Remy Perona
111
+ *
112
+ * @return string
113
+ */
114
+ public function getMenuTitle()
115
+ {
116
+ return __('LazyLoad', 'rocket-lazy-load');
117
+ }
118
+
119
+ /**
120
+ * Gets the plugin slug
121
+ *
122
+ * @since 2.0
123
+ * @author Remy Perona
124
+ *
125
+ * @return string
126
+ */
127
+ public function getSlug()
128
+ {
129
+ return $this->slug;
130
+ }
131
+
132
+ /**
133
+ * Gets the plugin required capability
134
+ *
135
+ * @since 2.0
136
+ * @author Remy Perona
137
+ *
138
+ * @return string
139
+ */
140
+ public function getCapability()
141
+ {
142
+ return 'manage_options';
143
+ }
144
+
145
+ /**
146
+ * Renders the admin page template
147
+ *
148
+ * @since 2.0
149
+ * @author Remy Perona
150
+ *
151
+ * @return void
152
+ */
153
+ public function renderPage()
154
+ {
155
+ $this->renderTemplate('admin-page');
156
+ }
157
+
158
+ /**
159
+ * Renders the given template if it's readable.
160
+ *
161
+ * @since 2.0
162
+ * @author Remy Perona
163
+ *
164
+ * @param string $template Template name.
165
+ */
166
+ protected function renderTemplate($template)
167
+ {
168
+ $template_path = $this->template_path . $template . '.php';
169
+
170
+ if (! is_readable($template_path)) {
171
+ return;
172
+ }
173
+
174
+ include $template_path;
175
+ }
176
+ }
src/Admin/ImagifyNotice.php CHANGED
@@ -1,72 +1,72 @@
1
- <?php
2
- /**
3
- * Imagify Notice Class
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Admin;
9
-
10
- /**
11
- * Imagify Notice display
12
- *
13
- * @since 2.0
14
- * @author Remy Perona
15
- */
16
- class ImagifyNotice
17
- {
18
- /**
19
- * Template path
20
- *
21
- * @since 2.0
22
- * @author Remy Perona
23
- *
24
- * @var string
25
- */
26
- private $template_path;
27
-
28
- /**
29
- * Constructor
30
- *
31
- * @since 2.0
32
- * @author Remy Perona
33
- *
34
- * @param string $template_path Template path.
35
- */
36
- public function __construct($template_path)
37
- {
38
- $this->template_path = $template_path;
39
- }
40
-
41
- /**
42
- * Renders the Imagify notice
43
- *
44
- * @since 2.0
45
- * @author Remy Perona
46
- *
47
- * @return void
48
- */
49
- public function displayNotice()
50
- {
51
- $this->renderTemplate('imagify-notice');
52
- }
53
-
54
- /**
55
- * Renders the given template if it's readable.
56
- *
57
- * @since 2.0
58
- * @author Remy Perona
59
- *
60
- * @param string $template Template name.
61
- */
62
- protected function renderTemplate($template)
63
- {
64
- $template_path = $this->template_path . $template . '.php';
65
-
66
- if (! is_readable($template_path)) {
67
- return;
68
- }
69
-
70
- include $template_path;
71
- }
72
- }
1
+ <?php
2
+ /**
3
+ * Imagify Notice Class
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Admin;
9
+
10
+ /**
11
+ * Imagify Notice display
12
+ *
13
+ * @since 2.0
14
+ * @author Remy Perona
15
+ */
16
+ class ImagifyNotice
17
+ {
18
+ /**
19
+ * Template path
20
+ *
21
+ * @since 2.0
22
+ * @author Remy Perona
23
+ *
24
+ * @var string
25
+ */
26
+ private $template_path;
27
+
28
+ /**
29
+ * Constructor
30
+ *
31
+ * @since 2.0
32
+ * @author Remy Perona
33
+ *
34
+ * @param string $template_path Template path.
35
+ */
36
+ public function __construct($template_path)
37
+ {
38
+ $this->template_path = $template_path;
39
+ }
40
+
41
+ /**
42
+ * Renders the Imagify notice
43
+ *
44
+ * @since 2.0
45
+ * @author Remy Perona
46
+ *
47
+ * @return void
48
+ */
49
+ public function displayNotice()
50
+ {
51
+ $this->renderTemplate('imagify-notice');
52
+ }
53
+
54
+ /**
55
+ * Renders the given template if it's readable.
56
+ *
57
+ * @since 2.0
58
+ * @author Remy Perona
59
+ *
60
+ * @param string $template Template name.
61
+ */
62
+ protected function renderTemplate($template)
63
+ {
64
+ $template_path = $this->template_path . $template . '.php';
65
+
66
+ if (! is_readable($template_path)) {
67
+ return;
68
+ }
69
+
70
+ include $template_path;
71
+ }
72
+ }
src/Dependencies/Interop/Container/ContainerInterface.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
4
+ */
5
+
6
+ namespace RocketLazyLoadPlugin\Dependencies\Interop\Container;
7
+
8
+ use RocketLazyLoadPlugin\Dependencies\Psr\Container\ContainerInterface as PsrContainerInterface;
9
+
10
+ /**
11
+ * Describes the interface of a container that exposes methods to read its entries.
12
+ */
13
+ interface ContainerInterface extends PsrContainerInterface
14
+ {
15
+ }
src/Dependencies/Interop/Container/Exception/ContainerException.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
4
+ */
5
+
6
+ namespace RocketLazyLoadPlugin\Dependencies\Interop\Container\Exception;
7
+
8
+ use RocketLazyLoadPlugin\Dependencies\Psr\Container\ContainerExceptionInterface as PsrContainerException;
9
+
10
+ /**
11
+ * Base interface representing a generic exception in a container.
12
+ */
13
+ interface ContainerException extends PsrContainerException
14
+ {
15
+ }
src/Dependencies/Interop/Container/Exception/NotFoundException.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
4
+ */
5
+
6
+ namespace RocketLazyLoadPlugin\Dependencies\Interop\Container\Exception;
7
+
8
+ use RocketLazyLoadPlugin\Dependencies\Psr\Container\NotFoundExceptionInterface as PsrNotFoundException;
9
+
10
+ /**
11
+ * No entry was found in the container.
12
+ */
13
+ interface NotFoundException extends ContainerException, PsrNotFoundException
14
+ {
15
+ }
src/Dependencies/League/Container/Argument/ArgumentResolverInterface.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Argument;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareInterface;
6
+ use ReflectionFunctionAbstract;
7
+
8
+ interface ArgumentResolverInterface extends ImmutableContainerAwareInterface
9
+ {
10
+ /**
11
+ * Resolve an array of arguments to their concrete implementations.
12
+ *
13
+ * @param array $arguments
14
+ * @return array
15
+ */
16
+ public function resolveArguments(array $arguments);
17
+
18
+ /**
19
+ * Resolves the correct arguments to be passed to a method.
20
+ *
21
+ * @param \ReflectionFunctionAbstract $method
22
+ * @param array $args
23
+ * @return array
24
+ */
25
+ public function reflectArguments(ReflectionFunctionAbstract $method, array $args = []);
26
+ }
src/Dependencies/League/Container/Argument/ArgumentResolverTrait.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Argument;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Exception\NotFoundException;
6
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ReflectionContainer;
7
+ use ReflectionFunctionAbstract;
8
+ use ReflectionParameter;
9
+
10
+ trait ArgumentResolverTrait
11
+ {
12
+ /**
13
+ * {@inheritdoc}
14
+ */
15
+ public function resolveArguments(array $arguments)
16
+ {
17
+ foreach ($arguments as &$arg) {
18
+ if ($arg instanceof RawArgumentInterface) {
19
+ $arg = $arg->getValue();
20
+ continue;
21
+ }
22
+
23
+ if (! is_string($arg)) {
24
+ continue;
25
+ }
26
+
27
+ $container = $this->getContainer();
28
+
29
+ if (is_null($container) && $this instanceof ReflectionContainer) {
30
+ $container = $this;
31
+ }
32
+
33
+ if (! is_null($container) && $container->has($arg)) {
34
+ $arg = $container->get($arg);
35
+
36
+ if ($arg instanceof RawArgumentInterface) {
37
+ $arg = $arg->getValue();
38
+ }
39
+
40
+ continue;
41
+ }
42
+ }
43
+
44
+ return $arguments;
45
+ }
46
+
47
+ /**
48
+ * {@inheritdoc}
49
+ */
50
+ public function reflectArguments(ReflectionFunctionAbstract $method, array $args = [])
51
+ {
52
+ $arguments = array_map(function (ReflectionParameter $param) use ($method, $args) {
53
+ $name = $param->getName();
54
+ $class = $param->getClass();
55
+
56
+ if (array_key_exists($name, $args)) {
57
+ return $args[$name];
58
+ }
59
+
60
+ if (! is_null($class)) {
61
+ return $class->getName();
62
+ }
63
+
64
+ if ($param->isDefaultValueAvailable()) {
65
+ return $param->getDefaultValue();
66
+ }
67
+
68
+ throw new NotFoundException(sprintf(
69
+ 'Unable to resolve a value for parameter (%s) in the function/method (%s)',
70
+ $name,
71
+ $method->getName()
72
+ ));
73
+ }, $method->getParameters());
74
+
75
+ return $this->resolveArguments($arguments);
76
+ }
77
+
78
+ /**
79
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\ContainerInterface
80
+ */
81
+ abstract public function getContainer();
82
+ }
src/Dependencies/League/Container/Argument/RawArgument.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Argument;
4
+
5
+ class RawArgument implements RawArgumentInterface
6
+ {
7
+ /**
8
+ * @var mixed
9
+ */
10
+ protected $value;
11
+
12
+ /**
13
+ * {@inheritdoc}
14
+ */
15
+ public function __construct($value)
16
+ {
17
+ $this->value = $value;
18
+ }
19
+
20
+ /**
21
+ * {@inheritdoc}
22
+ */
23
+ public function getValue()
24
+ {
25
+ return $this->value;
26
+ }
27
+ }
src/Dependencies/League/Container/Argument/RawArgumentInterface.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Argument;
4
+
5
+ interface RawArgumentInterface
6
+ {
7
+ /**
8
+ * Return the value of the raw argument.
9
+ *
10
+ * @return mixed
11
+ */
12
+ public function getValue();
13
+ }
src/Dependencies/League/Container/Container.php ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface as InteropContainerInterface;
6
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\RawArgumentInterface;
7
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionFactory;
8
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionFactoryInterface;
9
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionInterface;
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Exception\NotFoundException;
11
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Inflector\InflectorAggregate;
12
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Inflector\InflectorAggregateInterface;
13
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderAggregate;
14
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderAggregateInterface;
15
+
16
+ class Container implements ContainerInterface
17
+ {
18
+ /**
19
+ * @var \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionFactoryInterface
20
+ */
21
+ protected $definitionFactory;
22
+
23
+ /**
24
+ * @var \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionInterface[]
25
+ */
26
+ protected $definitions = [];
27
+
28
+ /**
29
+ * @var \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionInterface[]
30
+ */
31
+ protected $sharedDefinitions = [];
32
+
33
+ /**
34
+ * @var \RocketLazyLoadPlugin\Dependencies\League\Container\Inflector\InflectorAggregateInterface
35
+ */
36
+ protected $inflectors;
37
+
38
+ /**
39
+ * @var \RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderAggregateInterface
40
+ */
41
+ protected $providers;
42
+
43
+ /**
44
+ * @var array
45
+ */
46
+ protected $shared = [];
47
+
48
+ /**
49
+ * @var \RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface[]
50
+ */
51
+ protected $delegates = [];
52
+
53
+ /**
54
+ * Constructor.
55
+ *
56
+ * @param \RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderAggregateInterface|null $providers
57
+ * @param \RocketLazyLoadPlugin\Dependencies\League\Container\Inflector\InflectorAggregateInterface|null $inflectors
58
+ * @param \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionFactoryInterface|null $definitionFactory
59
+ */
60
+ public function __construct(
61
+ ServiceProviderAggregateInterface $providers = null,
62
+ InflectorAggregateInterface $inflectors = null,
63
+ DefinitionFactoryInterface $definitionFactory = null
64
+ ) {
65
+ // set required dependencies
66
+ $this->providers = (is_null($providers))
67
+ ? (new ServiceProviderAggregate)->setContainer($this)
68
+ : $providers->setContainer($this);
69
+
70
+ $this->inflectors = (is_null($inflectors))
71
+ ? (new InflectorAggregate)->setContainer($this)
72
+ : $inflectors->setContainer($this);
73
+
74
+ $this->definitionFactory = (is_null($definitionFactory))
75
+ ? (new DefinitionFactory)->setContainer($this)
76
+ : $definitionFactory->setContainer($this);
77
+ }
78
+
79
+ /**
80
+ * {@inheritdoc}
81
+ */
82
+ public function get($alias, array $args = [])
83
+ {
84
+ try {
85
+ return $this->getFromThisContainer($alias, $args);
86
+ } catch (NotFoundException $exception) {
87
+ if ($this->providers->provides($alias)) {
88
+ $this->providers->register($alias);
89
+
90
+ return $this->getFromThisContainer($alias, $args);
91
+ }
92
+
93
+ $resolved = $this->getFromDelegate($alias, $args);
94
+
95
+ return $this->inflectors->inflect($resolved);
96
+ }
97
+ }
98
+
99
+ /**
100
+ * {@inheritdoc}
101
+ */
102
+ public function has($alias)
103
+ {
104
+ if (array_key_exists($alias, $this->definitions) || $this->hasShared($alias)) {
105
+ return true;
106
+ }
107
+
108
+ if ($this->providers->provides($alias)) {
109
+ return true;
110
+ }
111
+
112
+ return $this->hasInDelegate($alias);
113
+ }
114
+
115
+ /**
116
+ * Returns a boolean to determine if the container has a shared instance of an alias.
117
+ *
118
+ * @param string $alias
119
+ * @param boolean $resolved
120
+ * @return boolean
121
+ */
122
+ public function hasShared($alias, $resolved = false)
123
+ {
124
+ $shared = ($resolved === false) ? array_merge($this->shared, $this->sharedDefinitions) : $this->shared;
125
+
126
+ return (array_key_exists($alias, $shared));
127
+ }
128
+
129
+ /**
130
+ * {@inheritdoc}
131
+ */
132
+ public function add($alias, $concrete = null, $share = false)
133
+ {
134
+ unset($this->shared[$alias]);
135
+ unset($this->definitions[$alias]);
136
+ unset($this->sharedDefinitions[$alias]);
137
+
138
+ if (is_null($concrete)) {
139
+ $concrete = $alias;
140
+ }
141
+
142
+ $definition = $this->definitionFactory->getDefinition($alias, $concrete);
143
+
144
+ if ($definition instanceof DefinitionInterface) {
145
+ if ($share === false) {
146
+ $this->definitions[$alias] = $definition;
147
+ } else {
148
+ $this->sharedDefinitions[$alias] = $definition;
149
+ }
150
+
151
+ return $definition;
152
+ }
153
+
154
+ // dealing with a value that cannot build a definition
155
+ $this->shared[$alias] = $concrete;
156
+ }
157
+
158
+ /**
159
+ * {@inheritdoc}
160
+ */
161
+ public function share($alias, $concrete = null)
162
+ {
163
+ return $this->add($alias, $concrete, true);
164
+ }
165
+
166
+ /**
167
+ * {@inheritdoc}
168
+ */
169
+ public function addServiceProvider($provider)
170
+ {
171
+ $this->providers->add($provider);
172
+
173
+ return $this;
174
+ }
175
+
176
+ /**
177
+ * {@inheritdoc}
178
+ */
179
+ public function extend($alias)
180
+ {
181
+ if ($this->providers->provides($alias)) {
182
+ $this->providers->register($alias);
183
+ }
184
+
185
+ if (array_key_exists($alias, $this->definitions)) {
186
+ return $this->definitions[$alias];
187
+ }
188
+
189
+ if (array_key_exists($alias, $this->sharedDefinitions)) {
190
+ return $this->sharedDefinitions[$alias];
191
+ }
192
+
193
+ throw new NotFoundException(
194
+ sprintf('Unable to extend alias (%s) as it is not being managed as a definition', $alias)
195
+ );
196
+ }
197
+
198
+ /**
199
+ * {@inheritdoc}
200
+ */
201
+ public function inflector($type, callable $callback = null)
202
+ {
203
+ return $this->inflectors->add($type, $callback);
204
+ }
205
+
206
+ /**
207
+ * {@inheritdoc}
208
+ */
209
+ public function call(callable $callable, array $args = [])
210
+ {
211
+ return (new ReflectionContainer)->setContainer($this)->call($callable, $args);
212
+ }
213
+
214
+ /**
215
+ * Delegate a backup container to be checked for services if it
216
+ * cannot be resolved via this container.
217
+ *
218
+ * @param \RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface $container
219
+ * @return $this
220
+ */
221
+ public function delegate(InteropContainerInterface $container)
222
+ {
223
+ $this->delegates[] = $container;
224
+
225
+ if ($container instanceof ImmutableContainerAwareInterface) {
226
+ $container->setContainer($this);
227
+ }
228
+
229
+ return $this;
230
+ }
231
+
232
+ /**
233
+ * Returns true if service is registered in one of the delegated backup containers.
234
+ *
235
+ * @param string $alias
236
+ * @return boolean
237
+ */
238
+ public function hasInDelegate($alias)
239
+ {
240
+ foreach ($this->delegates as $container) {
241
+ if ($container->has($alias)) {
242
+ return true;
243
+ }
244
+ }
245
+
246
+ return false;
247
+ }
248
+
249
+ /**
250
+ * Attempt to get a service from the stack of delegated backup containers.
251
+ *
252
+ * @param string $alias
253
+ * @param array $args
254
+ * @return mixed
255
+ */
256
+ protected function getFromDelegate($alias, array $args = [])
257
+ {
258
+ foreach ($this->delegates as $container) {
259
+ if ($container->has($alias)) {
260
+ return $container->get($alias, $args);
261
+ }
262
+
263
+ continue;
264
+ }
265
+
266
+ throw new NotFoundException(
267
+ sprintf('Alias (%s) is not being managed by the container', $alias)
268
+ );
269
+
270
+ }
271
+
272
+ /**
273
+ * Get a service that has been registered in this container.
274
+ *
275
+ * @param string $alias
276
+ * @param array $args
277
+ * @return mixed
278
+ */
279
+ protected function getFromThisContainer($alias, array $args = [])
280
+ {
281
+ if ($this->hasShared($alias, true)) {
282
+ $shared = $this->inflectors->inflect($this->shared[$alias]);
283
+ if ($shared instanceof RawArgumentInterface) {
284
+ return $shared->getValue();
285
+ }
286
+ return $shared;
287
+ }
288
+
289
+ if (array_key_exists($alias, $this->sharedDefinitions)) {
290
+ $shared = $this->inflectors->inflect($this->sharedDefinitions[$alias]->build());
291
+ $this->shared[$alias] = $shared;
292
+ return $shared;
293
+ }
294
+
295
+ if (array_key_exists($alias, $this->definitions)) {
296
+ return $this->inflectors->inflect(
297
+ $this->definitions[$alias]->build($args)
298
+ );
299
+ }
300
+
301
+ throw new NotFoundException(
302
+ sprintf('Alias (%s) is not being managed by the container', $alias)
303
+ );
304
+ }
305
+ }
src/Dependencies/League/Container/ContainerAwareInterface.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ interface ContainerAwareInterface
6
+ {
7
+ /**
8
+ * Set a container
9
+ *
10
+ * @param \RocketLazyLoadPlugin\Dependencies\League\Container\ContainerInterface $container
11
+ */
12
+ public function setContainer(ContainerInterface $container);
13
+
14
+ /**
15
+ * Get the container
16
+ *
17
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\ContainerInterface
18
+ */
19
+ public function getContainer();
20
+ }
src/Dependencies/League/Container/ContainerAwareTrait.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ trait ContainerAwareTrait
6
+ {
7
+ /**
8
+ * @var \RocketLazyLoadPlugin\Dependencies\League\Container\ContainerInterface
9
+ */
10
+ protected $container;
11
+
12
+ /**
13
+ * Set a container.
14
+ *
15
+ * @param \RocketLazyLoadPlugin\Dependencies\League\Container\ContainerInterface $container
16
+ * @return $this
17
+ */
18
+ public function setContainer(ContainerInterface $container)
19
+ {
20
+ $this->container = $container;
21
+
22
+ return $this;
23
+ }
24
+
25
+ /**
26
+ * Get the container.
27
+ *
28
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\ContainerInterface
29
+ */
30
+ public function getContainer()
31
+ {
32
+ return $this->container;
33
+ }
34
+ }
src/Dependencies/League/Container/ContainerInterface.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ interface ContainerInterface extends ImmutableContainerInterface
6
+ {
7
+ /**
8
+ * Add an item to the container.
9
+ *
10
+ * @param string $alias
11
+ * @param mixed|null $concrete
12
+ * @param boolean $share
13
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionInterface
14
+ */
15
+ public function add($alias, $concrete = null, $share = false);
16
+
17
+ /**
18
+ * Convenience method to add an item to the container as a shared item.
19
+ *
20
+ * @param string $alias
21
+ * @param mixed|null $concrete
22
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionInterface
23
+ */
24
+ public function share($alias, $concrete = null);
25
+
26
+ /**
27
+ * Add a service provider to the container.
28
+ *
29
+ * @param string|\RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderInterface $provider
30
+ * @return void
31
+ */
32
+ public function addServiceProvider($provider);
33
+
34
+ /**
35
+ * Returns a definition of an item to be extended.
36
+ *
37
+ * @param string $alias
38
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\Definition\DefinitionInterface
39
+ */
40
+ public function extend($alias);
41
+
42
+ /**
43
+ * Allows for manipulation of specific types on resolution.
44
+ *
45
+ * @param string $type
46
+ * @param callable|null $callback
47
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\Inflector\Inflector|void
48
+ */
49
+ public function inflector($type, callable $callback = null);
50
+
51
+ /**
52
+ * Invoke a callable via the container.
53
+ *
54
+ * @param callable $callable
55
+ * @param array $args
56
+ * @return mixed
57
+ */
58
+ public function call(callable $callable, array $args = []);
59
+ }
src/Dependencies/League/Container/Definition/AbstractDefinition.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\ArgumentResolverInterface;
6
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\ArgumentResolverTrait;
7
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareTrait;
8
+
9
+ abstract class AbstractDefinition implements ArgumentResolverInterface, DefinitionInterface
10
+ {
11
+ use ArgumentResolverTrait;
12
+ use ImmutableContainerAwareTrait;
13
+
14
+ /**
15
+ * @var string
16
+ */
17
+ protected $alias;
18
+
19
+ /**
20
+ * @var mixed
21
+ */
22
+ protected $concrete;
23
+
24
+ /**
25
+ * @var array
26
+ */
27
+ protected $arguments = [];
28
+
29
+ /**
30
+ * Constructor.
31
+ *
32
+ * @param string $alias
33
+ * @param mixed $concrete
34
+ */
35
+ public function __construct($alias, $concrete)
36
+ {
37
+ $this->alias = $alias;
38
+ $this->concrete = $concrete;
39
+ }
40
+
41
+ /**
42
+ * {@inheritdoc}
43
+ */
44
+ public function withArgument($arg)
45
+ {
46
+ $this->arguments[] = $arg;
47
+
48
+ return $this;
49
+ }
50
+
51
+ /**
52
+ * {@inheritdoc}
53
+ */
54
+ public function withArguments(array $args)
55
+ {
56
+ foreach ($args as $arg) {
57
+ $this->withArgument($arg);
58
+ }
59
+
60
+ return $this;
61
+ }
62
+ }
src/Dependencies/League/Container/Definition/CallableDefinition.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ class CallableDefinition extends AbstractDefinition
6
+ {
7
+ /**
8
+ * {@inheritdoc}
9
+ */
10
+ public function build(array $args = [])
11
+ {
12
+ $args = (empty($args)) ? $this->arguments : $args;
13
+ $resolved = $this->resolveArguments($args);
14
+
15
+ if (is_array($this->concrete) && is_string($this->concrete[0])) {
16
+ $this->concrete[0] = ($this->getContainer()->has($this->concrete[0]))
17
+ ? $this->getContainer()->get($this->concrete[0])
18
+ : $this->concrete[0];
19
+ }
20
+
21
+ return call_user_func_array($this->concrete, $resolved);
22
+ }
23
+ }
src/Dependencies/League/Container/Definition/ClassDefinition.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ use ReflectionClass;
6
+
7
+ class ClassDefinition extends AbstractDefinition implements ClassDefinitionInterface
8
+ {
9
+ /**
10
+ * @var array
11
+ */
12
+ protected $methods = [];
13
+
14
+ /**
15
+ * {@inheritdoc}
16
+ */
17
+ public function withMethodCall($method, array $args = [])
18
+ {
19
+ $this->methods[] = [
20
+ 'method' => $method,
21
+ 'arguments' => $args
22
+ ];
23
+
24
+ return $this;
25
+ }
26
+
27
+ /**
28
+ * {@inheritdoc}
29
+ */
30
+ public function withMethodCalls(array $methods = [])
31
+ {
32
+ foreach ($methods as $method => $args) {
33
+ $this->withMethodCall($method, $args);
34
+ }
35
+
36
+ return $this;
37
+ }
38
+
39
+ /**
40
+ * {@inheritdoc}
41
+ */
42
+ public function build(array $args = [])
43
+ {
44
+ $args = (empty($args)) ? $this->arguments : $args;
45
+ $resolved = $this->resolveArguments($args);
46
+ $reflection = new ReflectionClass($this->concrete);
47
+ $instance = $reflection->newInstanceArgs($resolved);
48
+
49
+ return $this->invokeMethods($instance);
50
+ }
51
+
52
+ /**
53
+ * Invoke methods on resolved instance.
54
+ *
55
+ * @param object $instance
56
+ * @return object
57
+ */
58
+ protected function invokeMethods($instance)
59
+ {
60
+ foreach ($this->methods as $method) {
61
+ $args = $this->resolveArguments($method['arguments']);
62
+ call_user_func_array([$instance, $method['method']], $args);
63
+ }
64
+
65
+ return $instance;
66
+ }
67
+ }
src/Dependencies/League/Container/Definition/ClassDefinitionInterface.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ interface ClassDefinitionInterface extends DefinitionInterface
6
+ {
7
+ /**
8
+ * Add a method to be invoked
9
+ *
10
+ * @param string $method
11
+ * @param array $args
12
+ * @return $this
13
+ */
14
+ public function withMethodCall($method, array $args = []);
15
+
16
+ /**
17
+ * Add multiple methods to be invoked
18
+ *
19
+ * @param array $methods
20
+ * @return $this
21
+ */
22
+ public function withMethodCalls(array $methods = []);
23
+ }
src/Dependencies/League/Container/Definition/DefinitionFactory.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareTrait;
6
+
7
+ class DefinitionFactory implements DefinitionFactoryInterface
8
+ {
9
+ use ImmutableContainerAwareTrait;
10
+
11
+ /**
12
+ * {@inheritdoc}
13
+ */
14
+ public function getDefinition($alias, $concrete)
15
+ {
16
+ if (is_callable($concrete)) {
17
+ return (new CallableDefinition($alias, $concrete))->setContainer($this->getContainer());
18
+ }
19
+
20
+ if (is_string($concrete) && class_exists($concrete)) {
21
+ return (new ClassDefinition($alias, $concrete))->setContainer($this->getContainer());
22
+ }
23
+
24
+ // if the item is not definable we just return the value to be stored
25
+ // in the container as an arbitrary value/instance
26
+ return $concrete;
27
+ }
28
+ }
src/Dependencies/League/Container/Definition/DefinitionFactoryInterface.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareInterface;
6
+
7
+ interface DefinitionFactoryInterface extends ImmutableContainerAwareInterface
8
+ {
9
+ /**
10
+ * Return a definition based on type of concrete.
11
+ *
12
+ * @param string $alias
13
+ * @param mixed $concrete
14
+ * @return mixed
15
+ */
16
+ public function getDefinition($alias, $concrete);
17
+ }
src/Dependencies/League/Container/Definition/DefinitionInterface.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Definition;
4
+
5
+ interface DefinitionInterface
6
+ {
7
+ /**
8
+ * Handle instantiation and manipulation of value and return.
9
+ *
10
+ * @param array $args
11
+ * @return mixed
12
+ */
13
+ public function build(array $args = []);
14
+
15
+ /**
16
+ * Add an argument to be injected.
17
+ *
18
+ * @param mixed $arg
19
+ * @return $this
20
+ */
21
+ public function withArgument($arg);
22
+
23
+ /**
24
+ * Add multiple arguments to be injected.
25
+ *
26
+ * @param array $args
27
+ * @return $this
28
+ */
29
+ public function withArguments(array $args);
30
+ }
src/Dependencies/League/Container/Exception/NotFoundException.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Exception;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\Interop\Container\Exception\NotFoundException as NotFoundExceptionInterface;
6
+ use InvalidArgumentException;
7
+
8
+ class NotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
9
+ {
10
+ }
src/Dependencies/League/Container/ImmutableContainerAwareInterface.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface as InteropContainerInterface;
6
+
7
+ interface ImmutableContainerAwareInterface
8
+ {
9
+ /**
10
+ * Set a container
11
+ *
12
+ * @param \RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface $container
13
+ */
14
+ public function setContainer(InteropContainerInterface $container);
15
+
16
+ /**
17
+ * Get the container
18
+ *
19
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerInterface
20
+ */
21
+ public function getContainer();
22
+ }
src/Dependencies/League/Container/ImmutableContainerAwareTrait.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface as InteropContainerInterface;
6
+
7
+ trait ImmutableContainerAwareTrait
8
+ {
9
+ /**
10
+ * @var \RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface
11
+ */
12
+ protected $container;
13
+
14
+ /**
15
+ * Set a container.
16
+ *
17
+ * @param \RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface $container
18
+ * @return $this
19
+ */
20
+ public function setContainer(InteropContainerInterface $container)
21
+ {
22
+ $this->container = $container;
23
+
24
+ return $this;
25
+ }
26
+
27
+ /**
28
+ * Get the container.
29
+ *
30
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerInterface
31
+ */
32
+ public function getContainer()
33
+ {
34
+ return $this->container;
35
+ }
36
+ }
src/Dependencies/League/Container/ImmutableContainerInterface.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\Interop\Container\ContainerInterface as InteropContainerInterface;
6
+
7
+ interface ImmutableContainerInterface extends InteropContainerInterface
8
+ {
9
+
10
+ }
src/Dependencies/League/Container/Inflector/Inflector.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Inflector;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareTrait;
6
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\ArgumentResolverInterface;
7
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\ArgumentResolverTrait;
8
+
9
+ class Inflector implements ArgumentResolverInterface
10
+ {
11
+ use ArgumentResolverTrait;
12
+ use ImmutableContainerAwareTrait;
13
+
14
+ /**
15
+ * @var array
16
+ */
17
+ protected $methods = [];
18
+
19
+ /**
20
+ * @var array
21
+ */
22
+ protected $properties = [];
23
+
24
+ /**
25
+ * Defines a method to be invoked on the subject object.
26
+ *
27
+ * @param string $name
28
+ * @param array $args
29
+ * @return $this
30
+ */
31
+ public function invokeMethod($name, array $args)
32
+ {
33
+ $this->methods[$name] = $args;
34
+
35
+ return $this;
36
+ }
37
+
38
+ /**
39
+ * Defines multiple methods to be invoked on the subject object.
40
+ *
41
+ * @param array $methods
42
+ * @return $this
43
+ */
44
+ public function invokeMethods(array $methods)
45
+ {
46
+ foreach ($methods as $name => $args) {
47
+ $this->invokeMethod($name, $args);
48
+ }
49
+
50
+ return $this;
51
+ }
52
+
53
+ /**
54
+ * Defines a property to be set on the subject object.
55
+ *
56
+ * @param string $property
57
+ * @param mixed $value
58
+ * @return $this
59
+ */
60
+ public function setProperty($property, $value)
61
+ {
62
+ $this->properties[$property] = $value;
63
+
64
+ return $this;
65
+ }
66
+
67
+ /**
68
+ * Defines multiple properties to be set on the subject object.
69
+ *
70
+ * @param array $properties
71
+ * @return $this
72
+ */
73
+ public function setProperties(array $properties)
74
+ {
75
+ foreach ($properties as $property => $value) {
76
+ $this->setProperty($property, $value);
77
+ }
78
+
79
+ return $this;
80
+ }
81
+
82
+ /**
83
+ * Apply inflections to an object.
84
+ *
85
+ * @param object $object
86
+ * @return void
87
+ */
88
+ public function inflect($object)
89
+ {
90
+ $properties = $this->resolveArguments(array_values($this->properties));
91
+ $properties = array_combine(array_keys($this->properties), $properties);
92
+
93
+ foreach ($properties as $property => $value) {
94
+ $object->{$property} = $value;
95
+ }
96
+
97
+ foreach ($this->methods as $method => $args) {
98
+ $args = $this->resolveArguments($args);
99
+
100
+ call_user_func_array([$object, $method], $args);
101
+ }
102
+ }
103
+ }
src/Dependencies/League/Container/Inflector/InflectorAggregate.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Inflector;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareTrait;
6
+
7
+ class InflectorAggregate implements InflectorAggregateInterface
8
+ {
9
+ use ImmutableContainerAwareTrait;
10
+
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $inflectors = [];
15
+
16
+ /**
17
+ * {@inheritdoc}
18
+ */
19
+ public function add($type, callable $callback = null)
20
+ {
21
+ if (is_null($callback)) {
22
+ $inflector = new Inflector;
23
+ $this->inflectors[$type] = $inflector;
24
+
25
+ return $inflector;
26
+ }
27
+
28
+ $this->inflectors[$type] = $callback;
29
+ }
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public function inflect($object)
35
+ {
36
+ foreach ($this->inflectors as $type => $inflector) {
37
+ if (! $object instanceof $type) {
38
+ continue;
39
+ }
40
+
41
+ if ($inflector instanceof Inflector) {
42
+ $inflector->setContainer($this->getContainer());
43
+ $inflector->inflect($object);
44
+ continue;
45
+ }
46
+
47
+ // must be dealing with a callable as the inflector
48
+ call_user_func_array($inflector, [$object]);
49
+ }
50
+
51
+ return $object;
52
+ }
53
+ }
src/Dependencies/League/Container/Inflector/InflectorAggregateInterface.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\Inflector;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ImmutableContainerAwareInterface;
6
+
7
+ interface InflectorAggregateInterface extends ImmutableContainerAwareInterface
8
+ {
9
+ /**
10
+ * Add an inflector to the aggregate.
11
+ *
12
+ * @param string $type
13
+ * @param callable $callback
14
+ * @return \RocketLazyLoadPlugin\Dependencies\League\Container\Inflector\Inflector
15
+ */
16
+ public function add($type, callable $callback = null);
17
+
18
+ /**
19
+ * Applies all inflectors to an object.
20
+ *
21
+ * @param object $object
22
+ * @return object
23
+ */
24
+ public function inflect($object);
25
+ }
src/Dependencies/League/Container/ReflectionContainer.php ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\ArgumentResolverInterface;
6
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Argument\ArgumentResolverTrait;
7
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Exception\NotFoundException;
8
+ use ReflectionClass;
9
+ use ReflectionFunction;
10
+ use ReflectionMethod;
11
+
12
+ class ReflectionContainer implements
13
+ ArgumentResolverInterface,
14
+ ImmutableContainerInterface
15
+ {
16
+ use ArgumentResolverTrait;
17
+ use ImmutableContainerAwareTrait;
18
+
19
+ /**
20
+ * {@inheritdoc}
21
+ */
22
+ public function get($alias, array $args = [])
23
+ {
24
+ if (! $this->has($alias)) {
25
+ throw new NotFoundException(
26
+ sprintf('Alias (%s) is not an existing class and therefore cannot be resolved', $alias)
27
+ );
28
+ }
29
+
30
+ $reflector = new ReflectionClass($alias);
31
+ $construct = $reflector->getConstructor();
32
+
33
+ if ($construct === null) {
34
+ return new $alias;
35
+ }
36
+
37
+ return $reflector->newInstanceArgs(
38
+ $this->reflectArguments($construct, $args)
39
+ );
40
+ }
41
+
42
+ /**
43
+ * {@inheritdoc}
44
+ */
45
+ public function has($alias)
46
+ {
47
+ return class_exists($alias);
48
+ }
49
+
50
+ /**
51
+ * Invoke a callable via the container.
52
+ *
53
+ * @param callable $callable
54
+ * @param array $args
55
+ * @return mixed
56
+ */
57
+ public function call(callable $callable, array $args = [])
58
+ {
59
+ if (is_string($callable) && strpos($callable, '::') !== false) {
60
+ $callable = explode('::', $callable);
61
+ }
62
+
63
+ if (is_array($callable)) {
64
+ if (is_string($callable[0])) {
65
+ $callable[0] = $this->getContainer()->get($callable[0]);
66
+ }
67
+
68
+ $reflection = new ReflectionMethod($callable[0], $callable[1]);
69
+
70
+ if ($reflection->isStatic()) {
71
+ $callable[0] = null;
72
+ }
73
+
74
+ return $reflection->invokeArgs($callable[0], $this->reflectArguments($reflection, $args));
75
+ }
76
+
77
+ if (is_object($callable)) {
78
+ $reflection = new ReflectionMethod($callable, '__invoke');
79
+
80
+ return $reflection->invokeArgs($callable, $this->reflectArguments($reflection, $args));
81
+ }
82
+
83
+ $reflection = new ReflectionFunction($callable);
84
+
85
+ return $reflection->invokeArgs($this->reflectArguments($reflection, $args));
86
+ }
87
+ }
src/Dependencies/League/Container/ServiceProvider/AbstractServiceProvider.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ContainerAwareTrait;
6
+
7
+ abstract class AbstractServiceProvider implements ServiceProviderInterface
8
+ {
9
+ use ContainerAwareTrait;
10
+
11
+ /**
12
+ * @var array
13
+ */
14
+ protected $provides = [];
15
+
16
+ /**
17
+ * {@inheritdoc}
18
+ */
19
+ public function provides($alias = null)
20
+ {
21
+ if (! is_null($alias)) {
22
+ return (in_array($alias, $this->provides));
23
+ }
24
+
25
+ return $this->provides;
26
+ }
27
+ }
src/Dependencies/League/Container/ServiceProvider/AbstractSignatureServiceProvider.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ abstract class AbstractSignatureServiceProvider
6
+ extends AbstractServiceProvider
7
+ implements SignatureServiceProviderInterface
8
+ {
9
+ /**
10
+ * @var string
11
+ */
12
+ protected $signature;
13
+
14
+ /**
15
+ * {@inheritdoc}
16
+ */
17
+ public function withSignature($signature)
18
+ {
19
+ $this->signature = $signature;
20
+
21
+ return $this;
22
+ }
23
+
24
+ /**
25
+ * {@inheritdoc}
26
+ */
27
+ public function getSignature()
28
+ {
29
+ return (is_null($this->signature)) ? get_class($this) : $this->signature;
30
+ }
31
+ }
src/Dependencies/League/Container/ServiceProvider/BootableServiceProviderInterface.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ interface BootableServiceProviderInterface extends ServiceProviderInterface
6
+ {
7
+ /**
8
+ * Method will be invoked on registration of a service provider implementing
9
+ * this interface. Provides ability for eager loading of Service Providers.
10
+ *
11
+ * @return void
12
+ */
13
+ public function boot();
14
+ }
src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregate.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ContainerAwareInterface;
6
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ContainerAwareTrait;
7
+
8
+ class ServiceProviderAggregate implements ServiceProviderAggregateInterface
9
+ {
10
+ use ContainerAwareTrait;
11
+
12
+ /**
13
+ * @var array
14
+ */
15
+ protected $providers = [];
16
+
17
+ /**
18
+ * @var array
19
+ */
20
+ protected $registered = [];
21
+
22
+ /**
23
+ * {@inheritdoc}
24
+ */
25
+ public function add($provider)
26
+ {
27
+ if (is_string($provider) && class_exists($provider)) {
28
+ $provider = new $provider;
29
+ }
30
+
31
+ if ($provider instanceof ContainerAwareInterface) {
32
+ $provider->setContainer($this->getContainer());
33
+ }
34
+
35
+ if ($provider instanceof BootableServiceProviderInterface) {
36
+ $provider->boot();
37
+ }
38
+
39
+ if ($provider instanceof ServiceProviderInterface) {
40
+ foreach ($provider->provides() as $service) {
41
+ $this->providers[$service] = $provider;
42
+ }
43
+
44
+ return $this;
45
+ }
46
+
47
+ throw new \InvalidArgumentException(
48
+ 'A service provider must be a fully qualified class name or instance ' .
49
+ 'of (\RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderInterface)'
50
+ );
51
+ }
52
+
53
+ /**
54
+ * {@inheritdoc}
55
+ */
56
+ public function provides($service)
57
+ {
58
+ return array_key_exists($service, $this->providers);
59
+ }
60
+
61
+ /**
62
+ * {@inheritdoc}
63
+ */
64
+ public function register($service)
65
+ {
66
+ if (! array_key_exists($service, $this->providers)) {
67
+ throw new \InvalidArgumentException(
68
+ sprintf('(%s) is not provided by a service provider', $service)
69
+ );
70
+ }
71
+
72
+ $provider = $this->providers[$service];
73
+ $signature = get_class($provider);
74
+
75
+ if ($provider instanceof SignatureServiceProviderInterface) {
76
+ $signature = $provider->getSignature();
77
+ }
78
+
79
+ // ensure that the provider hasn't already been invoked by any other service request
80
+ if (in_array($signature, $this->registered)) {
81
+ return;
82
+ }
83
+
84
+ $provider->register();
85
+
86
+ $this->registered[] = $signature;
87
+ }
88
+ }
src/Dependencies/League/Container/ServiceProvider/ServiceProviderAggregateInterface.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ContainerAwareInterface;
6
+
7
+ interface ServiceProviderAggregateInterface extends ContainerAwareInterface
8
+ {
9
+ /**
10
+ * Add a service provider to the aggregate.
11
+ *
12
+ * @param string|\RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\ServiceProviderInterface $provider
13
+ * @return $this
14
+ */
15
+ public function add($provider);
16
+
17
+ /**
18
+ * Determines whether a service is provided by the aggregate.
19
+ *
20
+ * @param string $service
21
+ * @return boolean
22
+ */
23
+ public function provides($service);
24
+
25
+ /**
26
+ * Invokes the register method of a provider that provides a specific service.
27
+ *
28
+ * @param string $service
29
+ * @return void
30
+ */
31
+ public function register($service);
32
+ }
src/Dependencies/League/Container/ServiceProvider/ServiceProviderInterface.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ContainerAwareInterface;
6
+
7
+ interface ServiceProviderInterface extends ContainerAwareInterface
8
+ {
9
+ /**
10
+ * Returns a boolean if checking whether this provider provides a specific
11
+ * service or returns an array of provided services if no argument passed.
12
+ *
13
+ * @param string $service
14
+ * @return boolean|array
15
+ */
16
+ public function provides($service = null);
17
+
18
+ /**
19
+ * Use the register method to register items with the container via the
20
+ * protected $this->container property or the `getContainer` method
21
+ * from the ContainerAwareTrait.
22
+ *
23
+ * @return void
24
+ */
25
+ public function register();
26
+ }
src/Dependencies/League/Container/ServiceProvider/SignatureServiceProviderInterface.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider;
4
+
5
+ interface SignatureServiceProviderInterface
6
+ {
7
+ /**
8
+ * Set a custom signature for the service provider. This enables
9
+ * registering the same service provider multiple times.
10
+ *
11
+ * @param string $signature
12
+ * @return self
13
+ */
14
+ public function withSignature($signature);
15
+
16
+ /**
17
+ * The signature of the service provider uniquely identifies it, so
18
+ * that we can quickly determine if it has already been registered.
19
+ * Defaults to get_class($provider).
20
+ *
21
+ * @return string
22
+ */
23
+ public function getSignature();
24
+ }
src/Dependencies/Psr/Container/ContainerExceptionInterface.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
4
+ */
5
+
6
+ namespace RocketLazyLoadPlugin\Dependencies\Psr\Container;
7
+
8
+ /**
9
+ * Base interface representing a generic exception in a container.
10
+ */
11
+ interface ContainerExceptionInterface
12
+ {
13
+ }
src/Dependencies/Psr/Container/ContainerInterface.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
4
+ */
5
+
6
+ namespace RocketLazyLoadPlugin\Dependencies\Psr\Container;
7
+
8
+ /**
9
+ * Describes the interface of a container that exposes methods to read its entries.
10
+ */
11
+ interface ContainerInterface
12
+ {
13
+ /**
14
+ * Finds an entry of the container by its identifier and returns it.
15
+ *
16
+ * @param string $id Identifier of the entry to look for.
17
+ *
18
+ * @throws NotFoundExceptionInterface No entry was found for **this** identifier.
19
+ * @throws ContainerExceptionInterface Error while retrieving the entry.
20
+ *
21
+ * @return mixed Entry.
22
+ */
23
+ public function get($id);
24
+
25
+ /**
26
+ * Returns true if the container can return an entry for the given identifier.
27
+ * Returns false otherwise.
28
+ *
29
+ * `has($id)` returning true does not mean that `get($id)` will not throw an exception.
30
+ * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`.
31
+ *
32
+ * @param string $id Identifier of the entry to look for.
33
+ *
34
+ * @return bool
35
+ */
36
+ public function has($id);
37
+ }
src/Dependencies/Psr/Container/NotFoundExceptionInterface.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @license http://www.opensource.org/licenses/mit-license.php MIT (see the LICENSE file)
4
+ */
5
+
6
+ namespace RocketLazyLoadPlugin\Dependencies\Psr\Container;
7
+
8
+ /**
9
+ * No entry was found in the container.
10
+ */
11
+ interface NotFoundExceptionInterface extends ContainerExceptionInterface
12
+ {
13
+ }
src/Dependencies/RocketLazyload/Assets.php ADDED
@@ -0,0 +1,299 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handle the lazyload required assets: inline CSS and JS
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Dependencies\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
+ {
23
+ echo $this->getLazyloadScript($args);
24
+ }
25
+
26
+ /**
27
+ * Gets the inline lazyload script configuration
28
+ *
29
+ * @param array $args Array of arguments to populate the lazyload script options.
30
+ * @return string
31
+ */
32
+ public function getInlineLazyloadScript($args = [])
33
+ {
34
+ $defaults = [
35
+ 'elements' => [
36
+ 'img',
37
+ 'iframe',
38
+ ],
39
+ 'threshold' => 300,
40
+ 'options' => [],
41
+ ];
42
+
43
+ $allowed_options = [
44
+ 'container' => 1,
45
+ 'thresholds' => 1,
46
+ 'data_bg' => 1,
47
+ 'class_error' => 1,
48
+ 'load_delay' => 1,
49
+ 'auto_unobserve' => 1,
50
+ 'callback_enter' => 1,
51
+ 'callback_exit' => 1,
52
+ 'callback_reveal' => 1,
53
+ 'callback_error' => 1,
54
+ 'callback_finish' => 1,
55
+ 'use_native' => 1,
56
+ ];
57
+
58
+ $args = wp_parse_args($args, $defaults);
59
+ $script = '';
60
+
61
+ $args['options'] = array_intersect_key($args['options'], $allowed_options);
62
+
63
+ $script .= 'window.lazyLoadOptions = {
64
+ elements_selector: "' . esc_attr(implode(',', $args['elements'])) . '",
65
+ data_src: "lazy-src",
66
+ data_srcset: "lazy-srcset",
67
+ data_sizes: "lazy-sizes",
68
+ class_loading: "lazyloading",
69
+ class_loaded: "lazyloaded",
70
+ threshold: ' . esc_attr($args['threshold']) . ',
71
+ callback_loaded: function(element) {
72
+ if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) {
73
+ if (element.classList.contains("lazyloaded") ) {
74
+ if (typeof window.jQuery != "undefined") {
75
+ if (jQuery.fn.fitVids) {
76
+ jQuery(element).parent().fitVids();
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }';
82
+
83
+ if (! empty($args['options'])) {
84
+ $script .= ',' . PHP_EOL;
85
+
86
+ foreach ($args['options'] as $option => $value) {
87
+ $script .= $option . ': ' . $value . ',';
88
+ }
89
+
90
+ $script = rtrim($script, ',');
91
+ }
92
+
93
+ $script .= '};';
94
+
95
+ $script .= '
96
+ window.addEventListener(\'LazyLoad::Initialized\', function (e) {
97
+ var lazyLoadInstance = e.detail.instance;
98
+
99
+ if (window.MutationObserver) {
100
+ var observer = new MutationObserver(function(mutations) {
101
+ var image_count = 0;
102
+ var iframe_count = 0;
103
+ var rocketlazy_count = 0;
104
+
105
+ mutations.forEach(function(mutation) {
106
+ for (i = 0; i < mutation.addedNodes.length; i++) {
107
+ if (typeof mutation.addedNodes[i].getElementsByTagName !== \'function\') {
108
+ return;
109
+ }
110
+
111
+ if (typeof mutation.addedNodes[i].getElementsByClassName !== \'function\') {
112
+ return;
113
+ }
114
+
115
+ images = mutation.addedNodes[i].getElementsByTagName(\'img\');
116
+ is_image = mutation.addedNodes[i].tagName == "IMG";
117
+ iframes = mutation.addedNodes[i].getElementsByTagName(\'iframe\');
118
+ is_iframe = mutation.addedNodes[i].tagName == "IFRAME";
119
+ rocket_lazy = mutation.addedNodes[i].getElementsByClassName(\'rocket-lazyload\');
120
+
121
+ image_count += images.length;
122
+ iframe_count += iframes.length;
123
+ rocketlazy_count += rocket_lazy.length;
124
+
125
+ if(is_image){
126
+ image_count += 1;
127
+ }
128
+
129
+ if(is_iframe){
130
+ iframe_count += 1;
131
+ }
132
+ }
133
+ } );
134
+
135
+ if(image_count > 0 || iframe_count > 0 || rocketlazy_count > 0){
136
+ lazyLoadInstance.update();
137
+ }
138
+ } );
139
+
140
+ var b = document.getElementsByTagName("body")[0];
141
+ var config = { childList: true, subtree: true };
142
+
143
+ observer.observe(b, config);
144
+ }
145
+ }, false);';
146
+
147
+ return $script;
148
+ }
149
+
150
+ /**
151
+ * Returns the lazyload inline script
152
+ *
153
+ * @param array $args Array of arguments to populate the lazyload script options.
154
+ * @return string
155
+ */
156
+ public function getLazyloadScript($args = [])
157
+ {
158
+ $defaults = [
159
+ 'base_url' => '',
160
+ 'version' => '',
161
+ 'polyfill' => false,
162
+ ];
163
+
164
+ $args = wp_parse_args($args, $defaults);
165
+ $min = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '' : '.min';
166
+ $script = '';
167
+
168
+ if (isset($args['polyfill']) && $args['polyfill']) {
169
+ $script .= '<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?flags=gated&features=default%2CIntersectionObserver%2CIntersectionObserverEntry"></script>';
170
+ }
171
+
172
+ /**
173
+ * Filters the script tag for the lazyload script
174
+ *
175
+ * @since 2.2.6
176
+ *
177
+ * @param $script_tag HTML tag for the lazyload script.
178
+ */
179
+ $script .= apply_filters('rocket_lazyload_script_tag', '<script data-no-minify="1" async src="' . $args['base_url'] . $args['version'] . '/lazyload' . $min . '.js"></script>');
180
+
181
+ return $script;
182
+ }
183
+
184
+ /**
185
+ * Inserts in the HTML the script to replace the Youtube thumbnail by the iframe.
186
+ *
187
+ * @param array $args Array of arguments to populate the script options.
188
+ * @return void
189
+ */
190
+ public function insertYoutubeThumbnailScript($args = [])
191
+ {
192
+ echo $this->getYoutubeThumbnailScript($args);
193
+ }
194
+
195
+ /**
196
+ * Returns the Youtube Thumbnail inline script
197
+ *
198
+ * @param array $args Array of arguments to populate the script options.
199
+ * @return string
200
+ */
201
+ public function getYoutubeThumbnailScript($args = [])
202
+ {
203
+ $defaults = [
204
+ 'resolution' => 'hqdefault',
205
+ 'lazy_image' => false,
206
+ ];
207
+
208
+ $allowed_resolutions = [
209
+ 'default' => [
210
+ 'width' => 120,
211
+ 'height' => 90,
212
+ ],
213
+ 'mqdefault' => [
214
+ 'width' => 320,
215
+ 'height' => 180,
216
+ ],
217
+ 'hqdefault' => [
218
+ 'width' => 480,
219
+ 'height' => 360,
220
+ ],
221
+ 'sddefault' => [
222
+ 'width' => 640,
223
+ 'height' => 480,
224
+ ],
225
+
226
+ 'maxresdefault' => [
227
+ 'width' => 1280,
228
+ 'height' => 720,
229
+ ],
230
+ ];
231
+
232
+ $args['resolution'] = ( isset($args['resolution']) && isset($allowed_resolutions[ $args['resolution'] ]) ) ? $args['resolution'] : 'hqdefault';
233
+
234
+ $args = wp_parse_args($args, $defaults);
235
+
236
+ $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'] . '">';
237
+
238
+ if (isset($args['lazy_image']) && $args['lazy_image']) {
239
+ $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>';
240
+ }
241
+
242
+ 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=\"https://www.youtube.com/embed/ID?autoplay=1\";t+=0===this.dataset.query.length?'':'&'+this.dataset.query;e.setAttribute(\"src\",t.replace(\"ID\",this.dataset.id)),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.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script>";
243
+ }
244
+
245
+ /**
246
+ * Inserts the CSS to style the Youtube thumbnail container
247
+ *
248
+ * @param array $args Array of arguments to populate the CSS.
249
+ * @return void
250
+ */
251
+ public function insertYoutubeThumbnailCSS($args = [])
252
+ {
253
+ wp_register_style('rocket-lazyload', false);
254
+ wp_enqueue_style('rocket-lazyload');
255
+ wp_add_inline_style('rocket-lazyload', $this->getYoutubeThumbnailCSS($args));
256
+ }
257
+
258
+ /**
259
+ * Returns the CSS for the Youtube Thumbnail
260
+ *
261
+ * @param array $args Array of arguments to populate the CSS.
262
+ * @return string
263
+ */
264
+ public function getYoutubeThumbnailCSS($args = [])
265
+ {
266
+ $defaults = [
267
+ 'base_url' => '',
268
+ 'responsive_embeds' => true,
269
+ ];
270
+
271
+ $args = wp_parse_args($args, $defaults);
272
+
273
+ $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}';
274
+
275
+ if ($args['responsive_embeds']) {
276
+ $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}';
277
+ }
278
+
279
+ return $css;
280
+ }
281
+
282
+ /**
283
+ * Inserts the CSS needed when Javascript is not enabled to keep the display correct
284
+ */
285
+ public function insertNoJSCSS()
286
+ {
287
+ echo $this->getNoJSCSS();
288
+ }
289
+
290
+ /**
291
+ * Returns the CSS to correctly display images when JavaScript is disabled
292
+ *
293
+ * @return string
294
+ */
295
+ public function getNoJSCSS()
296
+ {
297
+ return '<noscript><style id="rocket-lazyload-nojs-css">.rll-youtube-player, [data-lazy-src]{display:none !important;}</style></noscript>';
298
+ }
299
+ }
src/Dependencies/RocketLazyload/Iframe.php ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handles lazyloading of iframes
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Dependencies\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
+ {
25
+ $defaults = [
26
+ 'youtube' => false,
27
+ ];
28
+
29
+ $args = wp_parse_args($args, $defaults);
30
+
31
+ if (! preg_match_all('@<iframe(?<atts>\s.+)>.*</iframe>@iUs', $buffer, $iframes, PREG_SET_ORDER) ) {
32
+ return $html;
33
+ }
34
+
35
+ $iframes = array_unique($iframes, SORT_REGULAR);
36
+
37
+ foreach ($iframes as $iframe) {
38
+ if ($this->isIframeExcluded($iframe)) {
39
+ continue;
40
+ }
41
+
42
+ // Given the previous regex pattern, $iframe['atts'] starts with a whitespace character.
43
+ if (! preg_match('@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', $iframe['atts'], $atts)) {
44
+ continue;
45
+ }
46
+
47
+ $iframe['src'] = trim($atts['src']);
48
+
49
+ if ('' === $iframe['src']) {
50
+ continue;
51
+ }
52
+
53
+ if ($args['youtube']) {
54
+ $iframe_lazyload = $this->replaceYoutubeThumbnail($iframe);
55
+ }
56
+
57
+ if (empty($iframe_lazyload)) {
58
+ $iframe_lazyload = $this->replaceIframe($iframe);
59
+ }
60
+
61
+ $html = str_replace($iframe[0], $iframe_lazyload, $html);
62
+
63
+ unset($iframe_lazyload);
64
+ }
65
+
66
+ return $html;
67
+ }
68
+
69
+ /**
70
+ * Checks if the provided iframe is excluded from lazyload
71
+ *
72
+ * @param array $iframe Array of matched patterns.
73
+ * @return boolean
74
+ */
75
+ public function isIframeExcluded($iframe)
76
+ {
77
+
78
+ foreach ($this->getExcludedPatterns() as $excluded_pattern) {
79
+ if (strpos($iframe[0], $excluded_pattern) !== false) {
80
+ return true;
81
+ }
82
+ }
83
+
84
+ return false;
85
+ }
86
+
87
+ /**
88
+ * Gets patterns excluded from lazyload for iframes
89
+ *
90
+ * @since 2.1.1
91
+ *
92
+ * @return array
93
+ */
94
+ private function getExcludedPatterns()
95
+ {
96
+ /**
97
+ * Filters the patterns excluded from lazyload for iframes
98
+ *
99
+ * @since 2.1.1
100
+ *
101
+ * @param array $excluded_patterns Array of excluded patterns.
102
+ */
103
+ return apply_filters(
104
+ 'rocket_lazyload_iframe_excluded_patterns',
105
+ [
106
+ 'gform_ajax_frame',
107
+ 'data-no-lazy=',
108
+ 'recaptcha/api/fallback',
109
+ 'loading="eager"',
110
+ ]
111
+ );
112
+ }
113
+
114
+ /**
115
+ * Applies lazyload on the iframe provided
116
+ *
117
+ * @param array $iframe Array of matched elements.
118
+ * @return string
119
+ */
120
+ private function replaceIframe($iframe)
121
+ {
122
+ /**
123
+ * Filter the LazyLoad placeholder on src attribute
124
+ *
125
+ * @since 1.0
126
+ *
127
+ * @param string $placeholder placeholder that will be printed.
128
+ */
129
+ $placeholder = apply_filters('rocket_lazyload_placeholder', 'about:blank');
130
+
131
+ $placeholder_atts = str_replace($iframe['src'], $placeholder, $iframe['atts']);
132
+ $iframe_lazyload = str_replace($iframe['atts'], $placeholder_atts . ' data-rocket-lazyload="fitvidscompatible" data-lazy-src="' . esc_url($iframe['src']) . '"', $iframe[0]);
133
+
134
+ if (! preg_match('@\sloading\s*=\s*(\'|")(?:lazy|auto)\1@i', $iframe_lazyload)) {
135
+ $iframe_lazyload = str_replace('<iframe', '<iframe loading="lazy"', $iframe_lazyload);
136
+ }
137
+
138
+ /**
139
+ * Filter the LazyLoad HTML output on iframes
140
+ *
141
+ * @since 1.0
142
+ *
143
+ * @param array $html Output that will be printed.
144
+ */
145
+ $iframe_lazyload = apply_filters('rocket_lazyload_iframe_html', $iframe_lazyload);
146
+ $iframe_lazyload .= '<noscript>' . $iframe[0] . '</noscript>';
147
+
148
+ return $iframe_lazyload;
149
+ }
150
+
151
+ /**
152
+ * Replaces the iframe provided by the Youtube thumbnail
153
+ *
154
+ * @param array $iframe Array of matched elements.
155
+ * @return bool|string
156
+ */
157
+ private function replaceYoutubeThumbnail($iframe)
158
+ {
159
+ $youtube_id = $this->getYoutubeIDFromURL($iframe['src']);
160
+
161
+ if (! $youtube_id) {
162
+ return false;
163
+ }
164
+
165
+ $query = wp_parse_url(htmlspecialchars_decode($iframe['src']), PHP_URL_QUERY);
166
+
167
+ /**
168
+ * Filter the LazyLoad HTML output on Youtube iframes
169
+ *
170
+ * @since 2.11
171
+ *
172
+ * @param array $html Output that will be printed.
173
+ */
174
+ $youtube_lazyload = apply_filters('rocket_lazyload_youtube_html', '<div class="rll-youtube-player" data-id="' . esc_attr($youtube_id) . '" data-query="' . esc_attr($query) . '"></div>');
175
+ $youtube_lazyload .= '<noscript>' . $iframe[0] . '</noscript>';
176
+
177
+ return $youtube_lazyload;
178
+ }
179
+
180
+ /**
181
+ * Gets the Youtube ID from the URL provided
182
+ *
183
+ * @param string $url URL to search.
184
+ * @return bool|string
185
+ */
186
+ public function getYoutubeIDFromURL($url)
187
+ {
188
+ $pattern = '#^(?:https?:)?(?://)?(?:www\.)?(?:youtu\.be|youtube\.com|youtube-nocookie\.com)/(?:embed/|v/|watch/?\?v=)?([\w-]{11})#iU';
189
+ $result = preg_match($pattern, $url, $matches);
190
+
191
+ if (! $result) {
192
+ return false;
193
+ }
194
+
195
+ // exclude playlist.
196
+ if ('videoseries' === $matches[1]) {
197
+ return false;
198
+ }
199
+
200
+ return $matches[1];
201
+ }
202
+ }
src/Dependencies/RocketLazyload/Image.php ADDED
@@ -0,0 +1,474 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Handles lazyloading of images
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Dependencies\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
+ {
24
+ if (! preg_match_all('#<img(?<atts>\s.+)\s?/?>#iUs', $buffer, $images, PREG_SET_ORDER)) {
25
+ return $html;
26
+ }
27
+
28
+ $images = array_unique($images, SORT_REGULAR);
29
+
30
+ foreach ($images as $image) {
31
+ $image = $this->canLazyload($image);
32
+
33
+ if (! $image) {
34
+ continue;
35
+ }
36
+
37
+ $image_lazyload = $this->replaceImage($image);
38
+ $image_lazyload .= $this->noscript($image[0]);
39
+ $html = str_replace($image[0], $image_lazyload, $html);
40
+
41
+ unset($image_lazyload);
42
+ }
43
+
44
+ return $html;
45
+ }
46
+
47
+ /**
48
+ * Applies lazyload on background images defined in style attributes
49
+ *
50
+ * @param string $html Original HTML.
51
+ * @param string $buffer Content to parse.
52
+ * @return string
53
+ */
54
+ public function lazyloadBackgroundImages($html, $buffer)
55
+ {
56
+ if (! preg_match_all('#<(?<tag>div|section|span|li)\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'] = trim($url['url'], '\'" ');
70
+
71
+ if ($this->isExcluded($url['url'], $this->getExcludedSrc())) {
72
+ continue;
73
+ }
74
+
75
+ $lazy_bg = $this->addLazyCLass($element[0]);
76
+ $lazy_bg = str_replace($url[0], '', $lazy_bg);
77
+ $lazy_bg = str_replace('<' . $element['tag'], '<' . $element['tag'] . ' data-bg="url(' . esc_attr($url['url']) . ')"', $lazy_bg);
78
+
79
+ $html = str_replace($element[0], $lazy_bg, $html);
80
+ unset($lazy_bg);
81
+ }
82
+
83
+ return $html;
84
+ }
85
+
86
+ /**
87
+ * Add the identifier class to the element
88
+ *
89
+ * @param string $element Element to add the class to.
90
+ * @return string
91
+ */
92
+ private function addLazyClass($element)
93
+ {
94
+ if (preg_match('#class=["\']?(?<classes>[^"\'>]*)["\']?#is', $element, $class)) {
95
+ $classes = str_replace($class['classes'], $class['classes'] . ' rocket-lazyload', $class[0]);
96
+ $element = str_replace($class[0], $classes, $element);
97
+
98
+ return $element;
99
+ }
100
+
101
+ return preg_replace('#<(img|div|section|li|span)([^>]*)>#is', '<\1 class="rocket-lazyload"\2>', $element);
102
+ }
103
+
104
+ /**
105
+ * Applies lazyload on picture elements found in the HTML.
106
+ *
107
+ * @param string $html Original HTML.
108
+ * @param string $buffer Content to parse.
109
+ * @return string
110
+ */
111
+ public function lazyloadPictures($html, $buffer)
112
+ {
113
+ if (! preg_match_all('#<picture(?:.*)?>(?<sources>.*)</picture>#iUs', $buffer, $pictures, PREG_SET_ORDER)) {
114
+ return $html;
115
+ }
116
+
117
+ $pictures = array_unique($pictures, SORT_REGULAR);
118
+ $excluded = array_merge($this->getExcludedAttributes(), $this->getExcludedSrc());
119
+
120
+ foreach ($pictures as $picture) {
121
+ if ($this->isExcluded($picture[0], $excluded)) {
122
+ continue;
123
+ }
124
+
125
+ if (preg_match_all('#<source(?<atts>\s.+)>#iUs', $picture['sources'], $sources, PREG_SET_ORDER)) {
126
+ $sources = array_unique($sources, SORT_REGULAR);
127
+
128
+ $lazy_sources = 0;
129
+
130
+ foreach ($sources as $source) {
131
+ $lazyload_srcset = preg_replace('/([\s"\'])srcset/i', '\1data-lazy-srcset', $source[0]);
132
+ $html = str_replace($source[0], $lazyload_srcset, $html);
133
+
134
+ unset($lazyload_srcset);
135
+ $lazy_sources++;
136
+ }
137
+ }
138
+
139
+ if (0 === $lazy_sources) {
140
+ continue;
141
+ }
142
+
143
+ if (! preg_match('#<img(?<atts>\s.+)\s?/?>#iUs', $picture[0], $img)) {
144
+ continue;
145
+ }
146
+
147
+ $img = $this->canLazyload($img);
148
+
149
+ if (! $img) {
150
+ continue;
151
+ }
152
+
153
+ $img_lazy = $this->replaceImage($img);
154
+ $html = str_replace($img[0], $img_lazy, $html);
155
+
156
+ unset($img_lazy);
157
+ }
158
+
159
+ return $html;
160
+ }
161
+
162
+ /**
163
+ * Checks if the image can be lazyloaded
164
+ *
165
+ * @param Array $image Array of image data coming from Regex.
166
+ * @return bool|Array
167
+ */
168
+ private function canLazyload($image)
169
+ {
170
+ if ($this->isExcluded($image['atts'], $this->getExcludedAttributes())) {
171
+ return false;
172
+ }
173
+
174
+ // Given the previous regex pattern, $image['atts'] starts with a whitespace character.
175
+ if (! preg_match('@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', $image['atts'], $atts)) {
176
+ return false;
177
+ }
178
+
179
+ $image['src'] = trim($atts['src']);
180
+
181
+ if ('' === $image['src']) {
182
+ return false;
183
+ }
184
+
185
+ if ($this->isExcluded($image['src'], $this->getExcludedSrc())) {
186
+ return false;
187
+ }
188
+
189
+ // Don't apply LazyLoad on images from WP Retina x2.
190
+ if (function_exists('wr2x_picture_rewrite')) {
191
+ if (wr2x_get_retina(trailingslashit(ABSPATH) . wr2x_get_pathinfo_from_image_src(trim($image['src'], '"')))) {
192
+ return false;
193
+ }
194
+ }
195
+
196
+ return $image;
197
+ }
198
+
199
+ /**
200
+ * Checks if the provided string matches with the provided excluded patterns
201
+ *
202
+ * @param string $string String to check.
203
+ * @param array $excluded_values Patterns to match against.
204
+ * @return boolean
205
+ */
206
+ public function isExcluded($string, $excluded_values)
207
+ {
208
+ if (! is_array($excluded_values)) {
209
+ (array) $excluded_values;
210
+ }
211
+
212
+ if (empty($excluded_values)) {
213
+ return false;
214
+ }
215
+
216
+ foreach ($excluded_values as $excluded_value) {
217
+ if (strpos($string, $excluded_value) !== false) {
218
+ return true;
219
+ }
220
+ }
221
+
222
+ return false;
223
+ }
224
+
225
+ /**
226
+ * Returns the list of excluded attributes
227
+ *
228
+ * @return array
229
+ */
230
+ public function getExcludedAttributes()
231
+ {
232
+ /**
233
+ * Filters the attributes used to prevent lazylad from being applied
234
+ *
235
+ * @since 1.0
236
+ * @author Remy Perona
237
+ *
238
+ * @param array $excluded_attributes An array of excluded attributes.
239
+ */
240
+ return apply_filters(
241
+ 'rocket_lazyload_excluded_attributes',
242
+ [
243
+ 'data-src=',
244
+ 'data-no-lazy=',
245
+ 'data-lazy-original=',
246
+ 'data-lazy-src=',
247
+ 'data-lazysrc=',
248
+ 'data-lazyload=',
249
+ 'data-bgposition=',
250
+ 'data-envira-src=',
251
+ 'fullurl=',
252
+ 'lazy-slider-img=',
253
+ 'data-srcset=',
254
+ 'class="ls-l',
255
+ 'class="ls-bg',
256
+ 'soliloquy-image',
257
+ 'loading="eager"',
258
+ 'swatch-img',
259
+ 'data-height-percentage',
260
+ 'data-large_image',
261
+ 'avia-bg-style-fixed',
262
+ ]
263
+ );
264
+ }
265
+
266
+ /**
267
+ * Returns the list of excluded src
268
+ *
269
+ * @return array
270
+ */
271
+ public function getExcludedSrc()
272
+ {
273
+ /**
274
+ * Filters the src used to prevent lazylad from being applied
275
+ *
276
+ * @since 1.0
277
+ * @author Remy Perona
278
+ *
279
+ * @param array $excluded_src An array of excluded src.
280
+ */
281
+ return apply_filters(
282
+ 'rocket_lazyload_excluded_src',
283
+ [
284
+ '/wpcf7_captcha/',
285
+ 'timthumb.php?src',
286
+ 'woocommerce/assets/images/placeholder.png',
287
+ ]
288
+ );
289
+ }
290
+
291
+ /**
292
+ * Replaces the original image by the lazyload one
293
+ *
294
+ * @param array $image Array of matches elements.
295
+ * @return string
296
+ */
297
+ private function replaceImage($image)
298
+ {
299
+ $width = 0;
300
+ $height = 0;
301
+
302
+ if (preg_match('@[\s"\']width\s*=\s*(\'|")(?<width>.*)\1@iUs', $image['atts'], $atts)) {
303
+ $width = absint($atts['width']);
304
+ }
305
+
306
+ if (preg_match('@[\s"\']height\s*=\s*(\'|")(?<height>.*)\1@iUs', $image['atts'], $atts)) {
307
+ $height = absint($atts['height']);
308
+ }
309
+
310
+ $placeholder_atts = preg_replace('@\ssrc\s*=\s*(\'|")(?<src>.*)\1@iUs', ' src="' . $this->getPlaceholder($width, $height) . '"', $image['atts']);
311
+
312
+ $image_lazyload = str_replace($image['atts'], $placeholder_atts . ' data-lazy-src="' . $image['src'] . '"', $image[0]);
313
+
314
+ if (! preg_match('@\sloading\s*=\s*(\'|")(?:lazy|auto)\1@i', $image_lazyload)) {
315
+ $image_lazyload = str_replace('<img', '<img loading="lazy"', $image_lazyload);
316
+ }
317
+
318
+ /**
319
+ * Filter the LazyLoad HTML output
320
+ *
321
+ * @since 1.0
322
+ *
323
+ * @param string $html Output that will be printed
324
+ */
325
+ $image_lazyload = apply_filters('rocket_lazyload_html', $image_lazyload);
326
+
327
+ return $image_lazyload;
328
+ }
329
+
330
+ /**
331
+ * Returns the HTML tag wrapped inside noscript tags
332
+ *
333
+ * @param string $element Element to wrap.
334
+ * @return string
335
+ */
336
+ private function noscript($element)
337
+ {
338
+ return '<noscript>' . $element . '</noscript>';
339
+ }
340
+
341
+ /**
342
+ * Applies lazyload on srcset and sizes attributes
343
+ *
344
+ * @param string $html HTML image tag.
345
+ * @return string
346
+ */
347
+ public function lazyloadResponsiveAttributes($html)
348
+ {
349
+ $html = preg_replace('/[\s|"|\'](srcset)\s*=\s*("|\')([^"|\']+)\2/i', ' data-lazy-$1=$2$3$2', $html);
350
+ $html = preg_replace('/[\s|"|\'](sizes)\s*=\s*("|\')([^"|\']+)\2/i', ' data-lazy-$1=$2$3$2', $html);
351
+
352
+ return $html;
353
+ }
354
+
355
+ /**
356
+ * Finds patterns matching smiley and call the callback method to replace them with the image
357
+ *
358
+ * @param string $text Content to search in.
359
+ * @return string
360
+ */
361
+ public function convertSmilies($text)
362
+ {
363
+ global $wp_smiliessearch;
364
+
365
+ if (! get_option('use_smilies') || empty($wp_smiliessearch)) {
366
+ return $text;
367
+ }
368
+
369
+ $output = '';
370
+ // HTML loop taken from texturize function, could possible be consolidated.
371
+ $textarr = preg_split('/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between.
372
+ $stop = count($textarr);// loop stuff.
373
+
374
+ // Ignore proessing of specific tags.
375
+ $tags_to_ignore = 'code|pre|style|script|textarea';
376
+ $ignore_block_element = '';
377
+
378
+ for ($i = 0; $i < $stop; $i++) {
379
+ $content = $textarr[ $i ];
380
+
381
+ // If we're in an ignore block, wait until we find its closing tag.
382
+ if ('' === $ignore_block_element && preg_match('/^<(' . $tags_to_ignore . ')>/', $content, $matches)) {
383
+ $ignore_block_element = $matches[1];
384
+ }
385
+
386
+ // If it's not a tag and not in ignore block.
387
+ if ('' === $ignore_block_element && strlen($content) > 0 && '<' !== $content[0]) {
388
+ $content = preg_replace_callback($wp_smiliessearch, [$this, 'translateSmiley'], $content);
389
+ }
390
+
391
+ // did we exit ignore block.
392
+ if ('' !== $ignore_block_element && '</' . $ignore_block_element . '>' === $content) {
393
+ $ignore_block_element = '';
394
+ }
395
+
396
+ $output .= $content;
397
+ }
398
+
399
+ return $output;
400
+ }
401
+
402
+ /**
403
+ * Replace matches by smiley image, lazyloaded
404
+ *
405
+ * @param array $matches Array of matches.
406
+ * @return string
407
+ */
408
+ private function translateSmiley($matches)
409
+ {
410
+ global $wpsmiliestrans;
411
+
412
+ if (count($matches) === 0) {
413
+ return '';
414
+ }
415
+
416
+ $smiley = trim(reset($matches));
417
+ $img = $wpsmiliestrans[ $smiley ];
418
+
419
+ $matches = [];
420
+ $ext = preg_match('/\.([^.]+)$/', $img, $matches) ? strtolower($matches[1]) : false;
421
+ $image_exts = ['jpg', 'jpeg', 'jpe', 'gif', 'png'];
422
+
423
+ // Don't convert smilies that aren't images - they're probably emoji.
424
+ if (! in_array($ext, $image_exts, true)) {
425
+ return $img;
426
+ }
427
+
428
+ /**
429
+ * Filter the Smiley image URL before it's used in the image element.
430
+ *
431
+ * @since 2.9.0
432
+ *
433
+ * @param string $smiley_url URL for the smiley image.
434
+ * @param string $img Filename for the smiley image.
435
+ * @param string $site_url Site URL, as returned by site_url().
436
+ */
437
+ $src_url = apply_filters('smilies_src', includes_url("images/smilies/$img"), $img, site_url());
438
+
439
+ // Don't LazyLoad if process is stopped for these reasons.
440
+ if (is_feed() || is_preview()) {
441
+ return sprintf(' <img src="%s" alt="%s" class="wp-smiley" /> ', esc_url($src_url), esc_attr($smiley));
442
+ }
443
+
444
+ return sprintf(' <img src="%s" data-lazy-src="%s" alt="%s" class="wp-smiley" /> ', $this->getPlaceholder(), esc_url($src_url), esc_attr($smiley));
445
+ }
446
+
447
+ /**
448
+ * Returns the placeholder for the src attribute
449
+ *
450
+ * @since 1.2
451
+ * @author Remy Perona
452
+ *
453
+ * @param int $width Width of the placeholder image. Default 0.
454
+ * @param int $height Height of the placeholder image. Default 0.
455
+ * @return string
456
+ */
457
+ public function getPlaceholder($width = 0, $height = 0)
458
+ {
459
+ $width = 0 === $width ? 0 : absint($width);
460
+ $height = 0 === $height ? 0 : absint($height);
461
+
462
+ $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");
463
+ /**
464
+ * Filter the image lazyLoad placeholder on src attribute
465
+ *
466
+ * @since 1.1
467
+ *
468
+ * @param string $placeholder Placeholder that will be printed.
469
+ * @param int $width Placeholder width.
470
+ * @param int $height Placeholder height.
471
+ */
472
+ return apply_filters('rocket_lazyload_placeholder', $placeholder, $width, $height);
473
+ }
474
+ }
src/EventManagement/EventManager.php CHANGED
@@ -1,145 +1,145 @@
1
- <?php
2
- /**
3
- * Event Manager to interact with the WP plugin API
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\EventManagement;
9
-
10
- defined('ABSPATH') || die('Cheatin\' uh?');
11
-
12
- /**
13
- * The event manager manages events using the WordPress plugin API.
14
- *
15
- * @since 3.1
16
- * @author Carl Alexander <contact@carlalexander.ca>
17
- */
18
- class EventManager
19
- {
20
- /**
21
- * Adds a callback to a specific hook of the WordPress plugin API.
22
- *
23
- * @uses add_filter()
24
- *
25
- * @param string $hook_name Name of the hook.
26
- * @param callable $callback Callback function.
27
- * @param int $priority Priority.
28
- * @param int $accepted_args Number of arguments.
29
- */
30
- public function addCallback($hook_name, $callback, $priority = 10, $accepted_args = 1)
31
- {
32
- add_filter($hook_name, $callback, $priority, $accepted_args);
33
- }
34
-
35
- /**
36
- * Add an event subscriber.
37
- *
38
- * The event manager registers all the hooks that the given subscriber
39
- * wants to register with the WordPress Plugin API.
40
- *
41
- * @param SubscriberInterface $subscriber SubscriberInterface implementation.
42
- */
43
- public function addSubscriber(SubscriberInterface $subscriber)
44
- {
45
- if ($subscriber instanceof EventManagerAwareSubscriberInterface) {
46
- $subscriber->setEventManager($this);
47
- }
48
-
49
- foreach ($subscriber->getSubscribedEvents() as $hook_name => $parameters) {
50
- $this->addSubscriberCallback($subscriber, $hook_name, $parameters);
51
- }
52
- }
53
-
54
- /**
55
- * Checks the WordPress plugin API to see if the given hook has
56
- * the given callback. The priority of the callback will be returned
57
- * or false. If no callback is given will return true or false if
58
- * there's any callbacks registered to the hook.
59
- *
60
- * @uses has_filter()
61
- *
62
- * @param string $hook_name Hook name.
63
- * @param mixed $callback Callback.
64
- *
65
- * @return bool|int
66
- */
67
- public function hasCallback($hook_name, $callback = false)
68
- {
69
- return has_filter($hook_name, $callback);
70
- }
71
-
72
- /**
73
- * Removes the given callback from the given hook. The WordPress plugin API only
74
- * removes the hook if the callback and priority match a registered hook.
75
- *
76
- * @uses remove_filter()
77
- *
78
- * @param string $hook_name Hook name.
79
- * @param callable $callback Callback.
80
- * @param int $priority Priority.
81
- *
82
- * @return bool
83
- */
84
- public function removeCallback($hook_name, $callback, $priority = 10)
85
- {
86
- return remove_filter($hook_name, $callback, $priority);
87
- }
88
-
89
- /**
90
- * Remove an event subscriber.
91
- *
92
- * The event manager removes all the hooks that the given subscriber
93
- * wants to register with the WordPress Plugin API.
94
- *
95
- * @param SubscriberInterface $subscriber SubscriberInterface implementation.
96
- */
97
- public function removeSubscriber(SubscriberInterface $subscriber)
98
- {
99
- foreach ($subscriber->getSubscribedEvents() as $hook_name => $parameters) {
100
- $this->removeSubscriberCallback($subscriber, $hook_name, $parameters);
101
- }
102
- }
103
-
104
- /**
105
- * Adds the given subscriber's callback to a specific hook
106
- * of the WordPress plugin API.
107
- *
108
- * @param SubscriberInterface $subscriber SubscriberInterface implementation.
109
- * @param string $hook_name Hook name.
110
- * @param mixed $parameters Parameters, can be a string, an array or a multidimensional array.
111
- */
112
- private function addSubscriberCallback(SubscriberInterface $subscriber, $hook_name, $parameters)
113
- {
114
- if (is_string($parameters)) {
115
- $this->addCallback($hook_name, [ $subscriber, $parameters ]);
116
- } elseif (is_array($parameters) && count($parameters) !== count($parameters, COUNT_RECURSIVE)) {
117
- foreach ($parameters as $parameter) {
118
- $this->addSubscriberCallback($subscriber, $hook_name, $parameter);
119
- }
120
- } elseif (is_array($parameters) && isset($parameters[0])) {
121
- $this->addCallback($hook_name, [ $subscriber, $parameters[0] ], isset($parameters[1]) ? $parameters[1] : 10, isset($parameters[2]) ? $parameters[2] : 1);
122
- }
123
- }
124
-
125
- /**
126
- * Removes the given subscriber's callback to a specific hook
127
- * of the WordPress plugin API.
128
- *
129
- * @param SubscriberInterface $subscriber SubscriberInterface implementation.
130
- * @param string $hook_name Hook name.
131
- * @param mixed $parameters Parameters, can be a string, an array or a multidimensional array.
132
- */
133
- private function removeSubscriberCallback(SubscriberInterface $subscriber, $hook_name, $parameters)
134
- {
135
- if (is_string($parameters)) {
136
- $this->removeCallback($hook_name, [ $subscriber, $parameters ]);
137
- } elseif (is_array($parameters) && count($parameters) !== count($parameters, COUNT_RECURSIVE)) {
138
- foreach ($parameters as $parameter) {
139
- $this->removeSubscriberCallback($subscriber, $hook_name, $parameter);
140
- }
141
- } elseif (is_array($parameters) && isset($parameters[0])) {
142
- $this->removeCallback($hook_name, [ $subscriber, $parameters[0] ], isset($parameters[1]) ? $parameters[1] : 10);
143
- }
144
- }
145
- }
1
+ <?php
2
+ /**
3
+ * Event Manager to interact with the WP plugin API
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\EventManagement;
9
+
10
+ defined('ABSPATH') || die('Cheatin\' uh?');
11
+
12
+ /**
13
+ * The event manager manages events using the WordPress plugin API.
14
+ *
15
+ * @since 3.1
16
+ * @author Carl Alexander <contact@carlalexander.ca>
17
+ */
18
+ class EventManager
19
+ {
20
+ /**
21
+ * Adds a callback to a specific hook of the WordPress plugin API.
22
+ *
23
+ * @uses add_filter()
24
+ *
25
+ * @param string $hook_name Name of the hook.
26
+ * @param callable $callback Callback function.
27
+ * @param int $priority Priority.
28
+ * @param int $accepted_args Number of arguments.
29
+ */
30
+ public function addCallback($hook_name, $callback, $priority = 10, $accepted_args = 1)
31
+ {
32
+ add_filter($hook_name, $callback, $priority, $accepted_args);
33
+ }
34
+
35
+ /**
36
+ * Add an event subscriber.
37
+ *
38
+ * The event manager registers all the hooks that the given subscriber
39
+ * wants to register with the WordPress Plugin API.
40
+ *
41
+ * @param SubscriberInterface $subscriber SubscriberInterface implementation.
42
+ */
43
+ public function addSubscriber(SubscriberInterface $subscriber)
44
+ {
45
+ if ($subscriber instanceof EventManagerAwareSubscriberInterface) {
46
+ $subscriber->setEventManager($this);
47
+ }
48
+
49
+ foreach ($subscriber->getSubscribedEvents() as $hook_name => $parameters) {
50
+ $this->addSubscriberCallback($subscriber, $hook_name, $parameters);
51
+ }
52
+ }
53
+
54
+ /**
55
+ * Checks the WordPress plugin API to see if the given hook has
56
+ * the given callback. The priority of the callback will be returned
57
+ * or false. If no callback is given will return true or false if
58
+ * there's any callbacks registered to the hook.
59
+ *
60
+ * @uses has_filter()
61
+ *
62
+ * @param string $hook_name Hook name.
63
+ * @param mixed $callback Callback.
64
+ *
65
+ * @return bool|int
66
+ */
67
+ public function hasCallback($hook_name, $callback = false)
68
+ {
69
+ return has_filter($hook_name, $callback);
70
+ }
71
+
72
+ /**
73
+ * Removes the given callback from the given hook. The WordPress plugin API only
74
+ * removes the hook if the callback and priority match a registered hook.
75
+ *
76
+ * @uses remove_filter()
77
+ *
78
+ * @param string $hook_name Hook name.
79
+ * @param callable $callback Callback.
80
+ * @param int $priority Priority.
81
+ *
82
+ * @return bool
83
+ */
84
+ public function removeCallback($hook_name, $callback, $priority = 10)
85
+ {
86
+ return remove_filter($hook_name, $callback, $priority);
87
+ }
88
+
89
+ /**
90
+ * Remove an event subscriber.
91
+ *
92
+ * The event manager removes all the hooks that the given subscriber
93
+ * wants to register with the WordPress Plugin API.
94
+ *
95
+ * @param SubscriberInterface $subscriber SubscriberInterface implementation.
96
+ */
97
+ public function removeSubscriber(SubscriberInterface $subscriber)
98
+ {
99
+ foreach ($subscriber->getSubscribedEvents() as $hook_name => $parameters) {
100
+ $this->removeSubscriberCallback($subscriber, $hook_name, $parameters);
101
+ }
102
+ }
103
+
104
+ /**
105
+ * Adds the given subscriber's callback to a specific hook
106
+ * of the WordPress plugin API.
107
+ *
108
+ * @param SubscriberInterface $subscriber SubscriberInterface implementation.
109
+ * @param string $hook_name Hook name.
110
+ * @param mixed $parameters Parameters, can be a string, an array or a multidimensional array.
111
+ */
112
+ private function addSubscriberCallback(SubscriberInterface $subscriber, $hook_name, $parameters)
113
+ {
114
+ if (is_string($parameters)) {
115
+ $this->addCallback($hook_name, [ $subscriber, $parameters ]);
116
+ } elseif (is_array($parameters) && count($parameters) !== count($parameters, COUNT_RECURSIVE)) {
117
+ foreach ($parameters as $parameter) {
118
+ $this->addSubscriberCallback($subscriber, $hook_name, $parameter);
119
+ }
120
+ } elseif (is_array($parameters) && isset($parameters[0])) {
121
+ $this->addCallback($hook_name, [ $subscriber, $parameters[0] ], isset($parameters[1]) ? $parameters[1] : 10, isset($parameters[2]) ? $parameters[2] : 1);
122
+ }
123
+ }
124
+
125
+ /**
126
+ * Removes the given subscriber's callback to a specific hook
127
+ * of the WordPress plugin API.
128
+ *
129
+ * @param SubscriberInterface $subscriber SubscriberInterface implementation.
130
+ * @param string $hook_name Hook name.
131
+ * @param mixed $parameters Parameters, can be a string, an array or a multidimensional array.
132
+ */
133
+ private function removeSubscriberCallback(SubscriberInterface $subscriber, $hook_name, $parameters)
134
+ {
135
+ if (is_string($parameters)) {
136
+ $this->removeCallback($hook_name, [ $subscriber, $parameters ]);
137
+ } elseif (is_array($parameters) && count($parameters) !== count($parameters, COUNT_RECURSIVE)) {
138
+ foreach ($parameters as $parameter) {
139
+ $this->removeSubscriberCallback($subscriber, $hook_name, $parameter);
140
+ }
141
+ } elseif (is_array($parameters) && isset($parameters[0])) {
142
+ $this->removeCallback($hook_name, [ $subscriber, $parameters[0] ], isset($parameters[1]) ? $parameters[1] : 10);
143
+ }
144
+ }
145
+ }
src/EventManagement/EventManagerAwareSubscriberInterface.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
- /**
3
- * Interface for subscribers who need access to the event manager object
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\EventManagement;
9
-
10
- interface EventManagerAwareSubscriberInterface extends SubscriberInterface
11
- {
12
- /**
13
- * Set the WordPress event manager for the subscriber.
14
- *
15
- * @since 3.1
16
- * @author Remy Perona
17
- *
18
- * @param EventManager $event_manager EventManager instance.
19
- */
20
- public function setEventManager(EventManager $event_manager);
21
- }
1
+ <?php
2
+ /**
3
+ * Interface for subscribers who need access to the event manager object
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\EventManagement;
9
+
10
+ interface EventManagerAwareSubscriberInterface extends SubscriberInterface
11
+ {
12
+ /**
13
+ * Set the WordPress event manager for the subscriber.
14
+ *
15
+ * @since 3.1
16
+ * @author Remy Perona
17
+ *
18
+ * @param EventManager $event_manager EventManager instance.
19
+ */
20
+ public function setEventManager(EventManager $event_manager);
21
+ }
src/EventManagement/SubscriberInterface.php CHANGED
@@ -1,39 +1,39 @@
1
- <?php
2
- /**
3
- * Interface for subscribers
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\EventManagement;
9
-
10
- /**
11
- * A Subscriber knows what specific WordPress events it wants to listen to.
12
- *
13
- * When an EventManager adds a Subscriber, it gets all the WordPress events that
14
- * it wants to listen to. It then adds the subscriber as a listener for each of them.
15
- *
16
- * @author Carl Alexander <contact@carlalexander.ca>
17
- */
18
- interface SubscriberInterface
19
- {
20
- /**
21
- * Returns an array of events that this subscriber wants to listen to.
22
- *
23
- * The array key is the event name. The value can be:
24
- *
25
- * * The method name
26
- * * An array with the method name and priority
27
- * * An array with the method name, priority and number of accepted arguments
28
- *
29
- * For instance:
30
- *
31
- * * array('hook_name' => 'method_name')
32
- * * array('hook_name' => array('method_name', $priority))
33
- * * array('hook_name' => array('method_name', $priority, $accepted_args))
34
- * * array('hook_name' => array(array('method_name_1', $priority_1, $accepted_args_1)), array('method_name_2', $priority_2, $accepted_args_2)))
35
- *
36
- * @return array
37
- */
38
- public function getSubscribedEvents();
39
- }
1
+ <?php
2
+ /**
3
+ * Interface for subscribers
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\EventManagement;
9
+
10
+ /**
11
+ * A Subscriber knows what specific WordPress events it wants to listen to.
12
+ *
13
+ * When an EventManager adds a Subscriber, it gets all the WordPress events that
14
+ * it wants to listen to. It then adds the subscriber as a listener for each of them.
15
+ *
16
+ * @author Carl Alexander <contact@carlalexander.ca>
17
+ */
18
+ interface SubscriberInterface
19
+ {
20
+ /**
21
+ * Returns an array of events that this subscriber wants to listen to.
22
+ *
23
+ * The array key is the event name. The value can be:
24
+ *
25
+ * * The method name
26
+ * * An array with the method name and priority
27
+ * * An array with the method name, priority and number of accepted arguments
28
+ *
29
+ * For instance:
30
+ *
31
+ * * array('hook_name' => 'method_name')
32
+ * * array('hook_name' => array('method_name', $priority))
33
+ * * array('hook_name' => array('method_name', $priority, $accepted_args))
34
+ * * array('hook_name' => array(array('method_name_1', $priority_1, $accepted_args_1)), array('method_name_2', $priority_2, $accepted_args_2)))
35
+ *
36
+ * @return array
37
+ */
38
+ public function getSubscribedEvents();
39
+ }
src/Options/AbstractOptions.php CHANGED
@@ -1,69 +1,69 @@
1
- <?php
2
- /**
3
- * Abstract class to interact with the WP options API
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Options;
9
-
10
- /**
11
- * Manages options using the WordPress options API.
12
- *
13
- * @since 2.0
14
- * @author Remy Perona
15
- */
16
- abstract class AbstractOptions
17
- {
18
- /**
19
- * Gets the option for the given name. Returns the default value if the value does not exist.
20
- *
21
- * @since 2.0
22
- * @author Remy Perona
23
- *
24
- * @param string $name Name of the option to get.
25
- * @param mixed $default Default value to return if the value does not exist.
26
- *
27
- * @return mixed
28
- */
29
- abstract public function get($name, $default = null);
30
-
31
- /**
32
- * Sets the value of an option. Update the value if the option for the given name already exists.
33
- *
34
- * @since 2.0
35
- * @author Remy Perona
36
- * @param string $name Name of the option to set.
37
- * @param mixed $value Value to set for the option.
38
- *
39
- * @return void
40
- */
41
- abstract public function set($name, $value);
42
-
43
- /**
44
- * Deletes the option with the given name.
45
- *
46
- * @since 2.0
47
- * @author Remy Perona
48
- *
49
- * @param string $name Name of the option to delete.
50
- *
51
- * @return void
52
- */
53
- abstract public function delete($name);
54
-
55
- /**
56
- * Checks if the option with the given name exists.
57
- *
58
- * @since 2.0
59
- * @author Remy Perona
60
- *
61
- * @param string $name Name of the option to check.
62
- *
63
- * @return boolean True if the option exists, false otherwise
64
- */
65
- public function has($name)
66
- {
67
- return null !== $this->get($name);
68
- }
69
- }
1
+ <?php
2
+ /**
3
+ * Abstract class to interact with the WP options API
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Options;
9
+
10
+ /**
11
+ * Manages options using the WordPress options API.
12
+ *
13
+ * @since 2.0
14
+ * @author Remy Perona
15
+ */
16
+ abstract class AbstractOptions
17
+ {
18
+ /**
19
+ * Gets the option for the given name. Returns the default value if the value does not exist.
20
+ *
21
+ * @since 2.0
22
+ * @author Remy Perona
23
+ *
24
+ * @param string $name Name of the option to get.
25
+ * @param mixed $default Default value to return if the value does not exist.
26
+ *
27
+ * @return mixed
28
+ */
29
+ abstract public function get($name, $default = null);
30
+
31
+ /**
32
+ * Sets the value of an option. Update the value if the option for the given name already exists.
33
+ *
34
+ * @since 2.0
35
+ * @author Remy Perona
36
+ * @param string $name Name of the option to set.
37
+ * @param mixed $value Value to set for the option.
38
+ *
39
+ * @return void
40
+ */
41
+ abstract public function set($name, $value);
42
+
43
+ /**
44
+ * Deletes the option with the given name.
45
+ *
46
+ * @since 2.0
47
+ * @author Remy Perona
48
+ *
49
+ * @param string $name Name of the option to delete.
50
+ *
51
+ * @return void
52
+ */
53
+ abstract public function delete($name);
54
+
55
+ /**
56
+ * Checks if the option with the given name exists.
57
+ *
58
+ * @since 2.0
59
+ * @author Remy Perona
60
+ *
61
+ * @param string $name Name of the option to check.
62
+ *
63
+ * @return boolean True if the option exists, false otherwise
64
+ */
65
+ public function has($name)
66
+ {
67
+ return null !== $this->get($name);
68
+ }
69
+ }
src/Options/OptionArray.php CHANGED
@@ -1,111 +1,111 @@
1
- <?php
2
- /**
3
- * Manages the plugin options data
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Options;
9
-
10
- /**
11
- * Manages the data inside an option.
12
- *
13
- * @since 2.0
14
- * @author Remy Perona
15
- */
16
- class OptionArray
17
- {
18
- /**
19
- * Option data
20
- *
21
- * @var Array Array of data inside the option
22
- */
23
- private $options;
24
-
25
- /**
26
- * Constructor
27
- *
28
- * @param Array $options Array of data coming from an option.
29
- */
30
- public function __construct($options)
31
- {
32
- $this->options = $options;
33
- }
34
-
35
- /**
36
- * Checks if the provided key exists in the option data array.
37
- *
38
- * @since 2.0
39
- * @author Remy Perona
40
- *
41
- * @param string $key key name.
42
- * @return boolean
43
- */
44
- public function has($key)
45
- {
46
- return isset($this->options[ $key ]);
47
- }
48
-
49
- /**
50
- * Gets the value associated with a specific key.
51
- *
52
- * @since 2.0
53
- * @author Remy Perona
54
- *
55
- * @param string $key key name.
56
- * @param mixed $default default value to return if key doesn't exist.
57
- * @return mixed
58
- */
59
- public function get($key, $default = '')
60
- {
61
- if (! $this->has($key)) {
62
- return $default;
63
- }
64
-
65
- return $this->options[ $key ];
66
- }
67
-
68
- /**
69
- * Sets the value associated with a specific key.
70
- *
71
- * @since 2.0
72
- * @author Remy Perona
73
- *
74
- * @param string $key key name.
75
- * @param mixed $value Value to set.
76
- * @return void
77
- */
78
- public function set($key, $value)
79
- {
80
- $this->options[ $key ] = $value;
81
- }
82
-
83
- /**
84
- * Sets multiple values.
85
- *
86
- * @since 2.0
87
- * @author Remy Perona
88
- *
89
- * @param array $options An array of key/value pairs to set.
90
- * @return void
91
- */
92
- public function setValues($options)
93
- {
94
- foreach ($options as $key => $value) {
95
- $this->set($key, $value);
96
- }
97
- }
98
-
99
- /**
100
- * Gets the option array.
101
- *
102
- * @since 2.0
103
- * @author Remy Perona
104
- *
105
- * @return array
106
- */
107
- public function getOptions()
108
- {
109
- return $this->options;
110
- }
111
- }
1
+ <?php
2
+ /**
3
+ * Manages the plugin options data
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Options;
9
+
10
+ /**
11
+ * Manages the data inside an option.
12
+ *
13
+ * @since 2.0
14
+ * @author Remy Perona
15
+ */
16
+ class OptionArray
17
+ {
18
+ /**
19
+ * Option data
20
+ *
21
+ * @var Array Array of data inside the option
22
+ */
23
+ private $options;
24
+
25
+ /**
26
+ * Constructor
27
+ *
28
+ * @param Array $options Array of data coming from an option.
29
+ */
30
+ public function __construct($options)
31
+ {
32
+ $this->options = $options;
33
+ }
34
+
35
+ /**
36
+ * Checks if the provided key exists in the option data array.
37
+ *
38
+ * @since 2.0
39
+ * @author Remy Perona
40
+ *
41
+ * @param string $key key name.
42
+ * @return boolean
43
+ */
44
+ public function has($key)
45
+ {
46
+ return isset($this->options[ $key ]);
47
+ }
48
+
49
+ /**
50
+ * Gets the value associated with a specific key.
51
+ *
52
+ * @since 2.0
53
+ * @author Remy Perona
54
+ *
55
+ * @param string $key key name.
56
+ * @param mixed $default default value to return if key doesn't exist.
57
+ * @return mixed
58
+ */
59
+ public function get($key, $default = '')
60
+ {
61
+ if (! $this->has($key)) {
62
+ return $default;
63
+ }
64
+
65
+ return $this->options[ $key ];
66
+ }
67
+
68
+ /**
69
+ * Sets the value associated with a specific key.
70
+ *
71
+ * @since 2.0
72
+ * @author Remy Perona
73
+ *
74
+ * @param string $key key name.
75
+ * @param mixed $value Value to set.
76
+ * @return void
77
+ */
78
+ public function set($key, $value)
79
+ {
80
+ $this->options[ $key ] = $value;
81
+ }
82
+
83
+ /**
84
+ * Sets multiple values.
85
+ *
86
+ * @since 2.0
87
+ * @author Remy Perona
88
+ *
89
+ * @param array $options An array of key/value pairs to set.
90
+ * @return void
91
+ */
92
+ public function setValues($options)
93
+ {
94
+ foreach ($options as $key => $value) {
95
+ $this->set($key, $value);
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Gets the option array.
101
+ *
102
+ * @since 2.0
103
+ * @author Remy Perona
104
+ *
105
+ * @return array
106
+ */
107
+ public function getOptions()
108
+ {
109
+ return $this->options;
110
+ }
111
+ }
src/Options/Options.php CHANGED
@@ -1,106 +1,106 @@
1
- <?php
2
- /**
3
- * Options Class
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Options;
9
-
10
- defined('ABSPATH') || die('Cheatin\' uh?');
11
-
12
- /**
13
- * Interact with the WordPress Options API
14
- */
15
- class Options extends AbstractOptions
16
- {
17
- /**
18
- * The prefix used by Rocket Lazyload options.
19
- *
20
- * @since 2.0
21
- * @author Remy Perona
22
- *
23
- * @var string
24
- */
25
- private $prefix;
26
-
27
- /**
28
- * Constructor
29
- *
30
- * @since 2.0
31
- * @author Remy Perona
32
- *
33
- * @param string $prefix options prefix.
34
- */
35
- public function __construct($prefix = '')
36
- {
37
- $this->prefix = $prefix;
38
- }
39
-
40
- /**
41
- * Gets the option name used to store the option in the WordPress database.
42
- *
43
- * @since 2.0
44
- * @author Remy Perona
45
- *
46
- * @param string $name Unprefixed name of the option.
47
- *
48
- * @return string
49
- */
50
- public function getOptionName($name)
51
- {
52
- return $this->prefix . $name;
53
- }
54
-
55
- /**
56
- * Gets the option for the given name. Returns the default value if the value does not exist.
57
- *
58
- * @since 2.0
59
- * @author Remy Perona
60
- *
61
- * @param string $name Name of the option to get.
62
- * @param mixed $default Default value to return if the value does not exist.
63
- *
64
- * @return mixed
65
- */
66
- public function get($name, $default = null)
67
- {
68
- $option = get_option($this->getOptionName($name), $default);
69
-
70
- if (is_array($default) && ! is_array($option)) {
71
- $option = (array) $option;
72
- }
73
-
74
- return $option;
75
- }
76
-
77
- /**
78
- * Sets the value of an option. Update the value if the option for the given name already exists.
79
- *
80
- * @since 2.0
81
- * @author Remy Perona
82
- * @param string $name Name of the option to set.
83
- * @param mixed $value Value to set for the option.
84
- *
85
- * @return void
86
- */
87
- public function set($name, $value)
88
- {
89
- update_option($this->getOptionName($name), $value);
90
- }
91
-
92
- /**
93
- * Deletes the option with the given name.
94
- *
95
- * @since 2.0
96
- * @author Remy Perona
97
- *
98
- * @param string $name Name of the option to delete.
99
- *
100
- * @return void
101
- */
102
- public function delete($name)
103
- {
104
- delete_option($this->getOptionName($name));
105
- }
106
- }
1
+ <?php
2
+ /**
3
+ * Options Class
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Options;
9
+
10
+ defined('ABSPATH') || die('Cheatin\' uh?');
11
+
12
+ /**
13
+ * Interact with the WordPress Options API
14
+ */
15
+ class Options extends AbstractOptions
16
+ {
17
+ /**
18
+ * The prefix used by Rocket Lazyload options.
19
+ *
20
+ * @since 2.0
21
+ * @author Remy Perona
22
+ *
23
+ * @var string
24
+ */
25
+ private $prefix;
26
+
27
+ /**
28
+ * Constructor
29
+ *
30
+ * @since 2.0
31
+ * @author Remy Perona
32
+ *
33
+ * @param string $prefix options prefix.
34
+ */
35
+ public function __construct($prefix = '')
36
+ {
37
+ $this->prefix = $prefix;
38
+ }
39
+
40
+ /**
41
+ * Gets the option name used to store the option in the WordPress database.
42
+ *
43
+ * @since 2.0
44
+ * @author Remy Perona
45
+ *
46
+ * @param string $name Unprefixed name of the option.
47
+ *
48
+ * @return string
49
+ */
50
+ public function getOptionName($name)
51
+ {
52
+ return $this->prefix . $name;
53
+ }
54
+
55
+ /**
56
+ * Gets the option for the given name. Returns the default value if the value does not exist.
57
+ *
58
+ * @since 2.0
59
+ * @author Remy Perona
60
+ *
61
+ * @param string $name Name of the option to get.
62
+ * @param mixed $default Default value to return if the value does not exist.
63
+ *
64
+ * @return mixed
65
+ */
66
+ public function get($name, $default = null)
67
+ {
68
+ $option = get_option($this->getOptionName($name), $default);
69
+
70
+ if (is_array($default) && ! is_array($option)) {
71
+ $option = (array) $option;
72
+ }
73
+
74
+ return $option;
75
+ }
76
+
77
+ /**
78
+ * Sets the value of an option. Update the value if the option for the given name already exists.
79
+ *
80
+ * @since 2.0
81
+ * @author Remy Perona
82
+ * @param string $name Name of the option to set.
83
+ * @param mixed $value Value to set for the option.
84
+ *
85
+ * @return void
86
+ */
87
+ public function set($name, $value)
88
+ {
89
+ update_option($this->getOptionName($name), $value);
90
+ }
91
+
92
+ /**
93
+ * Deletes the option with the given name.
94
+ *
95
+ * @since 2.0
96
+ * @author Remy Perona
97
+ *
98
+ * @param string $name Name of the option to delete.
99
+ *
100
+ * @return void
101
+ */
102
+ public function delete($name)
103
+ {
104
+ delete_option($this->getOptionName($name));
105
+ }
106
+ }
src/Plugin.php CHANGED
@@ -1,97 +1,97 @@
1
- <?php
2
- /**
3
- * Initialize and load the plugin
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin;
9
-
10
- use League\Container\Container;
11
- use RocketLazyLoadPlugin\EventManagement\EventManager;
12
- use RocketLazyLoadPlugin\Options\Options;
13
-
14
- /**
15
- * Plugin initialize
16
- *
17
- * @since 2.0
18
- * @author Remy Perona
19
- */
20
- class Plugin
21
- {
22
- /**
23
- * Is the plugin loaded
24
- *
25
- * @since 2.0
26
- * @author Remy Perona
27
- *
28
- * @var boolean
29
- */
30
- private $loaded = false;
31
-
32
- /**
33
- * Checks if the plugin is loaded
34
- *
35
- * @since 2.0
36
- * @author Remy Perona
37
- *
38
- * @return boolean
39
- */
40
- private function isLoaded()
41
- {
42
- return $this->loaded;
43
- }
44
-
45
- /**
46
- * Loads the plugin in WordPress
47
- *
48
- * @since 2.0
49
- * @author Remy Perona
50
- *
51
- * @return void
52
- */
53
- public function load()
54
- {
55
- if ($this->isLoaded()) {
56
- return;
57
- }
58
-
59
- $container = new Container();
60
-
61
- $container->add('template_path', ROCKET_LL_PATH . 'views/');
62
- $container->add('plugin_basename', ROCKET_LL_BASENAME);
63
-
64
- $container->add('options', function () {
65
- return new Options('rocket_lazyload');
66
- });
67
-
68
- $container->add('event_manager', function () {
69
- return new EventManager();
70
- });
71
-
72
- $service_providers = [
73
- 'RocketLazyLoadPlugin\ServiceProvider\OptionServiceProvider',
74
- 'RocketLazyLoadPlugin\ServiceProvider\AdminServiceProvider',
75
- 'RocketLazyLoadPlugin\ServiceProvider\ImagifyNoticeServiceProvider',
76
- 'RocketLazyLoadPlugin\ServiceProvider\LazyloadServiceProvider',
77
- 'RocketLazyLoadPlugin\ServiceProvider\SubscribersServiceProvider',
78
- ];
79
-
80
- foreach ($service_providers as $service) {
81
- $container->addServiceProvider($service);
82
- }
83
-
84
- $subscribers = [
85
- 'RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber',
86
- 'RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber',
87
- 'RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber',
88
- 'RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber',
89
- ];
90
-
91
- foreach ($subscribers as $subscriber) {
92
- $container->get('event_manager')->addSubscriber($container->get($subscriber));
93
- }
94
-
95
- $this->loaded = true;
96
- }
97
- }
1
+ <?php
2
+ /**
3
+ * Initialize and load the plugin
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin;
9
+
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\Container;
11
+ use RocketLazyLoadPlugin\EventManagement\EventManager;
12
+ use RocketLazyLoadPlugin\Options\Options;
13
+
14
+ /**
15
+ * Plugin initialize
16
+ *
17
+ * @since 2.0
18
+ * @author Remy Perona
19
+ */
20
+ class Plugin
21
+ {
22
+ /**
23
+ * Is the plugin loaded
24
+ *
25
+ * @since 2.0
26
+ * @author Remy Perona
27
+ *
28
+ * @var boolean
29
+ */
30
+ private $loaded = false;
31
+
32
+ /**
33
+ * Checks if the plugin is loaded
34
+ *
35
+ * @since 2.0
36
+ * @author Remy Perona
37
+ *
38
+ * @return boolean
39
+ */
40
+ private function isLoaded()
41
+ {
42
+ return $this->loaded;
43
+ }
44
+
45
+ /**
46
+ * Loads the plugin in WordPress
47
+ *
48
+ * @since 2.0
49
+ * @author Remy Perona
50
+ *
51
+ * @return void
52
+ */
53
+ public function load()
54
+ {
55
+ if ($this->isLoaded()) {
56
+ return;
57
+ }
58
+
59
+ $container = new Container();
60
+
61
+ $container->add('template_path', ROCKET_LL_PATH . 'views/');
62
+ $container->add('plugin_basename', ROCKET_LL_BASENAME);
63
+
64
+ $container->add('options', function () {
65
+ return new Options('rocket_lazyload');
66
+ });
67
+
68
+ $container->add('event_manager', function () {
69
+ return new EventManager();
70
+ });
71
+
72
+ $service_providers = [
73
+ 'RocketLazyLoadPlugin\ServiceProvider\OptionServiceProvider',
74
+ 'RocketLazyLoadPlugin\ServiceProvider\AdminServiceProvider',
75
+ 'RocketLazyLoadPlugin\ServiceProvider\ImagifyNoticeServiceProvider',
76
+ 'RocketLazyLoadPlugin\ServiceProvider\LazyloadServiceProvider',
77
+ 'RocketLazyLoadPlugin\ServiceProvider\SubscribersServiceProvider',
78
+ ];
79
+
80
+ foreach ($service_providers as $service) {
81
+ $container->addServiceProvider($service);
82
+ }
83
+
84
+ $subscribers = [
85
+ 'RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber',
86
+ 'RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber',
87
+ 'RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber',
88
+ 'RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber',
89
+ ];
90
+
91
+ foreach ($subscribers as $subscriber) {
92
+ $container->get('event_manager')->addSubscriber($container->get($subscriber));
93
+ }
94
+
95
+ $this->loaded = true;
96
+ }
97
+ }
src/ServiceProvider/AdminServiceProvider.php CHANGED
@@ -1,47 +1,47 @@
1
- <?php
2
- /**
3
- * Service Provider for the admin page classes
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\ServiceProvider;
9
-
10
- use League\Container\ServiceProvider\AbstractServiceProvider;
11
-
12
- /**
13
- * Adds the admin page to the container
14
- *
15
- * @since 2.0
16
- * @author Remy Perona
17
- */
18
- class AdminServiceProvider extends AbstractServiceProvider
19
- {
20
- /**
21
- * Data provided by the service provider
22
- *
23
- * @since 2.0
24
- * @author Remy Perona
25
- *
26
- * @var array
27
- */
28
- protected $provides = [
29
- 'RocketLazyLoadPlugin\Admin\AdminPage',
30
- ];
31
-
32
- /**
33
- * Registers the admin page in the container
34
- *
35
- * @since 2.0
36
- * @author Remy Perona
37
- *
38
- * @return void
39
- */
40
- public function register()
41
- {
42
- $this->getContainer()->add('RocketLazyLoadPlugin\Admin\AdminPage')
43
- ->withArgument($this->getContainer()->get('options'))
44
- ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Options\OptionArray'))
45
- ->withArgument($this->getContainer()->get('template_path'));
46
- }
47
- }
1
+ <?php
2
+ /**
3
+ * Service Provider for the admin page classes
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\ServiceProvider;
9
+
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
11
+
12
+ /**
13
+ * Adds the admin page to the container
14
+ *
15
+ * @since 2.0
16
+ * @author Remy Perona
17
+ */
18
+ class AdminServiceProvider extends AbstractServiceProvider
19
+ {
20
+ /**
21
+ * Data provided by the service provider
22
+ *
23
+ * @since 2.0
24
+ * @author Remy Perona
25
+ *
26
+ * @var array
27
+ */
28
+ protected $provides = [
29
+ 'RocketLazyLoadPlugin\Admin\AdminPage',
30
+ ];
31
+
32
+ /**
33
+ * Registers the admin page in the container
34
+ *
35
+ * @since 2.0
36
+ * @author Remy Perona
37
+ *
38
+ * @return void
39
+ */
40
+ public function register()
41
+ {
42
+ $this->getContainer()->add('RocketLazyLoadPlugin\Admin\AdminPage')
43
+ ->withArgument($this->getContainer()->get('options'))
44
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Options\OptionArray'))
45
+ ->withArgument($this->getContainer()->get('template_path'));
46
+ }
47
+ }
src/ServiceProvider/ImagifyNoticeServiceProvider.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
- /**
3
- * Service Provider for the imagify notice class
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\ServiceProvider;
9
-
10
- use League\Container\ServiceProvider\AbstractServiceProvider;
11
-
12
- /**
13
- * Adds the Imagify notice to the container
14
- *
15
- * @since 2.0
16
- * @author Remy Perona
17
- */
18
- class ImagifyNoticeServiceProvider extends AbstractServiceProvider
19
- {
20
- /**
21
- * Data provided by the service provider
22
- *
23
- * @since 2.0
24
- * @author Remy Perona
25
- *
26
- * @var array
27
- */
28
- protected $provides = [
29
- 'RocketLazyLoadPlugin\Admin\ImagifyNotice',
30
- ];
31
-
32
- /**
33
- * Registers the Imagify notice in the container
34
- *
35
- * @since 2.0
36
- * @author Remy Perona
37
- *
38
- * @return void
39
- */
40
- public function register()
41
- {
42
- $this->getContainer()->add('RocketLazyLoadPlugin\Admin\ImagifyNotice')
43
- ->withArgument($this->getContainer()->get('template_path'));
44
- }
45
- }
1
+ <?php
2
+ /**
3
+ * Service Provider for the imagify notice class
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\ServiceProvider;
9
+
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
11
+
12
+ /**
13
+ * Adds the Imagify notice to the container
14
+ *
15
+ * @since 2.0
16
+ * @author Remy Perona
17
+ */
18
+ class ImagifyNoticeServiceProvider extends AbstractServiceProvider
19
+ {
20
+ /**
21
+ * Data provided by the service provider
22
+ *
23
+ * @since 2.0
24
+ * @author Remy Perona
25
+ *
26
+ * @var array
27
+ */
28
+ protected $provides = [
29
+ 'RocketLazyLoadPlugin\Admin\ImagifyNotice',
30
+ ];
31
+
32
+ /**
33
+ * Registers the Imagify notice in the container
34
+ *
35
+ * @since 2.0
36
+ * @author Remy Perona
37
+ *
38
+ * @return void
39
+ */
40
+ public function register()
41
+ {
42
+ $this->getContainer()->add('RocketLazyLoadPlugin\Admin\ImagifyNotice')
43
+ ->withArgument($this->getContainer()->get('template_path'));
44
+ }
45
+ }
src/ServiceProvider/LazyloadServiceProvider.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- /**
3
- * Service Provider for the lazyload library
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\ServiceProvider;
9
-
10
- use League\Container\ServiceProvider\AbstractServiceProvider;
11
-
12
- /**
13
- * Adds the lazyload library to the container
14
- *
15
- * @since 2.0
16
- * @author Remy Perona
17
- */
18
- class LazyloadServiceProvider extends AbstractServiceProvider
19
- {
20
- /**
21
- * Data provided by the service provider
22
- *
23
- * @since 2.0
24
- * @author Remy Perona
25
- *
26
- * @var array
27
- */
28
- protected $provides = [
29
- 'RocketLazyload\Assets',
30
- 'RocketLazyload\Image',
31
- 'RocketLazyload\Iframe',
32
- ];
33
-
34
- /**
35
- * Registers the lazyload library in the container
36
- *
37
- * @since 2.0
38
- * @author Remy Perona
39
- *
40
- * @return void
41
- */
42
- public function register()
43
- {
44
- $this->getContainer()->add('RocketLazyload\Assets');
45
- $this->getContainer()->add('RocketLazyload\Image');
46
- $this->getContainer()->add('RocketLazyload\Iframe');
47
- }
48
- }
1
+ <?php
2
+ /**
3
+ * Service Provider for the lazyload library
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\ServiceProvider;
9
+
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
11
+
12
+ /**
13
+ * Adds the lazyload library to the container
14
+ *
15
+ * @since 2.0
16
+ * @author Remy Perona
17
+ */
18
+ class LazyloadServiceProvider extends AbstractServiceProvider
19
+ {
20
+ /**
21
+ * Data provided by the service provider
22
+ *
23
+ * @since 2.0
24
+ * @author Remy Perona
25
+ *
26
+ * @var array
27
+ */
28
+ protected $provides = [
29
+ 'RocketLazyLoadPlugin\Dependencies\RocketLazyload\Assets',
30
+ 'RocketLazyLoadPlugin\Dependencies\RocketLazyload\Image',
31
+ 'RocketLazyLoadPlugin\Dependencies\RocketLazyload\Iframe',
32
+ ];
33
+
34
+ /**
35
+ * Registers the lazyload library in the container
36
+ *
37
+ * @since 2.0
38
+ * @author Remy Perona
39
+ *
40
+ * @return void
41
+ */
42
+ public function register()
43
+ {
44
+ $this->getContainer()->add('RocketLazyLoadPlugin\Dependencies\RocketLazyload\Assets');
45
+ $this->getContainer()->add('RocketLazyLoadPlugin\Dependencies\RocketLazyload\Image');
46
+ $this->getContainer()->add('RocketLazyLoadPlugin\Dependencies\RocketLazyload\Iframe');
47
+ }
48
+ }
src/ServiceProvider/OptionServiceProvider.php CHANGED
@@ -1,45 +1,45 @@
1
- <?php
2
- /**
3
- * Service Provider for the plugin options
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\ServiceProvider;
9
-
10
- use League\Container\ServiceProvider\AbstractServiceProvider;
11
-
12
- /**
13
- * Adds the option array to the container
14
- *
15
- * @since 2.0
16
- * @author Remy Perona
17
- */
18
- class OptionServiceProvider extends AbstractServiceProvider
19
- {
20
- /**
21
- * Data provided by the service provider
22
- *
23
- * @since 2.0
24
- * @author Remy Perona
25
- *
26
- * @var array
27
- */
28
- protected $provides = [
29
- 'RocketLazyLoadPlugin\Options\OptionArray',
30
- ];
31
-
32
- /**
33
- * Registers the option array in the container
34
- *
35
- * @since 2.0
36
- * @author Remy Perona
37
- *
38
- * @return void
39
- */
40
- public function register()
41
- {
42
- $this->getContainer()->add('RocketLazyLoadPlugin\Options\OptionArray')
43
- ->withArgument($this->getContainer()->get('options')->get('_options'));
44
- }
45
- }
1
+ <?php
2
+ /**
3
+ * Service Provider for the plugin options
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\ServiceProvider;
9
+
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
11
+
12
+ /**
13
+ * Adds the option array to the container
14
+ *
15
+ * @since 2.0
16
+ * @author Remy Perona
17
+ */
18
+ class OptionServiceProvider extends AbstractServiceProvider
19
+ {
20
+ /**
21
+ * Data provided by the service provider
22
+ *
23
+ * @since 2.0
24
+ * @author Remy Perona
25
+ *
26
+ * @var array
27
+ */
28
+ protected $provides = [
29
+ 'RocketLazyLoadPlugin\Options\OptionArray',
30
+ ];
31
+
32
+ /**
33
+ * Registers the option array in the container
34
+ *
35
+ * @since 2.0
36
+ * @author Remy Perona
37
+ *
38
+ * @return void
39
+ */
40
+ public function register()
41
+ {
42
+ $this->getContainer()->add('RocketLazyLoadPlugin\Options\OptionArray')
43
+ ->withArgument($this->getContainer()->get('options')->get('_options'));
44
+ }
45
+ }
src/ServiceProvider/SubscribersServiceProvider.php CHANGED
@@ -1,60 +1,60 @@
1
- <?php
2
- /**
3
- * Service Provider for the plugin subscribers
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\ServiceProvider;
9
-
10
- use League\Container\ServiceProvider\AbstractServiceProvider;
11
-
12
- /**
13
- * Adds the subscribers to the container
14
- *
15
- * @since 2.0
16
- * @author Remy Perona
17
- */
18
- class SubscribersServiceProvider extends AbstractServiceProvider
19
- {
20
- /**
21
- * Data provided by the service provider
22
- *
23
- * @since 2.0
24
- * @author Remy Perona
25
- *
26
- * @var array
27
- */
28
- protected $provides = [
29
- 'RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber',
30
- 'RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber',
31
- 'RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber',
32
- 'RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber',
33
- ];
34
-
35
- /**
36
- * Registers the subscribers in the container
37
- *
38
- * @since 2.0
39
- * @author Remy Perona
40
- *
41
- * @return void
42
- */
43
- public function register()
44
- {
45
- $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber');
46
-
47
- $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber')
48
- ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\AdminPage'))
49
- ->withArgument($this->getContainer()->get('plugin_basename'));
50
-
51
- $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber')
52
- ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\ImagifyNotice'));
53
-
54
- $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber')
55
- ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Options\OptionArray'))
56
- ->withArgument($this->getContainer()->get('RocketLazyload\Assets'))
57
- ->withArgument($this->getContainer()->get('RocketLazyload\Image'))
58
- ->withArgument($this->getContainer()->get('RocketLazyload\Iframe'));
59
- }
60
- }
1
+ <?php
2
+ /**
3
+ * Service Provider for the plugin subscribers
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\ServiceProvider;
9
+
10
+ use RocketLazyLoadPlugin\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
11
+
12
+ /**
13
+ * Adds the subscribers to the container
14
+ *
15
+ * @since 2.0
16
+ * @author Remy Perona
17
+ */
18
+ class SubscribersServiceProvider extends AbstractServiceProvider
19
+ {
20
+ /**
21
+ * Data provided by the service provider
22
+ *
23
+ * @since 2.0
24
+ * @author Remy Perona
25
+ *
26
+ * @var array
27
+ */
28
+ protected $provides = [
29
+ 'RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber',
30
+ 'RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber',
31
+ 'RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber',
32
+ 'RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber',
33
+ ];
34
+
35
+ /**
36
+ * Registers the subscribers in the container
37
+ *
38
+ * @since 2.0
39
+ * @author Remy Perona
40
+ *
41
+ * @return void
42
+ */
43
+ public function register()
44
+ {
45
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\ThirdParty\AMPSubscriber');
46
+
47
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\AdminPageSubscriber')
48
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\AdminPage'))
49
+ ->withArgument($this->getContainer()->get('plugin_basename'));
50
+
51
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\ImagifyNoticeSubscriber')
52
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Admin\ImagifyNotice'));
53
+
54
+ $this->getContainer()->share('RocketLazyLoadPlugin\Subscriber\LazyloadSubscriber')
55
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Options\OptionArray'))
56
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Dependencies\RocketLazyload\Assets'))
57
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Dependencies\RocketLazyload\Image'))
58
+ ->withArgument($this->getContainer()->get('RocketLazyLoadPlugin\Dependencies\RocketLazyload\Iframe'));
59
+ }
60
+ }
src/Subscriber/AdminPageSubscriber.php CHANGED
@@ -1,142 +1,142 @@
1
- <?php
2
- /**
3
- * Admin Page subscriber
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Subscriber;
9
-
10
- defined('ABSPATH') || die('Cheatin\' uh?');
11
-
12
- use RocketLazyLoadPlugin\EventManagement\SubscriberInterface;
13
- use RocketLazyLoadPlugin\Admin\AdminPage;
14
-
15
- /**
16
- * Admin Page Subscriber
17
- *
18
- * @since 2.0
19
- * @author Remy Perona
20
- */
21
- class AdminPageSubscriber implements SubscriberInterface
22
- {
23
- /**
24
- * AdminPage instance
25
- *
26
- * @since 2.0
27
- * @author Remy Perona
28
- *
29
- * @var AdminPage
30
- */
31
- private $page;
32
-
33
- /**
34
- * Plugin basename
35
- *
36
- * @since 2.0
37
- * @author Remy Perona
38
- *
39
- * @var string
40
- */
41
- private $plugin_basename;
42
-
43
- /**
44
- * Constructor
45
- *
46
- * @since 2.0
47
- * @author Remy Perona
48
- *
49
- * @param AdminPage $page AdminPage instance.
50
- * @param string $plugin_basename Plugin basename.
51
- */
52
- public function __construct(AdminPage $page, $plugin_basename)
53
- {
54
- $this->page = $page;
55
- $this->plugin_basename = $plugin_basename;
56
- }
57
-
58
- /**
59
- * @inheritDoc
60
- */
61
- public function getSubscribedEvents()
62
- {
63
- return [
64
- 'admin_init' => 'configure',
65
- 'admin_menu' => 'addAdminPage',
66
- 'plugin_action_links_' . $this->plugin_basename => 'addPluginPageLink',
67
- 'admin_enqueue_scripts' => 'enqueueAdminStyle',
68
- ];
69
- }
70
-
71
- /**
72
- * Registers the plugin settings in WordPress
73
- *
74
- * @since 2.0
75
- * @author Remy Perona
76
- *
77
- * @return void
78
- */
79
- public function configure()
80
- {
81
- $this->page->configure();
82
- }
83
-
84
- /**
85
- * Adds the admin page to the settings menu
86
- *
87
- * @since 2.0
88
- * @author Remy Perona
89
- *
90
- * @return void
91
- */
92
- public function addAdminPage()
93
- {
94
- add_options_page(
95
- $this->page->getPageTitle(),
96
- $this->page->getMenuTitle(),
97
- $this->page->getCapability(),
98
- $this->page->getSlug(),
99
- [ $this->page, 'renderPage' ]
100
- );
101
- }
102
-
103
- /**
104
- * Adds a link to the plugin settings on the plugins page
105
- *
106
- * @since 2.0
107
- * @author Remy Perona
108
- *
109
- * @param array $actions Actions for the plugin.
110
- * @return array
111
- */
112
- public function addPluginPageLink($actions)
113
- {
114
- array_unshift(
115
- $actions,
116
- sprintf(
117
- '<a href="%s">%s</a>',
118
- admin_url('options-general.php?page=' . $this->page->getSlug()),
119
- __('Settings', 'rocket-lazy-load')
120
- )
121
- );
122
-
123
- return $actions;
124
- }
125
-
126
- /**
127
- * Enqueue the css for the option page
128
- *
129
- * @since 2.0
130
- * @author Remy Perona
131
- *
132
- * @param string $hook_suffix Current page hook.
133
- */
134
- public function enqueueAdminStyle($hook_suffix)
135
- {
136
- if ('settings_page_rocket_lazyload' !== $hook_suffix) {
137
- return;
138
- }
139
-
140
- wp_enqueue_style('rocket-lazyload', ROCKET_LL_ASSETS_URL . 'css/admin.css', null, ROCKET_LL_VERSION);
141
- }
142
- }
1
+ <?php
2
+ /**
3
+ * Admin Page subscriber
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Subscriber;
9
+
10
+ defined('ABSPATH') || die('Cheatin\' uh?');
11
+
12
+ use RocketLazyLoadPlugin\EventManagement\SubscriberInterface;
13
+ use RocketLazyLoadPlugin\Admin\AdminPage;
14
+
15
+ /**
16
+ * Admin Page Subscriber
17
+ *
18
+ * @since 2.0
19
+ * @author Remy Perona
20
+ */
21
+ class AdminPageSubscriber implements SubscriberInterface
22
+ {
23
+ /**
24
+ * AdminPage instance
25
+ *
26
+ * @since 2.0
27
+ * @author Remy Perona
28
+ *
29
+ * @var AdminPage
30
+ */
31
+ private $page;
32
+
33
+ /**
34
+ * Plugin basename
35
+ *
36
+ * @since 2.0
37
+ * @author Remy Perona
38
+ *
39
+ * @var string
40
+ */
41
+ private $plugin_basename;
42
+
43
+ /**
44
+ * Constructor
45
+ *
46
+ * @since 2.0
47
+ * @author Remy Perona
48
+ *
49
+ * @param AdminPage $page AdminPage instance.
50
+ * @param string $plugin_basename Plugin basename.
51
+ */
52
+ public function __construct(AdminPage $page, $plugin_basename)
53
+ {
54
+ $this->page = $page;
55
+ $this->plugin_basename = $plugin_basename;
56
+ }
57
+
58
+ /**
59
+ * @inheritDoc
60
+ */
61
+ public function getSubscribedEvents()
62
+ {
63
+ return [
64
+ 'admin_init' => 'configure',
65
+ 'admin_menu' => 'addAdminPage',
66
+ 'plugin_action_links_' . $this->plugin_basename => 'addPluginPageLink',
67
+ 'admin_enqueue_scripts' => 'enqueueAdminStyle',
68
+ ];
69
+ }
70
+
71
+ /**
72
+ * Registers the plugin settings in WordPress
73
+ *
74
+ * @since 2.0
75
+ * @author Remy Perona
76
+ *
77
+ * @return void
78
+ */
79
+ public function configure()
80
+ {
81
+ $this->page->configure();
82
+ }
83
+
84
+ /**
85
+ * Adds the admin page to the settings menu
86
+ *
87
+ * @since 2.0
88
+ * @author Remy Perona
89
+ *
90
+ * @return void
91
+ */
92
+ public function addAdminPage()
93
+ {
94
+ add_options_page(
95
+ $this->page->getPageTitle(),
96
+ $this->page->getMenuTitle(),
97
+ $this->page->getCapability(),
98
+ $this->page->getSlug(),
99
+ [ $this->page, 'renderPage' ]
100
+ );
101
+ }
102
+
103
+ /**
104
+ * Adds a link to the plugin settings on the plugins page
105
+ *
106
+ * @since 2.0
107
+ * @author Remy Perona
108
+ *
109
+ * @param array $actions Actions for the plugin.
110
+ * @return array
111
+ */
112
+ public function addPluginPageLink($actions)
113
+ {
114
+ array_unshift(
115
+ $actions,
116
+ sprintf(
117
+ '<a href="%s">%s</a>',
118
+ admin_url('options-general.php?page=' . $this->page->getSlug()),
119
+ __('Settings', 'rocket-lazy-load')
120
+ )
121
+ );
122
+
123
+ return $actions;
124
+ }
125
+
126
+ /**
127
+ * Enqueue the css for the option page
128
+ *
129
+ * @since 2.0
130
+ * @author Remy Perona
131
+ *
132
+ * @param string $hook_suffix Current page hook.
133
+ */
134
+ public function enqueueAdminStyle($hook_suffix)
135
+ {
136
+ if ('settings_page_rocket_lazyload' !== $hook_suffix) {
137
+ return;
138
+ }
139
+
140
+ wp_enqueue_style('rocket-lazyload', ROCKET_LL_ASSETS_URL . 'css/admin.css', null, ROCKET_LL_VERSION);
141
+ }
142
+ }
src/Subscriber/ImagifyNoticeSubscriber.php CHANGED
@@ -1,152 +1,152 @@
1
- <?php
2
- /**
3
- * Imagify Notice subscriber
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Subscriber;
9
-
10
- defined('ABSPATH') || die('Cheatin\' uh?');
11
-
12
- use RocketLazyLoadPlugin\EventManagement\SubscriberInterface;
13
- use RocketLazyLoadPlugin\Admin\ImagifyNotice;
14
-
15
- /**
16
- * Imagify Notice Subscriber
17
- *
18
- * @since 2.0
19
- * @author Remy Perona
20
- */
21
- class ImagifyNoticeSubscriber implements SubscriberInterface
22
- {
23
- /**
24
- * ImagifyNotice instance
25
- *
26
- * @since 2.0
27
- * @author Remy Perona
28
- *
29
- * @var ImagifyNotice
30
- */
31
- private $imagify_notice;
32
-
33
- /**
34
- * Constructor
35
- *
36
- * @since 2.0
37
- * @author Remy Perona
38
- *
39
- * @param ImagifyNotice $imagify_notice ImagifyNotice instance.
40
- */
41
- public function __construct(ImagifyNotice $imagify_notice)
42
- {
43
- $this->imagify_notice = $imagify_notice;
44
- }
45
-
46
- /**
47
- * @inheritDoc
48
- */
49
- public function getSubscribedEvents()
50
- {
51
- return [
52
- 'admin_notices' => 'imagifyNotice',
53
- 'admin_footer-settings_page_rocket_lazyload' => 'dismissNoticeJS',
54
- 'wp_ajax_rocket_lazyload_ignore' => 'dismissBoxes',
55
- 'admin_post_rocket_lazyload_ignore' => 'dismissBoxes',
56
- ];
57
- }
58
-
59
- /**
60
- * Displays the Imagify notice
61
- *
62
- * @since 2.0
63
- * @author Remy Perona
64
- *
65
- * @return void
66
- */
67
- public function imagifyNotice()
68
- {
69
- $current_screen = get_current_screen();
70
-
71
- if ('admin_notices' === current_filter() && ( isset($current_screen) && 'settings_page_rocket_lazyload' !== $current_screen->base )) {
72
- return;
73
- }
74
-
75
- $boxes = get_user_meta(get_current_user_id(), 'rocket_lazyload_boxes', true);
76
-
77
- if (defined('IMAGIFY_VERSION') || in_array('rocket_lazyload_imagify_notice', (array) $boxes, true) || 1 === get_option('rocket_lazyload_dismiss_imagify_notice') || ! current_user_can('manage_options')) {
78
- return;
79
- }
80
-
81
- $this->imagify_notice->displayNotice();
82
- }
83
-
84
- /**
85
- * Inserts the javascript to dismiss the notice
86
- *
87
- * @since 2.0
88
- * @author Remy Perona
89
- *
90
- * @return void
91
- */
92
- public function dismissNoticeJS()
93
- {
94
- echo "<script>
95
- jQuery( document ).ready( function( $ ){
96
- $( '.rktll-cross' ).on( 'click', function( e ) {
97
- e.preventDefault();
98
- var url = $( this ).attr( 'href' ).replace( 'admin-post', 'admin-ajax' );
99
- $.get( url ).done( $( this ).parent().hide( 'slow' ) );
100
- });
101
- } );
102
- </script>";
103
- }
104
-
105
- /**
106
- * Saves the dismiss for the user
107
- *
108
- * @since 2.0
109
- * @author Remy Perona
110
- *
111
- * @return void
112
- */
113
- public function dismissBoxes()
114
- {
115
- if (! isset($_GET['box'], $_GET['action'], $_GET['_wpnonce'])) {
116
- return;
117
- }
118
-
119
- if (! wp_verify_nonce(sanitize_key($_GET['_wpnonce']), 'rocket_lazyload_ignore_rocket_lazyload_imagify_notice')) {
120
- if (defined('DOING_AJAX')) {
121
- wp_send_json(['error' => 1]);
122
- } else {
123
- wp_nonce_ays('');
124
- }
125
- }
126
-
127
- $box = sanitize_key(wp_unslash($_GET['box']));
128
-
129
- if ('rocket_lazyload_imagify_notice' === $box) {
130
- update_option('rocket_lazyload_dismiss_imagify_notice', 0);
131
- }
132
-
133
- $actual = (array) get_user_meta(get_current_user_id(), 'rocket_lazyload_boxes', true);
134
- $actual = array_merge($actual, [ $box ]);
135
- $actual = array_filter($actual);
136
- $actual = array_unique($actual);
137
-
138
- update_user_meta(get_current_user_id(), 'rocket_lazyload_boxes', $actual);
139
- delete_transient($box);
140
-
141
- if (empty($GLOBALS['pagenow']) || 'admin-post.php' !== $GLOBALS['pagenow']) {
142
- return;
143
- }
144
-
145
- if (defined('DOING_AJAX')) {
146
- wp_send_json(['error' => 0]);
147
- } else {
148
- wp_safe_redirect(esc_url_raw(wp_get_referer()));
149
- die();
150
- }
151
- }
152
- }
1
+ <?php
2
+ /**
3
+ * Imagify Notice subscriber
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Subscriber;
9
+
10
+ defined('ABSPATH') || die('Cheatin\' uh?');
11
+
12
+ use RocketLazyLoadPlugin\EventManagement\SubscriberInterface;
13
+ use RocketLazyLoadPlugin\Admin\ImagifyNotice;
14
+
15
+ /**
16
+ * Imagify Notice Subscriber
17
+ *
18
+ * @since 2.0
19
+ * @author Remy Perona
20
+ */
21
+ class ImagifyNoticeSubscriber implements SubscriberInterface
22
+ {
23
+ /**
24
+ * ImagifyNotice instance
25
+ *
26
+ * @since 2.0
27
+ * @author Remy Perona
28
+ *
29
+ * @var ImagifyNotice
30
+ */
31
+ private $imagify_notice;
32
+
33
+ /**
34
+ * Constructor
35
+ *
36
+ * @since 2.0
37
+ * @author Remy Perona
38
+ *
39
+ * @param ImagifyNotice $imagify_notice ImagifyNotice instance.
40
+ */
41
+ public function __construct(ImagifyNotice $imagify_notice)
42
+ {
43
+ $this->imagify_notice = $imagify_notice;
44
+ }
45
+
46
+ /**
47
+ * @inheritDoc
48
+ */
49
+ public function getSubscribedEvents()
50
+ {
51
+ return [
52
+ 'admin_notices' => 'imagifyNotice',
53
+ 'admin_footer-settings_page_rocket_lazyload' => 'dismissNoticeJS',
54
+ 'wp_ajax_rocket_lazyload_ignore' => 'dismissBoxes',
55
+ 'admin_post_rocket_lazyload_ignore' => 'dismissBoxes',
56
+ ];
57
+ }
58
+
59
+ /**
60
+ * Displays the Imagify notice
61
+ *
62
+ * @since 2.0
63
+ * @author Remy Perona
64
+ *
65
+ * @return void
66
+ */
67
+ public function imagifyNotice()
68
+ {
69
+ $current_screen = get_current_screen();
70
+
71
+ if ('admin_notices' === current_filter() && ( isset($current_screen) && 'settings_page_rocket_lazyload' !== $current_screen->base )) {
72
+ return;
73
+ }
74
+
75
+ $boxes = get_user_meta(get_current_user_id(), 'rocket_lazyload_boxes', true);
76
+
77
+ if (defined('IMAGIFY_VERSION') || in_array('rocket_lazyload_imagify_notice', (array) $boxes, true) || 1 === get_option('rocket_lazyload_dismiss_imagify_notice') || ! current_user_can('manage_options')) {
78
+ return;
79
+ }
80
+
81
+ $this->imagify_notice->displayNotice();
82
+ }
83
+
84
+ /**
85
+ * Inserts the javascript to dismiss the notice
86
+ *
87
+ * @since 2.0
88
+ * @author Remy Perona
89
+ *
90
+ * @return void
91
+ */
92
+ public function dismissNoticeJS()
93
+ {
94
+ echo "<script>
95
+ jQuery( document ).ready( function( $ ){
96
+ $( '.rktll-cross' ).on( 'click', function( e ) {
97
+ e.preventDefault();
98
+ var url = $( this ).attr( 'href' ).replace( 'admin-post', 'admin-ajax' );
99
+ $.get( url ).done( $( this ).parent().hide( 'slow' ) );
100
+ });
101
+ } );
102
+ </script>";
103
+ }
104
+
105
+ /**
106
+ * Saves the dismiss for the user
107
+ *
108
+ * @since 2.0
109
+ * @author Remy Perona
110
+ *
111
+ * @return void
112
+ */
113
+ public function dismissBoxes()
114
+ {
115
+ if (! isset($_GET['box'], $_GET['action'], $_GET['_wpnonce'])) {
116
+ return;
117
+ }
118
+
119
+ if (! wp_verify_nonce(sanitize_key($_GET['_wpnonce']), 'rocket_lazyload_ignore_rocket_lazyload_imagify_notice')) {
120
+ if (defined('DOING_AJAX')) {
121
+ wp_send_json(['error' => 1]);
122
+ } else {
123
+ wp_nonce_ays('');
124
+ }
125
+ }
126
+
127
+ $box = sanitize_key(wp_unslash($_GET['box']));
128
+
129
+ if ('rocket_lazyload_imagify_notice' === $box) {
130
+ update_option('rocket_lazyload_dismiss_imagify_notice', 0);
131
+ }
132
+
133
+ $actual = (array) get_user_meta(get_current_user_id(), 'rocket_lazyload_boxes', true);
134
+ $actual = array_merge($actual, [ $box ]);
135
+ $actual = array_filter($actual);
136
+ $actual = array_unique($actual);
137
+
138
+ update_user_meta(get_current_user_id(), 'rocket_lazyload_boxes', $actual);
139
+ delete_transient($box);
140
+
141
+ if (empty($GLOBALS['pagenow']) || 'admin-post.php' !== $GLOBALS['pagenow']) {
142
+ return;
143
+ }
144
+
145
+ if (defined('DOING_AJAX')) {
146
+ wp_send_json(['error' => 0]);
147
+ } else {
148
+ wp_safe_redirect(esc_url_raw(wp_get_referer()));
149
+ die();
150
+ }
151
+ }
152
+ }
src/Subscriber/LazyloadSubscriber.php CHANGED
@@ -1,429 +1,429 @@
1
- <?php
2
- /**
3
- * Lazyload subscriber
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Subscriber;
9
-
10
- use RocketLazyLoadPlugin\EventManagement\SubscriberInterface;
11
- use RocketLazyLoadPlugin\Options\OptionArray;
12
- use RocketLazyload\Assets;
13
- use RocketLazyload\Image;
14
- use RocketLazyload\Iframe;
15
-
16
- /**
17
- * Lazyload Subscriber
18
- *
19
- * @since 2.0
20
- * @author Remy Perona
21
- */
22
- class LazyloadSubscriber implements SubscriberInterface
23
- {
24
- /**
25
- * OptionArray instance
26
- *
27
- * @since 2.0
28
- * @author Remy Perona
29
- *
30
- * @var OptionArray
31
- */
32
- private $option_array;
33
-
34
- /**
35
- * Assets instance
36
- *
37
- * @since 2.0
38
- * @author Remy Perona
39
- *
40
- * @var Assets
41
- */
42
- private $assets;
43
-
44
- /**
45
- * Image instance
46
- *
47
- * @since 2.0
48
- * @author Remy Perona
49
- *
50
- * @var Image
51
- */
52
- private $image;
53
-
54
- /**
55
- * Iframe instance
56
- *
57
- * @since 2.0
58
- * @author Remy Perona
59
- *
60
- * @var Iframe
61
- */
62
- private $iframe;
63
-
64
- /**
65
- * Constructor
66
- *
67
- * @since 2.0
68
- * @author Remy Perona
69
- *
70
- * @param OptionArray $option_array OptionArray instance.
71
- * @param Assets $assets Assets instance.
72
- * @param Image $image Image instance.
73
- * @param Iframe $iframe Iframe instance.
74
- */
75
- public function __construct(OptionArray $option_array, Assets $assets, Image $image, Iframe $iframe)
76
- {
77
- $this->option_array = $option_array;
78
- $this->assets = $assets;
79
- $this->image = $image;
80
- $this->iframe = $iframe;
81
- }
82
-
83
- /**
84
- * @inheritDoc
85
- */
86
- public function getSubscribedEvents()
87
- {
88
- return [
89
- 'wp_footer' => [
90
- [ 'insertLazyloadScript', ROCKET_LL_INT_MAX ],
91
- ['insertYoutubeThumbnailScript', ROCKET_LL_INT_MAX ],
92
- ],
93
- 'wp_head' => ['insertNoJSStyle', ROCKET_LL_INT_MAX ],
94
- 'wp_enqueue_scripts' => ['insertYoutubeThumbnailStyle', ROCKET_LL_INT_MAX],
95
- 'template_redirect' => ['lazyload', 2],
96
- 'rocket_lazyload_html' => 'lazyloadResponsive',
97
- 'init' => 'lazyloadSmilies',
98
- ];
99
- }
100
-
101
- /**
102
- * Inserts the lazyload script in the footer
103
- *
104
- * @since 2.0
105
- * @author Remy Perona
106
- *
107
- * @return void
108
- */
109
- public function insertLazyloadScript()
110
- {
111
- if (! $this->option_array->get('images') && ! $this->option_array->get('iframes')) {
112
- return;
113
- }
114
-
115
- if (! $this->shouldLazyload()) {
116
- return;
117
- }
118
-
119
- /**
120
- * Filters the threshold at which lazyload is triggered
121
- *
122
- * @since 1.2
123
- * @author Remy Perona
124
- *
125
- * @param int $threshold Threshold value.
126
- */
127
- $threshold = apply_filters('rocket_lazyload_threshold', 300);
128
-
129
- /**
130
- * Filters the use of the polyfill for intersectionObserver
131
- *
132
- * @since 3.3
133
- * @author Remy Perona
134
- *
135
- * @param bool $polyfill True to use the polyfill, false otherwise.
136
- */
137
- $polyfill = apply_filters('rocket_lazyload_polyfill', false);
138
-
139
- $script_args = [
140
- 'base_url' => ROCKET_LL_FRONT_JS_URL,
141
- 'version' => '12.0',
142
- 'polyfill' => $polyfill,
143
- ];
144
-
145
- $inline_args = [
146
- 'threshold' => $threshold,
147
- 'options' => [
148
- 'use_native' => 'true',
149
- ],
150
- ];
151
-
152
- if ($this->option_array->get('images') || $this->option_array->get('iframes')) {
153
- $inline_args['elements']['loading'] = '[loading=lazy]';
154
- }
155
-
156
- if ($this->option_array->get('images')) {
157
- $inline_args['elements']['background_image'] = '.rocket-lazyload';
158
- }
159
-
160
- /**
161
- * Filters the arguments array for the lazyload script options
162
- *
163
- * @since 2.0
164
- * @author Remy Perona
165
- *
166
- * @param array $inline_args Arguments used for the lazyload script options.
167
- */
168
- $inline_args = apply_filters('rocket_lazyload_script_args', $inline_args);
169
-
170
- echo '<script>' . $this->assets->getInlineLazyloadScript($inline_args) . '</script>';
171
- $this->assets->insertLazyloadScript($script_args);
172
- }
173
-
174
- /**
175
- * Inserts the Youtube thumbnail script in the footer
176
- *
177
- * @since 2.0
178
- * @author Remy Perona
179
- *
180
- * @return void
181
- */
182
- public function insertYoutubeThumbnailScript()
183
- {
184
- if (! $this->option_array->get('youtube')) {
185
- return;
186
- }
187
-
188
- if (! $this->shouldLazyload()) {
189
- return;
190
- }
191
-
192
- /**
193
- * Filters the resolution of the YouTube thumbnail
194
- *
195
- * @since 1.4.8
196
- * @author Arun Basil Lal
197
- *
198
- * @param string $thumbnail_resolution The resolution of the thumbnail. Accepted values: default, mqdefault, sddefault, hqdefault, maxresdefault
199
- */
200
- $thumbnail_resolution = apply_filters('rocket_lazyload_youtube_thumbnail_resolution', 'hqdefault');
201
-
202
- $this->assets->insertYoutubeThumbnailScript(
203
- [
204
- 'resolution' => $thumbnail_resolution,
205
- 'lazy_image' => (bool) $this->option_array->get('images'),
206
- ]
207
- );
208
- }
209
-
210
- /**
211
- * Inserts the no JS CSS compatibility in the header
212
- *
213
- * @since 2.0.3
214
- * @author Remy Perona
215
- *
216
- * @return void
217
- */
218
- public function insertNoJSStyle()
219
- {
220
- if (! $this->shouldLazyload()) {
221
- return;
222
- }
223
-
224
- $this->assets->insertNoJSCSS();
225
- }
226
-
227
- /**
228
- * Inserts the Youtube thumbnail CSS in the header
229
- *
230
- * @since 2.0
231
- * @author Remy Perona
232
- *
233
- * @return void
234
- */
235
- public function insertYoutubeThumbnailStyle()
236
- {
237
- if (! $this->option_array->get('youtube')) {
238
- return;
239
- }
240
-
241
- if (! $this->shouldLazyload()) {
242
- return;
243
- }
244
-
245
- $this->assets->insertYoutubeThumbnailCSS(
246
- [
247
- 'base_url' => ROCKET_LL_ASSETS_URL,
248
- 'responsive_embeds' => current_theme_supports('responsive-embeds'),
249
- ]
250
- );
251
- }
252
-
253
- /**
254
- * Checks if lazyload should be applied
255
- *
256
- * @since 2.0
257
- * @author Remy Perona
258
- *
259
- * @return bool
260
- */
261
- private function shouldLazyload()
262
- {
263
- if (is_admin() || is_feed() || is_preview() || ( defined('REST_REQUEST') && REST_REQUEST ) || ( defined('DONOTLAZYLOAD') && DONOTLAZYLOAD )) {
264
- return false;
265
- }
266
-
267
- if ($this->isPageBuilder()) {
268
- return false;
269
- }
270
-
271
- /**
272
- * Filters the lazyload application
273
- *
274
- * @since 2.0
275
- * @author Remy Perona
276
- *
277
- * @param bool $do_rocket_lazyload True to apply lazyload, false otherwise.
278
- */
279
- if (! apply_filters('do_rocket_lazyload', true)) { // WPCS: prefix ok.
280
- return false;
281
- }
282
-
283
- return true;
284
- }
285
-
286
- /**
287
- * Checks if current page is a page builder editor.
288
- *
289
- * @since 2.2.2
290
- * @author Remy Perona
291
- *
292
- * @return bool
293
- */
294
- private function isPageBuilder()
295
- {
296
- // Exclude Page Builders editors.
297
- $excluded_parameters = [
298
- 'fl_builder',
299
- 'et_fb',
300
- 'ct_builder',
301
- ];
302
-
303
- foreach ($excluded_parameters as $excluded) {
304
- if (isset($_GET[ $excluded ])) {
305
- return true;
306
- }
307
- }
308
-
309
- return false;
310
- }
311
-
312
- /**
313
- * Gets the content to lazyload
314
- *
315
- * @since 2.0
316
- * @author Remy Perona
317
- *
318
- * @return void
319
- */
320
- public function lazyload()
321
- {
322
- if (! $this->shouldLazyload()) {
323
- return;
324
- }
325
-
326
- ob_start([$this, 'lazyloadBuffer']);
327
- }
328
-
329
- /**
330
- * Applies lazyload on the provided content
331
- *
332
- * @since 2.0
333
- * @author Remy Perona
334
- *
335
- * @param string $html HTML content.
336
- * @return string
337
- */
338
- public function lazyloadBuffer($html)
339
- {
340
- $buffer = $this->ignoreScripts($html);
341
- $buffer = $this->ignoreNoscripts($buffer);
342
-
343
- if ($this->option_array->get('images')) {
344
- $html = $this->image->lazyloadImages($html, $buffer);
345
- $html = $this->image->lazyloadPictures($html, $buffer);
346
- $html = $this->image->lazyloadBackgroundImages($html, $buffer);
347
- }
348
-
349
- if ($this->option_array->get('iframes')) {
350
- $args = [
351
- 'youtube' => $this->option_array->get('youtube'),
352
- ];
353
-
354
- $html = $this->iframe->lazyloadIframes($html, $buffer, $args);
355
- }
356
-
357
- return $html;
358
- }
359
-
360
- /**
361
- * Applies lazyload on responsive images attributes srcset and sizes
362
- *
363
- * @since 2.0
364
- * @author Remy Perona
365
- *
366
- * @param string $html Image HTML.
367
- * @return string
368
- */
369
- public function lazyloadResponsive($html)
370
- {
371
- return $this->image->lazyloadResponsiveAttributes($html);
372
- }
373
-
374
- /**
375
- * Applies lazyload on WordPress smilies
376
- *
377
- * @since 2.0
378
- * @author Remy Perona
379
- *
380
- * @return void
381
- */
382
- public function lazyloadSmilies()
383
- {
384
- if (! $this->shouldLazyload()) {
385
- return;
386
- }
387
-
388
- if (! $this->option_array->get('images')) {
389
- return;
390
- }
391
-
392
- $filters = [
393
- 'the_content' => 10,
394
- 'the_excerpt' => 10,
395
- 'comment_text' => 20,
396
- ];
397
-
398
- foreach ($filters as $filter => $prio) {
399
- if (! has_filter($filter)) {
400
- continue;
401
- }
402
-
403
- remove_filter($filter, 'convert_smilies', $prio);
404
- add_filter($filter, [$this->image, 'convertSmilies'], $prio);
405
- }
406
- }
407
-
408
- /**
409
- * Remove inline scripts from the HTML to parse
410
- *
411
- * @param string $html HTML content.
412
- * @return string
413
- */
414
- private function ignoreScripts($html)
415
- {
416
- return preg_replace('/<script\b(?:[^>]*)>(?:.+)?<\/script>/Umsi', '', $html);
417
- }
418
-
419
- /**
420
- * Remove noscript tags from the HTML to parse
421
- *
422
- * @param string $html HTML content.
423
- * @return string
424
- */
425
- private function ignoreNoscripts($html)
426
- {
427
- return preg_replace('#<noscript>(?:.+)</noscript>#Umsi', '', $html);
428
- }
429
- }
1
+ <?php
2
+ /**
3
+ * Lazyload subscriber
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Subscriber;
9
+
10
+ use RocketLazyLoadPlugin\EventManagement\SubscriberInterface;
11
+ use RocketLazyLoadPlugin\Options\OptionArray;
12
+ use RocketLazyLoadPlugin\Dependencies\RocketLazyload\Assets;
13
+ use RocketLazyLoadPlugin\Dependencies\RocketLazyload\Image;
14
+ use RocketLazyLoadPlugin\Dependencies\RocketLazyload\Iframe;
15
+
16
+ /**
17
+ * Lazyload Subscriber
18
+ *
19
+ * @since 2.0
20
+ * @author Remy Perona
21
+ */
22
+ class LazyloadSubscriber implements SubscriberInterface
23
+ {
24
+ /**
25
+ * OptionArray instance
26
+ *
27
+ * @since 2.0
28
+ * @author Remy Perona
29
+ *
30
+ * @var OptionArray
31
+ */
32
+ private $option_array;
33
+
34
+ /**
35
+ * Assets instance
36
+ *
37
+ * @since 2.0
38
+ * @author Remy Perona
39
+ *
40
+ * @var Assets
41
+ */
42
+ private $assets;
43
+
44
+ /**
45
+ * Image instance
46
+ *
47
+ * @since 2.0
48
+ * @author Remy Perona
49
+ *
50
+ * @var Image
51
+ */
52
+ private $image;
53
+
54
+ /**
55
+ * Iframe instance
56
+ *
57
+ * @since 2.0
58
+ * @author Remy Perona
59
+ *
60
+ * @var Iframe
61
+ */
62
+ private $iframe;
63
+
64
+ /**
65
+ * Constructor
66
+ *
67
+ * @since 2.0
68
+ * @author Remy Perona
69
+ *
70
+ * @param OptionArray $option_array OptionArray instance.
71
+ * @param Assets $assets Assets instance.
72
+ * @param Image $image Image instance.
73
+ * @param Iframe $iframe Iframe instance.
74
+ */
75
+ public function __construct(OptionArray $option_array, Assets $assets, Image $image, Iframe $iframe)
76
+ {
77
+ $this->option_array = $option_array;
78
+ $this->assets = $assets;
79
+ $this->image = $image;
80
+ $this->iframe = $iframe;
81
+ }
82
+
83
+ /**
84
+ * @inheritDoc
85
+ */
86
+ public function getSubscribedEvents()
87
+ {
88
+ return [
89
+ 'wp_footer' => [
90
+ [ 'insertLazyloadScript', ROCKET_LL_INT_MAX ],
91
+ ['insertYoutubeThumbnailScript', ROCKET_LL_INT_MAX ],
92
+ ],
93
+ 'wp_head' => ['insertNoJSStyle', ROCKET_LL_INT_MAX ],
94
+ 'wp_enqueue_scripts' => ['insertYoutubeThumbnailStyle', ROCKET_LL_INT_MAX],
95
+ 'template_redirect' => ['lazyload', 2],
96
+ 'rocket_lazyload_html' => 'lazyloadResponsive',
97
+ 'init' => 'lazyloadSmilies',
98
+ ];
99
+ }
100
+
101
+ /**
102
+ * Inserts the lazyload script in the footer
103
+ *
104
+ * @since 2.0
105
+ * @author Remy Perona
106
+ *
107
+ * @return void
108
+ */
109
+ public function insertLazyloadScript()
110
+ {
111
+ if (! $this->option_array->get('images') && ! $this->option_array->get('iframes')) {
112
+ return;
113
+ }
114
+
115
+ if (! $this->shouldLazyload()) {
116
+ return;
117
+ }
118
+
119
+ /**
120
+ * Filters the threshold at which lazyload is triggered
121
+ *
122
+ * @since 1.2
123
+ * @author Remy Perona
124
+ *
125
+ * @param int $threshold Threshold value.
126
+ */
127
+ $threshold = apply_filters('rocket_lazyload_threshold', 300);
128
+
129
+ /**
130
+ * Filters the use of the polyfill for intersectionObserver
131
+ *
132
+ * @since 3.3
133
+ * @author Remy Perona
134
+ *
135
+ * @param bool $polyfill True to use the polyfill, false otherwise.
136
+ */
137
+ $polyfill = apply_filters('rocket_lazyload_polyfill', false);
138
+
139
+ $script_args = [
140
+ 'base_url' => ROCKET_LL_FRONT_JS_URL,
141
+ 'version' => '12.0',
142
+ 'polyfill' => $polyfill,
143
+ ];
144
+
145
+ $inline_args = [
146
+ 'threshold' => $threshold,
147
+ 'options' => [
148
+ 'use_native' => 'true',
149
+ ],
150
+ ];
151
+
152
+ if ($this->option_array->get('images') || $this->option_array->get('iframes')) {
153
+ $inline_args['elements']['loading'] = '[loading=lazy]';
154
+ }
155
+
156
+ if ($this->option_array->get('images')) {
157
+ $inline_args['elements']['background_image'] = '.rocket-lazyload';
158
+ }
159
+
160
+ /**
161
+ * Filters the arguments array for the lazyload script options
162
+ *
163
+ * @since 2.0
164
+ * @author Remy Perona
165
+ *
166
+ * @param array $inline_args Arguments used for the lazyload script options.
167
+ */
168
+ $inline_args = apply_filters('rocket_lazyload_script_args', $inline_args);
169
+
170
+ echo '<script>' . $this->assets->getInlineLazyloadScript($inline_args) . '</script>';
171
+ $this->assets->insertLazyloadScript($script_args);
172
+ }
173
+
174
+ /**
175
+ * Inserts the Youtube thumbnail script in the footer
176
+ *
177
+ * @since 2.0
178
+ * @author Remy Perona
179
+ *
180
+ * @return void
181
+ */
182
+ public function insertYoutubeThumbnailScript()
183
+ {
184
+ if (! $this->option_array->get('youtube')) {
185
+ return;
186
+ }
187
+
188
+ if (! $this->shouldLazyload()) {
189
+ return;
190
+ }
191
+
192
+ /**
193
+ * Filters the resolution of the YouTube thumbnail
194
+ *
195
+ * @since 1.4.8
196
+ * @author Arun Basil Lal
197
+ *
198
+ * @param string $thumbnail_resolution The resolution of the thumbnail. Accepted values: default, mqdefault, sddefault, hqdefault, maxresdefault
199
+ */
200
+ $thumbnail_resolution = apply_filters('rocket_lazyload_youtube_thumbnail_resolution', 'hqdefault');
201
+
202
+ $this->assets->insertYoutubeThumbnailScript(
203
+ [
204
+ 'resolution' => $thumbnail_resolution,
205
+ 'lazy_image' => (bool) $this->option_array->get('images'),
206
+ ]
207
+ );
208
+ }
209
+
210
+ /**
211
+ * Inserts the no JS CSS compatibility in the header
212
+ *
213
+ * @since 2.0.3
214
+ * @author Remy Perona
215
+ *
216
+ * @return void
217
+ */
218
+ public function insertNoJSStyle()
219
+ {
220
+ if (! $this->shouldLazyload()) {
221
+ return;
222
+ }
223
+
224
+ $this->assets->insertNoJSCSS();
225
+ }
226
+
227
+ /**
228
+ * Inserts the Youtube thumbnail CSS in the header
229
+ *
230
+ * @since 2.0
231
+ * @author Remy Perona
232
+ *
233
+ * @return void
234
+ */
235
+ public function insertYoutubeThumbnailStyle()
236
+ {
237
+ if (! $this->option_array->get('youtube')) {
238
+ return;
239
+ }
240
+
241
+ if (! $this->shouldLazyload()) {
242
+ return;
243
+ }
244
+
245
+ $this->assets->insertYoutubeThumbnailCSS(
246
+ [
247
+ 'base_url' => ROCKET_LL_ASSETS_URL,
248
+ 'responsive_embeds' => current_theme_supports('responsive-embeds'),
249
+ ]
250
+ );
251
+ }
252
+
253
+ /**
254
+ * Checks if lazyload should be applied
255
+ *
256
+ * @since 2.0
257
+ * @author Remy Perona
258
+ *
259
+ * @return bool
260
+ */
261
+ private function shouldLazyload()
262
+ {
263
+ if (is_admin() || is_feed() || is_preview() || ( defined('REST_REQUEST') && REST_REQUEST ) || ( defined('DONOTLAZYLOAD') && DONOTLAZYLOAD )) {
264
+ return false;
265
+ }
266
+
267
+ if ($this->isPageBuilder()) {
268
+ return false;
269
+ }
270
+
271
+ /**
272
+ * Filters the lazyload application
273
+ *
274
+ * @since 2.0
275
+ * @author Remy Perona
276
+ *
277
+ * @param bool $do_rocket_lazyload True to apply lazyload, false otherwise.
278
+ */
279
+ if (! apply_filters('do_rocket_lazyload', true)) { // WPCS: prefix ok.
280
+ return false;
281
+ }
282
+
283
+ return true;
284
+ }
285
+
286
+ /**
287
+ * Checks if current page is a page builder editor.
288
+ *
289
+ * @since 2.2.2
290
+ * @author Remy Perona
291
+ *
292
+ * @return bool
293
+ */
294
+ private function isPageBuilder()
295
+ {
296
+ // Exclude Page Builders editors.
297
+ $excluded_parameters = [
298
+ 'fl_builder',
299
+ 'et_fb',
300
+ 'ct_builder',
301
+ ];
302
+
303
+ foreach ($excluded_parameters as $excluded) {
304
+ if (isset($_GET[ $excluded ])) {
305
+ return true;
306
+ }
307
+ }
308
+
309
+ return false;
310
+ }
311
+
312
+ /**
313
+ * Gets the content to lazyload
314
+ *
315
+ * @since 2.0
316
+ * @author Remy Perona
317
+ *
318
+ * @return void
319
+ */
320
+ public function lazyload()
321
+ {
322
+ if (! $this->shouldLazyload()) {
323
+ return;
324
+ }
325
+
326
+ ob_start([$this, 'lazyloadBuffer']);
327
+ }
328
+
329
+ /**
330
+ * Applies lazyload on the provided content
331
+ *
332
+ * @since 2.0
333
+ * @author Remy Perona
334
+ *
335
+ * @param string $html HTML content.
336
+ * @return string
337
+ */
338
+ public function lazyloadBuffer($html)
339
+ {
340
+ $buffer = $this->ignoreScripts($html);
341
+ $buffer = $this->ignoreNoscripts($buffer);
342
+
343
+ if ($this->option_array->get('images')) {
344
+ $html = $this->image->lazyloadImages($html, $buffer);
345
+ $html = $this->image->lazyloadPictures($html, $buffer);
346
+ $html = $this->image->lazyloadBackgroundImages($html, $buffer);
347
+ }
348
+
349
+ if ($this->option_array->get('iframes')) {
350
+ $args = [
351
+ 'youtube' => $this->option_array->get('youtube'),
352
+ ];
353
+
354
+ $html = $this->iframe->lazyloadIframes($html, $buffer, $args);
355
+ }
356
+
357
+ return $html;
358
+ }
359
+
360
+ /**
361
+ * Applies lazyload on responsive images attributes srcset and sizes
362
+ *
363
+ * @since 2.0
364
+ * @author Remy Perona
365
+ *
366
+ * @param string $html Image HTML.
367
+ * @return string
368
+ */
369
+ public function lazyloadResponsive($html)
370
+ {
371
+ return $this->image->lazyloadResponsiveAttributes($html);
372
+ }
373
+
374
+ /**
375
+ * Applies lazyload on WordPress smilies
376
+ *
377
+ * @since 2.0
378
+ * @author Remy Perona
379
+ *
380
+ * @return void
381
+ */
382
+ public function lazyloadSmilies()
383
+ {
384
+ if (! $this->shouldLazyload()) {
385
+ return;
386
+ }
387
+
388
+ if (! $this->option_array->get('images')) {
389
+ return;
390
+ }
391
+
392
+ $filters = [
393
+ 'the_content' => 10,
394
+ 'the_excerpt' => 10,
395
+ 'comment_text' => 20,
396
+ ];
397
+
398
+ foreach ($filters as $filter => $prio) {
399
+ if (! has_filter($filter)) {
400
+ continue;
401
+ }
402
+
403
+ remove_filter($filter, 'convert_smilies', $prio);
404
+ add_filter($filter, [$this->image, 'convertSmilies'], $prio);
405
+ }
406
+ }
407
+
408
+ /**
409
+ * Remove inline scripts from the HTML to parse
410
+ *
411
+ * @param string $html HTML content.
412
+ * @return string
413
+ */
414
+ private function ignoreScripts($html)
415
+ {
416
+ return preg_replace('/<script\b(?:[^>]*)>(?:.+)?<\/script>/Umsi', '', $html);
417
+ }
418
+
419
+ /**
420
+ * Remove noscript tags from the HTML to parse
421
+ *
422
+ * @param string $html HTML content.
423
+ * @return string
424
+ */
425
+ private function ignoreNoscripts($html)
426
+ {
427
+ return preg_replace('#<noscript>(?:.+)</noscript>#Umsi', '', $html);
428
+ }
429
+ }
src/Subscriber/ThirdParty/AMPSubscriber.php CHANGED
@@ -1,73 +1,73 @@
1
- <?php
2
- /**
3
- * AMP plugin compatibility subscrber
4
- *
5
- * @package RocketLazyload
6
- */
7
-
8
- namespace RocketLazyLoadPlugin\Subscriber\ThirdParty;
9
-
10
- use RocketLazyLoadPlugin\EventManagement\EventManager;
11
- use RocketLazyLoadPlugin\EventManagement\EventManagerAwareSubscriberInterface;
12
-
13
- defined('ABSPATH') || die('Cheatin\' uh?');
14
-
15
- /**
16
- * Manages compatibility with the AMP plugin
17
- *
18
- * @since 2.0
19
- * @author Remy Perona
20
- */
21
- class AMPSubscriber implements EventManagerAwareSubscriberInterface
22
- {
23
- /**
24
- * @inheritDoc
25
- */
26
- public function getSubscribedEvents()
27
- {
28
- return [
29
- 'wp' => 'disableIfAMP',
30
- ];
31
- }
32
-
33
- /**
34
- * {@inheritdoc}
35
- */
36
- public function setEventManager(EventManager $event_manager)
37
- {
38
- $this->event_manager = $event_manager;
39
- }
40
-
41
- /**
42
- * Disable if on AMP page
43
- *
44
- * @since 2.0.2
45
- * @author Remy Perona
46
- *
47
- * @return void
48
- */
49
- public function disableIfAMP()
50
- {
51
- if ($this->isAmpEndpoint()) {
52
- $this->event_manager->addCallback('do_rocket_lazyload', '__return_false');
53
- $this->event_manager->addCallback('do_rocket_lazyload_iframes', '__return_false');
54
- }
55
- }
56
-
57
- /**
58
- * Checks if current page uses AMP
59
- *
60
- * @since 2.0
61
- * @author Remy Perona
62
- *
63
- * @return boolean
64
- */
65
- private function isAmpEndpoint()
66
- {
67
- if (function_exists('is_amp_endpoint') && \is_amp_endpoint()) {
68
- return true;
69
- }
70
-
71
- return false;
72
- }
73
- }
1
+ <?php
2
+ /**
3
+ * AMP plugin compatibility subscrber
4
+ *
5
+ * @package RocketLazyload
6
+ */
7
+
8
+ namespace RocketLazyLoadPlugin\Subscriber\ThirdParty;
9
+
10
+ use RocketLazyLoadPlugin\EventManagement\EventManager;
11
+ use RocketLazyLoadPlugin\EventManagement\EventManagerAwareSubscriberInterface;
12
+
13
+ defined('ABSPATH') || die('Cheatin\' uh?');
14
+
15
+ /**
16
+ * Manages compatibility with the AMP plugin
17
+ *
18
+ * @since 2.0
19
+ * @author Remy Perona
20
+ */
21
+ class AMPSubscriber implements EventManagerAwareSubscriberInterface
22
+ {
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ public function getSubscribedEvents()
27
+ {
28
+ return [
29
+ 'wp' => 'disableIfAMP',
30
+ ];
31
+ }
32
+
33
+ /**
34
+ * {@inheritdoc}
35
+ */
36
+ public function setEventManager(EventManager $event_manager)
37
+ {
38
+ $this->event_manager = $event_manager;
39
+ }
40
+
41
+ /**
42
+ * Disable if on AMP page
43
+ *
44
+ * @since 2.0.2
45
+ * @author Remy Perona
46
+ *
47
+ * @return void
48
+ */
49
+ public function disableIfAMP()
50
+ {
51
+ if ($this->isAmpEndpoint()) {
52
+ $this->event_manager->addCallback('do_rocket_lazyload', '__return_false');
53
+ $this->event_manager->addCallback('do_rocket_lazyload_iframes', '__return_false');
54
+ }
55
+ }
56
+
57
+ /**
58
+ * Checks if current page uses AMP
59
+ *
60
+ * @since 2.0
61
+ * @author Remy Perona
62
+ *
63
+ * @return boolean
64
+ */
65
+ private function isAmpEndpoint()
66
+ {
67
+ if (function_exists('is_amp_endpoint') && \is_amp_endpoint()) {
68
+ return true;
69
+ }
70
+
71
+ return false;
72
+ }
73
+ }
src/rocket-lazyload-requirements-check.php CHANGED
@@ -1,143 +1,143 @@
1
- <?php
2
- /**
3
- * Check if current requirements are met
4
- *
5
- * @package RocketLazyloadPlugin
6
- */
7
-
8
- defined('ABSPATH') || die('Cheatin&#8217; uh?');
9
-
10
- /**
11
- * Class to check if the current WordPress and PHP versions meet our requirements
12
- *
13
- * @since 2.0
14
- * @author Remy Perona
15
- */
16
- class Rocket_Lazyload_Requirements_Check
17
- {
18
- /**
19
- * Plugin Name
20
- *
21
- * @var string
22
- */
23
- private $plugin_name;
24
-
25
- /**
26
- * Plugin version
27
- *
28
- * @var string
29
- */
30
- private $plugin_version;
31
-
32
- /**
33
- * Required WordPress version
34
- *
35
- * @var string
36
- */
37
- private $wp_version;
38
-
39
- /**
40
- * Required PHP version
41
- *
42
- * @var string
43
- */
44
- private $php_version;
45
-
46
- /**
47
- * Constructor
48
- *
49
- * @since 3.0
50
- * @author Remy Perona
51
- *
52
- * @param array $args {
53
- * Arguments to populate the class properties.
54
- *
55
- * @type string $plugin_name Plugin name.
56
- * @type string $wp_version Required WordPress version.
57
- * @type string $php_version Required PHP version.
58
- * }
59
- */
60
- public function __construct($args)
61
- {
62
- foreach (array('plugin_name', 'plugin_version', 'wp_version', 'php_version') as $setting) {
63
- if (isset($args[ $setting ])) {
64
- $this->$setting = $args[ $setting ];
65
- }
66
- }
67
- }
68
-
69
- /**
70
- * Checks if all requirements are ok, if not, display a notice and the rollback
71
- *
72
- * @since 3.0
73
- * @author Remy Perona
74
- *
75
- * @return bool
76
- */
77
- public function check()
78
- {
79
- if (! $this->phpPasses() || ! $this->wpPasses()) {
80
- add_action('admin_notices', array($this, 'notice'));
81
-
82
- return false;
83
- }
84
-
85
- return true;
86
- }
87
-
88
- /**
89
- * Checks if the current PHP version is equal or superior to the required PHP version
90
- *
91
- * @since 3.0
92
- * @author Remy Perona
93
- *
94
- * @return bool
95
- */
96
- private function phpPasses()
97
- {
98
- return version_compare(PHP_VERSION, $this->php_version) >= 0;
99
- }
100
-
101
- /**
102
- * Checks if the current WordPress version is equal or superior to the required PHP version
103
- *
104
- * @since 3.0
105
- * @author Remy Perona
106
- *
107
- * @return bool
108
- */
109
- private function wpPasses()
110
- {
111
- global $wp_version;
112
-
113
- return version_compare($wp_version, $this->wp_version) >= 0;
114
- }
115
-
116
- /**
117
- * Displays a notice if requirements are not met.
118
- *
119
- * @since 2.0
120
- * @author Remy Perona
121
- */
122
- public function notice()
123
- {
124
- if (! current_user_can('manage_options')) {
125
- return;
126
- }
127
-
128
- // Translators: %1$s = Plugin name, %2$s = Plugin version.
129
- $message = '<p>' . sprintf(__('To function properly, %1$s %2$s requires at least:', 'rocket-lazy-load'), $this->plugin_name, $this->plugin_version) . '</p><ul>';
130
-
131
- if (! $this->phpPasses()) {
132
- // Translators: %1$s = PHP version required.
133
- $message .= '<li>' . sprintf(__('PHP %1$s. To use this %2$s version, please ask your web host how to upgrade your server to PHP %1$s or higher.', 'rocket-lazy-load'), $this->php_version, $this->plugin_name) . '</li>';
134
- }
135
-
136
- if (! $this->wpPasses()) {
137
- // Translators: %1$s = WordPress version required.
138
- $message .= '<li>' . sprintf(__('WordPress %1$s. To use this %2$s version, please upgrade WordPress to version %1$s or higher.', 'rocket-lazy-load'), $this->wp_version, $this->plugin_name) . '</li>';
139
- }
140
-
141
- echo '<div class="notice notice-error">' . $message . '</div>';
142
- }
143
- }
1
+ <?php
2
+ /**
3
+ * Check if current requirements are met
4
+ *
5
+ * @package RocketLazyloadPlugin
6
+ */
7
+
8
+ defined('ABSPATH') || die('Cheatin&#8217; uh?');
9
+
10
+ /**
11
+ * Class to check if the current WordPress and PHP versions meet our requirements
12
+ *
13
+ * @since 2.0
14
+ * @author Remy Perona
15
+ */
16
+ class Rocket_Lazyload_Requirements_Check
17
+ {
18
+ /**
19
+ * Plugin Name
20
+ *
21
+ * @var string
22
+ */
23
+ private $plugin_name;
24
+
25
+ /**
26
+ * Plugin version
27
+ *
28
+ * @var string
29
+ */
30
+ private $plugin_version;
31
+
32
+ /**
33
+ * Required WordPress version
34
+ *
35
+ * @var string
36
+ */
37
+ private $wp_version;
38
+
39
+ /**
40
+ * Required PHP version
41
+ *
42
+ * @var string
43
+ */
44
+ private $php_version;
45
+
46
+ /**
47
+ * Constructor
48
+ *
49
+ * @since 3.0
50
+ * @author Remy Perona
51
+ *
52
+ * @param array $args {
53
+ * Arguments to populate the class properties.
54
+ *
55
+ * @type string $plugin_name Plugin name.
56
+ * @type string $wp_version Required WordPress version.
57
+ * @type string $php_version Required PHP version.
58
+ * }
59
+ */
60
+ public function __construct($args)
61
+ {
62
+ foreach (array('plugin_name', 'plugin_version', 'wp_version', 'php_version') as $setting) {
63
+ if (isset($args[ $setting ])) {
64
+ $this->$setting = $args[ $setting ];
65
+ }
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Checks if all requirements are ok, if not, display a notice and the rollback
71
+ *
72
+ * @since 3.0
73
+ * @author Remy Perona
74
+ *
75
+ * @return bool
76
+ */
77
+ public function check()
78
+ {
79
+ if (! $this->phpPasses() || ! $this->wpPasses()) {
80
+ add_action('admin_notices', array($this, 'notice'));
81
+
82
+ return false;
83
+ }
84
+
85
+ return true;
86
+ }
87
+
88
+ /**
89
+ * Checks if the current PHP version is equal or superior to the required PHP version
90
+ *
91
+ * @since 3.0
92
+ * @author Remy Perona
93
+ *
94
+ * @return bool
95
+ */
96
+ private function phpPasses()
97
+ {
98
+ return version_compare(PHP_VERSION, $this->php_version) >= 0;
99
+ }
100
+
101
+ /**
102
+ * Checks if the current WordPress version is equal or superior to the required PHP version
103
+ *
104
+ * @since 3.0
105
+ * @author Remy Perona
106
+ *
107
+ * @return bool
108
+ */
109
+ private function wpPasses()
110
+ {
111
+ global $wp_version;
112
+
113
+ return version_compare($wp_version, $this->wp_version) >= 0;
114
+ }
115
+
116
+ /**
117
+ * Displays a notice if requirements are not met.
118
+ *
119
+ * @since 2.0
120
+ * @author Remy Perona
121
+ */
122
+ public function notice()
123
+ {
124
+ if (! current_user_can('manage_options')) {
125
+ return;
126
+ }
127
+
128
+ // Translators: %1$s = Plugin name, %2$s = Plugin version.
129
+ $message = '<p>' . sprintf(__('To function properly, %1$s %2$s requires at least:', 'rocket-lazy-load'), $this->plugin_name, $this->plugin_version) . '</p><ul>';
130
+
131
+ if (! $this->phpPasses()) {
132
+ // Translators: %1$s = PHP version required.
133
+ $message .= '<li>' . sprintf(__('PHP %1$s. To use this %2$s version, please ask your web host how to upgrade your server to PHP %1$s or higher.', 'rocket-lazy-load'), $this->php_version, $this->plugin_name) . '</li>';
134
+ }
135
+
136
+ if (! $this->wpPasses()) {
137
+ // Translators: %1$s = WordPress version required.
138
+ $message .= '<li>' . sprintf(__('WordPress %1$s. To use this %2$s version, please upgrade WordPress to version %1$s or higher.', 'rocket-lazy-load'), $this->wp_version, $this->plugin_name) . '</li>';
139
+ }
140
+
141
+ echo '<div class="notice notice-error">' . $message . '</div>';
142
+ }
143
+ }
vendor/composer/ClassLoader.php CHANGED
@@ -279,7 +279,7 @@ class ClassLoader
279
  */
280
  public function setApcuPrefix($apcuPrefix)
281
  {
282
- $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
283
  }
284
 
285
  /**
@@ -377,11 +377,11 @@ class ClassLoader
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
- $search = $subPath.'\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
 
382
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
383
- $length = $this->prefixLengthsPsr4[$first][$search];
384
- if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
385
  return $file;
386
  }
387
  }
279
  */
280
  public function setApcuPrefix($apcuPrefix)
281
  {
282
+ $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283
  }
284
 
285
  /**
377
  $subPath = $class;
378
  while (false !== $lastPos = strrpos($subPath, '\\')) {
379
  $subPath = substr($subPath, 0, $lastPos);
380
+ $search = $subPath . '\\';
381
  if (isset($this->prefixDirsPsr4[$search])) {
382
+ $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383
  foreach ($this->prefixDirsPsr4[$search] as $dir) {
384
+ if (file_exists($file = $dir . $pathEnd)) {
 
385
  return $file;
386
  }
387
  }
vendor/composer/installed.json CHANGED
@@ -1,33 +1,42 @@
1
  [
2
  {
3
- "name": "psr/container",
4
- "version": "1.0.0",
5
- "version_normalized": "1.0.0.0",
6
  "source": {
7
  "type": "git",
8
- "url": "https://github.com/php-fig/container.git",
9
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
14
- "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
15
  "shasum": ""
16
  },
17
  "require": {
18
- "php": ">=5.3.0"
19
  },
20
- "time": "2017-02-14T16:28:37+00:00",
21
- "type": "library",
 
 
 
 
 
 
 
 
22
  "extra": {
 
23
  "branch-alias": {
24
- "dev-master": "1.0.x-dev"
25
  }
26
  },
27
  "installation-source": "dist",
28
  "autoload": {
29
  "psr-4": {
30
- "Psr\\Container\\": "src/"
31
  }
32
  },
33
  "notification-url": "https://packagist.org/downloads/",
@@ -36,18 +45,82 @@
36
  ],
37
  "authors": [
38
  {
39
- "name": "PHP-FIG",
40
- "homepage": "http://www.php-fig.org/"
 
41
  }
42
  ],
43
- "description": "Common Container Interface (PHP FIG PSR-11)",
44
- "homepage": "https://github.com/php-fig/container",
45
  "keywords": [
46
- "PSR-11",
47
- "container",
48
- "container-interface",
49
- "container-interop",
50
- "psr"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  ]
52
  },
53
  {
@@ -151,43 +224,34 @@
151
  ]
152
  },
153
  {
154
- "name": "composer/installers",
155
- "version": "v1.7.0",
156
- "version_normalized": "1.7.0.0",
157
  "source": {
158
  "type": "git",
159
- "url": "https://github.com/composer/installers.git",
160
- "reference": "141b272484481432cda342727a427dc1e206bfa0"
161
  },
162
  "dist": {
163
  "type": "zip",
164
- "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
165
- "reference": "141b272484481432cda342727a427dc1e206bfa0",
166
  "shasum": ""
167
  },
168
  "require": {
169
- "composer-plugin-api": "^1.0"
170
- },
171
- "replace": {
172
- "roundcube/plugin-installer": "*",
173
- "shama/baton": "*"
174
- },
175
- "require-dev": {
176
- "composer/composer": "1.0.*@dev",
177
- "phpunit/phpunit": "^4.8.36"
178
  },
179
- "time": "2019-08-12T15:00:31+00:00",
180
- "type": "composer-plugin",
181
  "extra": {
182
- "class": "Composer\\Installers\\Plugin",
183
  "branch-alias": {
184
- "dev-master": "1.0-dev"
185
  }
186
  },
187
  "installation-source": "dist",
188
  "autoload": {
189
  "psr-4": {
190
- "Composer\\Installers\\": "src/Composer/Installers"
191
  }
192
  },
193
  "notification-url": "https://packagist.org/downloads/",
@@ -196,97 +260,33 @@
196
  ],
197
  "authors": [
198
  {
199
- "name": "Kyle Robinson Young",
200
- "email": "kyle@dontkry.com",
201
- "homepage": "https://github.com/shama"
202
  }
203
  ],
204
- "description": "A multi-framework Composer library installer",
205
- "homepage": "https://composer.github.io/installers/",
206
  "keywords": [
207
- "Craft",
208
- "Dolibarr",
209
- "Eliasis",
210
- "Hurad",
211
- "ImageCMS",
212
- "Kanboard",
213
- "Lan Management System",
214
- "MODX Evo",
215
- "Mautic",
216
- "Maya",
217
- "OXID",
218
- "Plentymarkets",
219
- "Porto",
220
- "RadPHP",
221
- "SMF",
222
- "Thelia",
223
- "Whmcs",
224
- "WolfCMS",
225
- "agl",
226
- "aimeos",
227
- "annotatecms",
228
- "attogram",
229
- "bitrix",
230
- "cakephp",
231
- "chef",
232
- "cockpit",
233
- "codeigniter",
234
- "concrete5",
235
- "croogo",
236
- "dokuwiki",
237
- "drupal",
238
- "eZ Platform",
239
- "elgg",
240
- "expressionengine",
241
- "fuelphp",
242
- "grav",
243
- "installer",
244
- "itop",
245
- "joomla",
246
- "known",
247
- "kohana",
248
- "laravel",
249
- "lavalite",
250
- "lithium",
251
- "magento",
252
- "majima",
253
- "mako",
254
- "mediawiki",
255
- "modulework",
256
- "modx",
257
- "moodle",
258
- "osclass",
259
- "phpbb",
260
- "piwik",
261
- "ppi",
262
- "puppet",
263
- "pxcms",
264
- "reindex",
265
- "roundcube",
266
- "shopware",
267
- "silverstripe",
268
- "sydes",
269
- "symfony",
270
- "typo3",
271
- "wordpress",
272
- "yawik",
273
- "zend",
274
- "zikula"
275
  ]
276
  },
277
  {
278
  "name": "wp-media/rocket-lazyload-common",
279
- "version": "v2.5",
280
- "version_normalized": "2.5.0.0",
281
  "source": {
282
  "type": "git",
283
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
284
- "reference": "54e4e8b08293d113bf871e476d9cf899e9961391"
285
  },
286
  "dist": {
287
  "type": "zip",
288
- "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/54e4e8b08293d113bf871e476d9cf899e9961391",
289
- "reference": "54e4e8b08293d113bf871e476d9cf899e9961391",
290
  "shasum": ""
291
  },
292
  "require": {
@@ -304,7 +304,7 @@
304
  "symfony/yaml": "2.8.*",
305
  "wp-coding-standards/wpcs": "^2.0.0"
306
  },
307
- "time": "2019-09-05T02:40:02+00:00",
308
  "type": "library",
309
  "installation-source": "dist",
310
  "autoload": {
1
  [
2
  {
3
+ "name": "composer/installers",
4
+ "version": "v1.7.0",
5
+ "version_normalized": "1.7.0.0",
6
  "source": {
7
  "type": "git",
8
+ "url": "https://github.com/composer/installers.git",
9
+ "reference": "141b272484481432cda342727a427dc1e206bfa0"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/composer/installers/zipball/141b272484481432cda342727a427dc1e206bfa0",
14
+ "reference": "141b272484481432cda342727a427dc1e206bfa0",
15
  "shasum": ""
16
  },
17
  "require": {
18
+ "composer-plugin-api": "^1.0"
19
  },
20
+ "replace": {
21
+ "roundcube/plugin-installer": "*",
22
+ "shama/baton": "*"
23
+ },
24
+ "require-dev": {
25
+ "composer/composer": "1.0.*@dev",
26
+ "phpunit/phpunit": "^4.8.36"
27
+ },
28
+ "time": "2019-08-12T15:00:31+00:00",
29
+ "type": "composer-plugin",
30
  "extra": {
31
+ "class": "Composer\\Installers\\Plugin",
32
  "branch-alias": {
33
+ "dev-master": "1.0-dev"
34
  }
35
  },
36
  "installation-source": "dist",
37
  "autoload": {
38
  "psr-4": {
39
+ "Composer\\Installers\\": "src/Composer/Installers"
40
  }
41
  },
42
  "notification-url": "https://packagist.org/downloads/",
45
  ],
46
  "authors": [
47
  {
48
+ "name": "Kyle Robinson Young",
49
+ "email": "kyle@dontkry.com",
50
+ "homepage": "https://github.com/shama"
51
  }
52
  ],
53
+ "description": "A multi-framework Composer library installer",
54
+ "homepage": "https://composer.github.io/installers/",
55
  "keywords": [
56
+ "Craft",
57
+ "Dolibarr",
58
+ "Eliasis",
59
+ "Hurad",
60
+ "ImageCMS",
61
+ "Kanboard",
62
+ "Lan Management System",
63
+ "MODX Evo",
64
+ "Mautic",
65
+ "Maya",
66
+ "OXID",
67
+ "Plentymarkets",
68
+ "Porto",
69
+ "RadPHP",
70
+ "SMF",
71
+ "Thelia",
72
+ "Whmcs",
73
+ "WolfCMS",
74
+ "agl",
75
+ "aimeos",
76
+ "annotatecms",
77
+ "attogram",
78
+ "bitrix",
79
+ "cakephp",
80
+ "chef",
81
+ "cockpit",
82
+ "codeigniter",
83
+ "concrete5",
84
+ "croogo",
85
+ "dokuwiki",
86
+ "drupal",
87
+ "eZ Platform",
88
+ "elgg",
89
+ "expressionengine",
90
+ "fuelphp",
91
+ "grav",
92
+ "installer",
93
+ "itop",
94
+ "joomla",
95
+ "known",
96
+ "kohana",
97
+ "laravel",
98
+ "lavalite",
99
+ "lithium",
100
+ "magento",
101
+ "majima",
102
+ "mako",
103
+ "mediawiki",
104
+ "modulework",
105
+ "modx",
106
+ "moodle",
107
+ "osclass",
108
+ "phpbb",
109
+ "piwik",
110
+ "ppi",
111
+ "puppet",
112
+ "pxcms",
113
+ "reindex",
114
+ "roundcube",
115
+ "shopware",
116
+ "silverstripe",
117
+ "sydes",
118
+ "symfony",
119
+ "typo3",
120
+ "wordpress",
121
+ "yawik",
122
+ "zend",
123
+ "zikula"
124
  ]
125
  },
126
  {
224
  ]
225
  },
226
  {
227
+ "name": "psr/container",
228
+ "version": "1.0.0",
229
+ "version_normalized": "1.0.0.0",
230
  "source": {
231
  "type": "git",
232
+ "url": "https://github.com/php-fig/container.git",
233
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
234
  },
235
  "dist": {
236
  "type": "zip",
237
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
238
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
239
  "shasum": ""
240
  },
241
  "require": {
242
+ "php": ">=5.3.0"
 
 
 
 
 
 
 
 
243
  },
244
+ "time": "2017-02-14T16:28:37+00:00",
245
+ "type": "library",
246
  "extra": {
 
247
  "branch-alias": {
248
+ "dev-master": "1.0.x-dev"
249
  }
250
  },
251
  "installation-source": "dist",
252
  "autoload": {
253
  "psr-4": {
254
+ "Psr\\Container\\": "src/"
255
  }
256
  },
257
  "notification-url": "https://packagist.org/downloads/",
260
  ],
261
  "authors": [
262
  {
263
+ "name": "PHP-FIG",
264
+ "homepage": "http://www.php-fig.org/"
 
265
  }
266
  ],
267
+ "description": "Common Container Interface (PHP FIG PSR-11)",
268
+ "homepage": "https://github.com/php-fig/container",
269
  "keywords": [
270
+ "PSR-11",
271
+ "container",
272
+ "container-interface",
273
+ "container-interop",
274
+ "psr"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  ]
276
  },
277
  {
278
  "name": "wp-media/rocket-lazyload-common",
279
+ "version": "v2.5.1",
280
+ "version_normalized": "2.5.1.0",
281
  "source": {
282
  "type": "git",
283
  "url": "https://github.com/wp-media/rocket-lazyload-common.git",
284
+ "reference": "a5f1b59f822fd31bc7cb0fc368edecba96ceb71e"
285
  },
286
  "dist": {
287
  "type": "zip",
288
+ "url": "https://api.github.com/repos/wp-media/rocket-lazyload-common/zipball/a5f1b59f822fd31bc7cb0fc368edecba96ceb71e",
289
+ "reference": "a5f1b59f822fd31bc7cb0fc368edecba96ceb71e",
290
  "shasum": ""
291
  },
292
  "require": {
304
  "symfony/yaml": "2.8.*",
305
  "wp-coding-standards/wpcs": "^2.0.0"
306
  },
307
+ "time": "2019-09-06T13:51:56+00:00",
308
  "type": "library",
309
  "installation-source": "dist",
310
  "autoload": {
vendor/wp-media/rocket-lazyload-common/src/Assets.php CHANGED
@@ -236,10 +236,10 @@ class Assets
236
  $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'] . '">';
237
 
238
  if (isset($args['lazy_image']) && $args['lazy_image']) {
239
- $image = '<img 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>';
240
  }
241
 
242
- 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=\"https://www.youtube.com/embed/ID?autoplay=1\";t+=0===this.dataset.query.length?'':'&'+this.dataset.query;e.setAttribute(\"src\",t.replace(\"ID\",this.dataset.id)),e.setAttribute(\"frameborder\",\"0\"),e.setAttribute(\"allowfullscreen\",\"1\"),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.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script>";
243
  }
244
 
245
  /**
236
  $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'] . '">';
237
 
238
  if (isset($args['lazy_image']) && $args['lazy_image']) {
239
+ $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>';
240
  }
241
 
242
+ 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=\"https://www.youtube.com/embed/ID?autoplay=1\";t+=0===this.dataset.query.length?'':'&'+this.dataset.query;e.setAttribute(\"src\",t.replace(\"ID\",this.dataset.id)),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.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script>";
243
  }
244
 
245
  /**