| 1 |
<?php |
| 2 |
|
| 3 |
// Functions and constants |
| 4 |
|
| 5 |
namespace { |
| 6 |
|
| 7 |
} |
| 8 |
|
| 9 |
|
| 10 |
namespace Imagify\Dependencies { |
| 11 |
|
| 12 |
use BrianHenryIE\Strauss\Types\AutoloadAliasInterface; |
| 13 |
|
| 14 |
/** |
| 15 |
* @see AutoloadAliasInterface |
| 16 |
* |
| 17 |
* @phpstan-type ClassAliasArray array{'type':'class',isabstract:bool,classname:string,namespace?:string,extends:string,implements:array<string>} |
| 18 |
* @phpstan-type InterfaceAliasArray array{'type':'interface',interfacename:string,namespace?:string,extends:array<string>} |
| 19 |
* @phpstan-type TraitAliasArray array{'type':'trait',traitname:string,namespace?:string,use:array<string>} |
| 20 |
* @phpstan-type EnumAliasArray array{'type':'enum',enumname:string,namespace?:string,concrete:string} |
| 21 |
* @phpstan-type AutoloadAliasArray array<string,ClassAliasArray|InterfaceAliasArray|TraitAliasArray|EnumAliasArray> |
| 22 |
*/ |
| 23 |
class AliasAutoloader |
| 24 |
{ |
| 25 |
private string $includeFilePath; |
| 26 |
|
| 27 |
/** |
| 28 |
* @var AutoloadAliasArray |
| 29 |
*/ |
| 30 |
private array $autoloadAliases = array ( |
| 31 |
'WP_Async_Request' => |
| 32 |
array ( |
| 33 |
'type' => 'class', |
| 34 |
'classname' => 'WP_Async_Request', |
| 35 |
'isabstract' => true, |
| 36 |
'namespace' => '\\', |
| 37 |
'extends' => 'Imagify_WP_Async_Request', |
| 38 |
'implements' => |
| 39 |
array ( |
| 40 |
), |
| 41 |
), |
| 42 |
'WP_Background_Process' => |
| 43 |
array ( |
| 44 |
'type' => 'class', |
| 45 |
'classname' => 'WP_Background_Process', |
| 46 |
'isabstract' => true, |
| 47 |
'namespace' => '\\', |
| 48 |
'extends' => 'Imagify_WP_Background_Process', |
| 49 |
'implements' => |
| 50 |
array ( |
| 51 |
), |
| 52 |
), |
| 53 |
'League\\Container\\Argument\\DefaultValueArgument' => |
| 54 |
array ( |
| 55 |
'type' => 'class', |
| 56 |
'classname' => 'DefaultValueArgument', |
| 57 |
'isabstract' => false, |
| 58 |
'namespace' => 'League\\Container\\Argument', |
| 59 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\DefaultValueArgument', |
| 60 |
'implements' => |
| 61 |
array ( |
| 62 |
0 => 'League\\Container\\Argument\\DefaultValueInterface', |
| 63 |
), |
| 64 |
), |
| 65 |
'League\\Container\\Argument\\Literal\\ArrayArgument' => |
| 66 |
array ( |
| 67 |
'type' => 'class', |
| 68 |
'classname' => 'ArrayArgument', |
| 69 |
'isabstract' => false, |
| 70 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 71 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\ArrayArgument', |
| 72 |
'implements' => |
| 73 |
array ( |
| 74 |
), |
| 75 |
), |
| 76 |
'League\\Container\\Argument\\Literal\\BooleanArgument' => |
| 77 |
array ( |
| 78 |
'type' => 'class', |
| 79 |
'classname' => 'BooleanArgument', |
| 80 |
'isabstract' => false, |
| 81 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 82 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\BooleanArgument', |
| 83 |
'implements' => |
| 84 |
array ( |
| 85 |
), |
| 86 |
), |
| 87 |
'League\\Container\\Argument\\Literal\\CallableArgument' => |
| 88 |
array ( |
| 89 |
'type' => 'class', |
| 90 |
'classname' => 'CallableArgument', |
| 91 |
'isabstract' => false, |
| 92 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 93 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\CallableArgument', |
| 94 |
'implements' => |
| 95 |
array ( |
| 96 |
), |
| 97 |
), |
| 98 |
'League\\Container\\Argument\\Literal\\FloatArgument' => |
| 99 |
array ( |
| 100 |
'type' => 'class', |
| 101 |
'classname' => 'FloatArgument', |
| 102 |
'isabstract' => false, |
| 103 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 104 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\FloatArgument', |
| 105 |
'implements' => |
| 106 |
array ( |
| 107 |
), |
| 108 |
), |
| 109 |
'League\\Container\\Argument\\Literal\\IntegerArgument' => |
| 110 |
array ( |
| 111 |
'type' => 'class', |
| 112 |
'classname' => 'IntegerArgument', |
| 113 |
'isabstract' => false, |
| 114 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 115 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\IntegerArgument', |
| 116 |
'implements' => |
| 117 |
array ( |
| 118 |
), |
| 119 |
), |
| 120 |
'League\\Container\\Argument\\Literal\\ObjectArgument' => |
| 121 |
array ( |
| 122 |
'type' => 'class', |
| 123 |
'classname' => 'ObjectArgument', |
| 124 |
'isabstract' => false, |
| 125 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 126 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\ObjectArgument', |
| 127 |
'implements' => |
| 128 |
array ( |
| 129 |
), |
| 130 |
), |
| 131 |
'League\\Container\\Argument\\Literal\\StringArgument' => |
| 132 |
array ( |
| 133 |
'type' => 'class', |
| 134 |
'classname' => 'StringArgument', |
| 135 |
'isabstract' => false, |
| 136 |
'namespace' => 'League\\Container\\Argument\\Literal', |
| 137 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\Literal\\StringArgument', |
| 138 |
'implements' => |
| 139 |
array ( |
| 140 |
), |
| 141 |
), |
| 142 |
'League\\Container\\Argument\\LiteralArgument' => |
| 143 |
array ( |
| 144 |
'type' => 'class', |
| 145 |
'classname' => 'LiteralArgument', |
| 146 |
'isabstract' => false, |
| 147 |
'namespace' => 'League\\Container\\Argument', |
| 148 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\LiteralArgument', |
| 149 |
'implements' => |
| 150 |
array ( |
| 151 |
0 => 'League\\Container\\Argument\\LiteralArgumentInterface', |
| 152 |
), |
| 153 |
), |
| 154 |
'League\\Container\\Argument\\ResolvableArgument' => |
| 155 |
array ( |
| 156 |
'type' => 'class', |
| 157 |
'classname' => 'ResolvableArgument', |
| 158 |
'isabstract' => false, |
| 159 |
'namespace' => 'League\\Container\\Argument', |
| 160 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Argument\\ResolvableArgument', |
| 161 |
'implements' => |
| 162 |
array ( |
| 163 |
0 => 'League\\Container\\Argument\\ResolvableArgumentInterface', |
| 164 |
), |
| 165 |
), |
| 166 |
'League\\Container\\Container' => |
| 167 |
array ( |
| 168 |
'type' => 'class', |
| 169 |
'classname' => 'Container', |
| 170 |
'isabstract' => false, |
| 171 |
'namespace' => 'League\\Container', |
| 172 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Container', |
| 173 |
'implements' => |
| 174 |
array ( |
| 175 |
0 => 'League\\Container\\DefinitionContainerInterface', |
| 176 |
), |
| 177 |
), |
| 178 |
'League\\Container\\Definition\\Definition' => |
| 179 |
array ( |
| 180 |
'type' => 'class', |
| 181 |
'classname' => 'Definition', |
| 182 |
'isabstract' => false, |
| 183 |
'namespace' => 'League\\Container\\Definition', |
| 184 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Definition\\Definition', |
| 185 |
'implements' => |
| 186 |
array ( |
| 187 |
0 => 'League\\Container\\Argument\\ArgumentResolverInterface', |
| 188 |
1 => 'League\\Container\\Definition\\DefinitionInterface', |
| 189 |
), |
| 190 |
), |
| 191 |
'League\\Container\\Definition\\DefinitionAggregate' => |
| 192 |
array ( |
| 193 |
'type' => 'class', |
| 194 |
'classname' => 'DefinitionAggregate', |
| 195 |
'isabstract' => false, |
| 196 |
'namespace' => 'League\\Container\\Definition', |
| 197 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Definition\\DefinitionAggregate', |
| 198 |
'implements' => |
| 199 |
array ( |
| 200 |
0 => 'League\\Container\\Definition\\DefinitionAggregateInterface', |
| 201 |
), |
| 202 |
), |
| 203 |
'League\\Container\\Exception\\ContainerException' => |
| 204 |
array ( |
| 205 |
'type' => 'class', |
| 206 |
'classname' => 'ContainerException', |
| 207 |
'isabstract' => false, |
| 208 |
'namespace' => 'League\\Container\\Exception', |
| 209 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Exception\\ContainerException', |
| 210 |
'implements' => |
| 211 |
array ( |
| 212 |
0 => 'Psr\\Container\\ContainerExceptionInterface', |
| 213 |
), |
| 214 |
), |
| 215 |
'League\\Container\\Exception\\NotFoundException' => |
| 216 |
array ( |
| 217 |
'type' => 'class', |
| 218 |
'classname' => 'NotFoundException', |
| 219 |
'isabstract' => false, |
| 220 |
'namespace' => 'League\\Container\\Exception', |
| 221 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Exception\\NotFoundException', |
| 222 |
'implements' => |
| 223 |
array ( |
| 224 |
0 => 'Psr\\Container\\NotFoundExceptionInterface', |
| 225 |
), |
| 226 |
), |
| 227 |
'League\\Container\\Inflector\\Inflector' => |
| 228 |
array ( |
| 229 |
'type' => 'class', |
| 230 |
'classname' => 'Inflector', |
| 231 |
'isabstract' => false, |
| 232 |
'namespace' => 'League\\Container\\Inflector', |
| 233 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Inflector\\Inflector', |
| 234 |
'implements' => |
| 235 |
array ( |
| 236 |
0 => 'League\\Container\\Argument\\ArgumentResolverInterface', |
| 237 |
1 => 'League\\Container\\Inflector\\InflectorInterface', |
| 238 |
), |
| 239 |
), |
| 240 |
'League\\Container\\Inflector\\InflectorAggregate' => |
| 241 |
array ( |
| 242 |
'type' => 'class', |
| 243 |
'classname' => 'InflectorAggregate', |
| 244 |
'isabstract' => false, |
| 245 |
'namespace' => 'League\\Container\\Inflector', |
| 246 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\Inflector\\InflectorAggregate', |
| 247 |
'implements' => |
| 248 |
array ( |
| 249 |
0 => 'League\\Container\\Inflector\\InflectorAggregateInterface', |
| 250 |
), |
| 251 |
), |
| 252 |
'League\\Container\\ReflectionContainer' => |
| 253 |
array ( |
| 254 |
'type' => 'class', |
| 255 |
'classname' => 'ReflectionContainer', |
| 256 |
'isabstract' => false, |
| 257 |
'namespace' => 'League\\Container', |
| 258 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\ReflectionContainer', |
| 259 |
'implements' => |
| 260 |
array ( |
| 261 |
0 => 'League\\Container\\Argument\\ArgumentResolverInterface', |
| 262 |
1 => 'Psr\\Container\\ContainerInterface', |
| 263 |
), |
| 264 |
), |
| 265 |
'League\\Container\\ServiceProvider\\AbstractServiceProvider' => |
| 266 |
array ( |
| 267 |
'type' => 'class', |
| 268 |
'classname' => 'AbstractServiceProvider', |
| 269 |
'isabstract' => true, |
| 270 |
'namespace' => 'League\\Container\\ServiceProvider', |
| 271 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\ServiceProvider\\AbstractServiceProvider', |
| 272 |
'implements' => |
| 273 |
array ( |
| 274 |
0 => 'League\\Container\\ServiceProvider\\ServiceProviderInterface', |
| 275 |
), |
| 276 |
), |
| 277 |
'League\\Container\\ServiceProvider\\ServiceProviderAggregate' => |
| 278 |
array ( |
| 279 |
'type' => 'class', |
| 280 |
'classname' => 'ServiceProviderAggregate', |
| 281 |
'isabstract' => false, |
| 282 |
'namespace' => 'League\\Container\\ServiceProvider', |
| 283 |
'extends' => 'Imagify\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderAggregate', |
| 284 |
'implements' => |
| 285 |
array ( |
| 286 |
0 => 'League\\Container\\ServiceProvider\\ServiceProviderAggregateInterface', |
| 287 |
), |
| 288 |
), |
| 289 |
'WPMedia\\PluginFamily\\Controller\\PluginFamily' => |
| 290 |
array ( |
| 291 |
'type' => 'class', |
| 292 |
'classname' => 'PluginFamily', |
| 293 |
'isabstract' => false, |
| 294 |
'namespace' => 'WPMedia\\PluginFamily\\Controller', |
| 295 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\PluginFamily\\Controller\\PluginFamily', |
| 296 |
'implements' => |
| 297 |
array ( |
| 298 |
0 => 'WPMedia\\PluginFamily\\Controller\\PluginFamilyInterface', |
| 299 |
), |
| 300 |
), |
| 301 |
'WPMedia\\PluginFamily\\Model\\PluginFamily' => |
| 302 |
array ( |
| 303 |
'type' => 'class', |
| 304 |
'classname' => 'PluginFamily', |
| 305 |
'isabstract' => false, |
| 306 |
'namespace' => 'WPMedia\\PluginFamily\\Model', |
| 307 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\PluginFamily\\Model\\PluginFamily', |
| 308 |
'implements' => |
| 309 |
array ( |
| 310 |
), |
| 311 |
), |
| 312 |
'WPMedia\\PluginFamily\\PostInstall' => |
| 313 |
array ( |
| 314 |
'type' => 'class', |
| 315 |
'classname' => 'PostInstall', |
| 316 |
'isabstract' => false, |
| 317 |
'namespace' => 'WPMedia\\PluginFamily', |
| 318 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\PluginFamily\\PostInstall', |
| 319 |
'implements' => |
| 320 |
array ( |
| 321 |
), |
| 322 |
), |
| 323 |
'WPMedia_Base_MixpanelBase' => |
| 324 |
array ( |
| 325 |
'type' => 'class', |
| 326 |
'classname' => 'WPMedia_Base_MixpanelBase', |
| 327 |
'isabstract' => false, |
| 328 |
'namespace' => '\\', |
| 329 |
'extends' => 'Imagify_WPMedia_Base_MixpanelBase', |
| 330 |
'implements' => |
| 331 |
array ( |
| 332 |
), |
| 333 |
), |
| 334 |
'WPMedia_ConsumerStrategies_AbstractConsumer' => |
| 335 |
array ( |
| 336 |
'type' => 'class', |
| 337 |
'classname' => 'WPMedia_ConsumerStrategies_AbstractConsumer', |
| 338 |
'isabstract' => true, |
| 339 |
'namespace' => '\\', |
| 340 |
'extends' => 'Imagify_WPMedia_ConsumerStrategies_AbstractConsumer', |
| 341 |
'implements' => |
| 342 |
array ( |
| 343 |
), |
| 344 |
), |
| 345 |
'WPMedia_ConsumerStrategies_CurlConsumer' => |
| 346 |
array ( |
| 347 |
'type' => 'class', |
| 348 |
'classname' => 'WPMedia_ConsumerStrategies_CurlConsumer', |
| 349 |
'isabstract' => false, |
| 350 |
'namespace' => '\\', |
| 351 |
'extends' => 'Imagify_WPMedia_ConsumerStrategies_CurlConsumer', |
| 352 |
'implements' => |
| 353 |
array ( |
| 354 |
), |
| 355 |
), |
| 356 |
'WPMedia_ConsumerStrategies_FileConsumer' => |
| 357 |
array ( |
| 358 |
'type' => 'class', |
| 359 |
'classname' => 'WPMedia_ConsumerStrategies_FileConsumer', |
| 360 |
'isabstract' => false, |
| 361 |
'namespace' => '\\', |
| 362 |
'extends' => 'Imagify_WPMedia_ConsumerStrategies_FileConsumer', |
| 363 |
'implements' => |
| 364 |
array ( |
| 365 |
), |
| 366 |
), |
| 367 |
'WPMedia_ConsumerStrategies_SocketConsumer' => |
| 368 |
array ( |
| 369 |
'type' => 'class', |
| 370 |
'classname' => 'WPMedia_ConsumerStrategies_SocketConsumer', |
| 371 |
'isabstract' => false, |
| 372 |
'namespace' => '\\', |
| 373 |
'extends' => 'Imagify_WPMedia_ConsumerStrategies_SocketConsumer', |
| 374 |
'implements' => |
| 375 |
array ( |
| 376 |
), |
| 377 |
), |
| 378 |
'WPMedia_Mixpanel' => |
| 379 |
array ( |
| 380 |
'type' => 'class', |
| 381 |
'classname' => 'WPMedia_Mixpanel', |
| 382 |
'isabstract' => false, |
| 383 |
'namespace' => '\\', |
| 384 |
'extends' => 'Imagify_WPMedia_Mixpanel', |
| 385 |
'implements' => |
| 386 |
array ( |
| 387 |
), |
| 388 |
), |
| 389 |
'WPMedia_Producers_MixpanelBaseProducer' => |
| 390 |
array ( |
| 391 |
'type' => 'class', |
| 392 |
'classname' => 'WPMedia_Producers_MixpanelBaseProducer', |
| 393 |
'isabstract' => true, |
| 394 |
'namespace' => '\\', |
| 395 |
'extends' => 'Imagify_WPMedia_Producers_MixpanelBaseProducer', |
| 396 |
'implements' => |
| 397 |
array ( |
| 398 |
), |
| 399 |
), |
| 400 |
'WPMedia_Producers_MixpanelEvents' => |
| 401 |
array ( |
| 402 |
'type' => 'class', |
| 403 |
'classname' => 'WPMedia_Producers_MixpanelEvents', |
| 404 |
'isabstract' => false, |
| 405 |
'namespace' => '\\', |
| 406 |
'extends' => 'Imagify_WPMedia_Producers_MixpanelEvents', |
| 407 |
'implements' => |
| 408 |
array ( |
| 409 |
), |
| 410 |
), |
| 411 |
'WPMedia_Producers_MixpanelGroups' => |
| 412 |
array ( |
| 413 |
'type' => 'class', |
| 414 |
'classname' => 'WPMedia_Producers_MixpanelGroups', |
| 415 |
'isabstract' => false, |
| 416 |
'namespace' => '\\', |
| 417 |
'extends' => 'Imagify_WPMedia_Producers_MixpanelGroups', |
| 418 |
'implements' => |
| 419 |
array ( |
| 420 |
), |
| 421 |
), |
| 422 |
'WPMedia_Producers_MixpanelPeople' => |
| 423 |
array ( |
| 424 |
'type' => 'class', |
| 425 |
'classname' => 'WPMedia_Producers_MixpanelPeople', |
| 426 |
'isabstract' => false, |
| 427 |
'namespace' => '\\', |
| 428 |
'extends' => 'Imagify_WPMedia_Producers_MixpanelPeople', |
| 429 |
'implements' => |
| 430 |
array ( |
| 431 |
), |
| 432 |
), |
| 433 |
'WPMedia\\Mixpanel\\Optin' => |
| 434 |
array ( |
| 435 |
'type' => 'class', |
| 436 |
'classname' => 'Optin', |
| 437 |
'isabstract' => false, |
| 438 |
'namespace' => 'WPMedia\\Mixpanel', |
| 439 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\Mixpanel\\Optin', |
| 440 |
'implements' => |
| 441 |
array ( |
| 442 |
), |
| 443 |
), |
| 444 |
'WPMedia\\Mixpanel\\Tracking' => |
| 445 |
array ( |
| 446 |
'type' => 'class', |
| 447 |
'classname' => 'Tracking', |
| 448 |
'isabstract' => false, |
| 449 |
'namespace' => 'WPMedia\\Mixpanel', |
| 450 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\Mixpanel\\Tracking', |
| 451 |
'implements' => |
| 452 |
array ( |
| 453 |
), |
| 454 |
), |
| 455 |
'WPMedia\\Mixpanel\\TrackingPlugin' => |
| 456 |
array ( |
| 457 |
'type' => 'class', |
| 458 |
'classname' => 'TrackingPlugin', |
| 459 |
'isabstract' => false, |
| 460 |
'namespace' => 'WPMedia\\Mixpanel', |
| 461 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\Mixpanel\\TrackingPlugin', |
| 462 |
'implements' => |
| 463 |
array ( |
| 464 |
), |
| 465 |
), |
| 466 |
'WPMedia\\Mixpanel\\WPConsumer' => |
| 467 |
array ( |
| 468 |
'type' => 'class', |
| 469 |
'classname' => 'WPConsumer', |
| 470 |
'isabstract' => false, |
| 471 |
'namespace' => 'WPMedia\\Mixpanel', |
| 472 |
'extends' => 'Imagify\\Dependencies\\WPMedia\\Mixpanel\\WPConsumer', |
| 473 |
'implements' => |
| 474 |
array ( |
| 475 |
), |
| 476 |
), |
| 477 |
'League\\Container\\Argument\\ArgumentResolverTrait' => |
| 478 |
array ( |
| 479 |
'type' => 'trait', |
| 480 |
'traitname' => 'ArgumentResolverTrait', |
| 481 |
'namespace' => 'League\\Container\\Argument', |
| 482 |
'use' => |
| 483 |
array ( |
| 484 |
0 => 'Imagify\\Dependencies\\League\\Container\\Argument\\ArgumentResolverTrait', |
| 485 |
), |
| 486 |
), |
| 487 |
'League\\Container\\ContainerAwareTrait' => |
| 488 |
array ( |
| 489 |
'type' => 'trait', |
| 490 |
'traitname' => 'ContainerAwareTrait', |
| 491 |
'namespace' => 'League\\Container', |
| 492 |
'use' => |
| 493 |
array ( |
| 494 |
0 => 'Imagify\\Dependencies\\League\\Container\\ContainerAwareTrait', |
| 495 |
), |
| 496 |
), |
| 497 |
'League\\Container\\Argument\\ArgumentInterface' => |
| 498 |
array ( |
| 499 |
'type' => 'interface', |
| 500 |
'interfacename' => 'ArgumentInterface', |
| 501 |
'namespace' => 'League\\Container\\Argument', |
| 502 |
'extends' => |
| 503 |
array ( |
| 504 |
0 => 'Imagify\\Dependencies\\League\\Container\\Argument\\ArgumentInterface', |
| 505 |
), |
| 506 |
), |
| 507 |
'League\\Container\\Argument\\ArgumentResolverInterface' => |
| 508 |
array ( |
| 509 |
'type' => 'interface', |
| 510 |
'interfacename' => 'ArgumentResolverInterface', |
| 511 |
'namespace' => 'League\\Container\\Argument', |
| 512 |
'extends' => |
| 513 |
array ( |
| 514 |
0 => 'Imagify\\Dependencies\\League\\Container\\Argument\\ArgumentResolverInterface', |
| 515 |
), |
| 516 |
), |
| 517 |
'League\\Container\\Argument\\DefaultValueInterface' => |
| 518 |
array ( |
| 519 |
'type' => 'interface', |
| 520 |
'interfacename' => 'DefaultValueInterface', |
| 521 |
'namespace' => 'League\\Container\\Argument', |
| 522 |
'extends' => |
| 523 |
array ( |
| 524 |
0 => 'Imagify\\Dependencies\\League\\Container\\Argument\\DefaultValueInterface', |
| 525 |
), |
| 526 |
), |
| 527 |
'League\\Container\\Argument\\LiteralArgumentInterface' => |
| 528 |
array ( |
| 529 |
'type' => 'interface', |
| 530 |
'interfacename' => 'LiteralArgumentInterface', |
| 531 |
'namespace' => 'League\\Container\\Argument', |
| 532 |
'extends' => |
| 533 |
array ( |
| 534 |
0 => 'Imagify\\Dependencies\\League\\Container\\Argument\\LiteralArgumentInterface', |
| 535 |
), |
| 536 |
), |
| 537 |
'League\\Container\\Argument\\ResolvableArgumentInterface' => |
| 538 |
array ( |
| 539 |
'type' => 'interface', |
| 540 |
'interfacename' => 'ResolvableArgumentInterface', |
| 541 |
'namespace' => 'League\\Container\\Argument', |
| 542 |
'extends' => |
| 543 |
array ( |
| 544 |
0 => 'Imagify\\Dependencies\\League\\Container\\Argument\\ResolvableArgumentInterface', |
| 545 |
), |
| 546 |
), |
| 547 |
'League\\Container\\ContainerAwareInterface' => |
| 548 |
array ( |
| 549 |
'type' => 'interface', |
| 550 |
'interfacename' => 'ContainerAwareInterface', |
| 551 |
'namespace' => 'League\\Container', |
| 552 |
'extends' => |
| 553 |
array ( |
| 554 |
0 => 'Imagify\\Dependencies\\League\\Container\\ContainerAwareInterface', |
| 555 |
), |
| 556 |
), |
| 557 |
'League\\Container\\Definition\\DefinitionAggregateInterface' => |
| 558 |
array ( |
| 559 |
'type' => 'interface', |
| 560 |
'interfacename' => 'DefinitionAggregateInterface', |
| 561 |
'namespace' => 'League\\Container\\Definition', |
| 562 |
'extends' => |
| 563 |
array ( |
| 564 |
0 => 'Imagify\\Dependencies\\League\\Container\\Definition\\DefinitionAggregateInterface', |
| 565 |
), |
| 566 |
), |
| 567 |
'League\\Container\\Definition\\DefinitionInterface' => |
| 568 |
array ( |
| 569 |
'type' => 'interface', |
| 570 |
'interfacename' => 'DefinitionInterface', |
| 571 |
'namespace' => 'League\\Container\\Definition', |
| 572 |
'extends' => |
| 573 |
array ( |
| 574 |
0 => 'Imagify\\Dependencies\\League\\Container\\Definition\\DefinitionInterface', |
| 575 |
), |
| 576 |
), |
| 577 |
'League\\Container\\DefinitionContainerInterface' => |
| 578 |
array ( |
| 579 |
'type' => 'interface', |
| 580 |
'interfacename' => 'DefinitionContainerInterface', |
| 581 |
'namespace' => 'League\\Container', |
| 582 |
'extends' => |
| 583 |
array ( |
| 584 |
0 => 'Imagify\\Dependencies\\League\\Container\\DefinitionContainerInterface', |
| 585 |
), |
| 586 |
), |
| 587 |
'League\\Container\\Inflector\\InflectorAggregateInterface' => |
| 588 |
array ( |
| 589 |
'type' => 'interface', |
| 590 |
'interfacename' => 'InflectorAggregateInterface', |
| 591 |
'namespace' => 'League\\Container\\Inflector', |
| 592 |
'extends' => |
| 593 |
array ( |
| 594 |
0 => 'Imagify\\Dependencies\\League\\Container\\Inflector\\InflectorAggregateInterface', |
| 595 |
), |
| 596 |
), |
| 597 |
'League\\Container\\Inflector\\InflectorInterface' => |
| 598 |
array ( |
| 599 |
'type' => 'interface', |
| 600 |
'interfacename' => 'InflectorInterface', |
| 601 |
'namespace' => 'League\\Container\\Inflector', |
| 602 |
'extends' => |
| 603 |
array ( |
| 604 |
0 => 'Imagify\\Dependencies\\League\\Container\\Inflector\\InflectorInterface', |
| 605 |
), |
| 606 |
), |
| 607 |
'League\\Container\\ServiceProvider\\BootableServiceProviderInterface' => |
| 608 |
array ( |
| 609 |
'type' => 'interface', |
| 610 |
'interfacename' => 'BootableServiceProviderInterface', |
| 611 |
'namespace' => 'League\\Container\\ServiceProvider', |
| 612 |
'extends' => |
| 613 |
array ( |
| 614 |
0 => 'Imagify\\Dependencies\\League\\Container\\ServiceProvider\\BootableServiceProviderInterface', |
| 615 |
), |
| 616 |
), |
| 617 |
'League\\Container\\ServiceProvider\\ServiceProviderAggregateInterface' => |
| 618 |
array ( |
| 619 |
'type' => 'interface', |
| 620 |
'interfacename' => 'ServiceProviderAggregateInterface', |
| 621 |
'namespace' => 'League\\Container\\ServiceProvider', |
| 622 |
'extends' => |
| 623 |
array ( |
| 624 |
0 => 'Imagify\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderAggregateInterface', |
| 625 |
), |
| 626 |
), |
| 627 |
'League\\Container\\ServiceProvider\\ServiceProviderInterface' => |
| 628 |
array ( |
| 629 |
'type' => 'interface', |
| 630 |
'interfacename' => 'ServiceProviderInterface', |
| 631 |
'namespace' => 'League\\Container\\ServiceProvider', |
| 632 |
'extends' => |
| 633 |
array ( |
| 634 |
0 => 'Imagify\\Dependencies\\League\\Container\\ServiceProvider\\ServiceProviderInterface', |
| 635 |
), |
| 636 |
), |
| 637 |
'Psr\\Container\\ContainerExceptionInterface' => |
| 638 |
array ( |
| 639 |
'type' => 'interface', |
| 640 |
'interfacename' => 'ContainerExceptionInterface', |
| 641 |
'namespace' => 'Psr\\Container', |
| 642 |
'extends' => |
| 643 |
array ( |
| 644 |
0 => 'Imagify\\Dependencies\\Psr\\Container\\ContainerExceptionInterface', |
| 645 |
), |
| 646 |
), |
| 647 |
'Psr\\Container\\ContainerInterface' => |
| 648 |
array ( |
| 649 |
'type' => 'interface', |
| 650 |
'interfacename' => 'ContainerInterface', |
| 651 |
'namespace' => 'Psr\\Container', |
| 652 |
'extends' => |
| 653 |
array ( |
| 654 |
0 => 'Imagify\\Dependencies\\Psr\\Container\\ContainerInterface', |
| 655 |
), |
| 656 |
), |
| 657 |
'Psr\\Container\\NotFoundExceptionInterface' => |
| 658 |
array ( |
| 659 |
'type' => 'interface', |
| 660 |
'interfacename' => 'NotFoundExceptionInterface', |
| 661 |
'namespace' => 'Psr\\Container', |
| 662 |
'extends' => |
| 663 |
array ( |
| 664 |
0 => 'Imagify\\Dependencies\\Psr\\Container\\NotFoundExceptionInterface', |
| 665 |
), |
| 666 |
), |
| 667 |
'WPMedia\\PluginFamily\\Controller\\PluginFamilyInterface' => |
| 668 |
array ( |
| 669 |
'type' => 'interface', |
| 670 |
'interfacename' => 'PluginFamilyInterface', |
| 671 |
'namespace' => 'WPMedia\\PluginFamily\\Controller', |
| 672 |
'extends' => |
| 673 |
array ( |
| 674 |
0 => 'Imagify\\Dependencies\\WPMedia\\PluginFamily\\Controller\\PluginFamilyInterface', |
| 675 |
), |
| 676 |
), |
| 677 |
); |
| 678 |
|
| 679 |
public function __construct() |
| 680 |
{ |
| 681 |
$this->includeFilePath = __DIR__ . '/autoload_alias.php'; |
| 682 |
} |
| 683 |
|
| 684 |
/** |
| 685 |
* @param string $class |
| 686 |
*/ |
| 687 |
public function autoload($class): void |
| 688 |
{ |
| 689 |
if (!isset($this->autoloadAliases[$class])) { |
| 690 |
return; |
| 691 |
} |
| 692 |
switch ($this->autoloadAliases[$class]['type']) { |
| 693 |
case 'class': |
| 694 |
$this->load( |
| 695 |
$this->classTemplate( |
| 696 |
$this->autoloadAliases[$class] |
| 697 |
) |
| 698 |
); |
| 699 |
break; |
| 700 |
case 'interface': |
| 701 |
$this->load( |
| 702 |
$this->interfaceTemplate( |
| 703 |
$this->autoloadAliases[$class] |
| 704 |
) |
| 705 |
); |
| 706 |
break; |
| 707 |
case 'trait': |
| 708 |
$this->load( |
| 709 |
$this->traitTemplate( |
| 710 |
$this->autoloadAliases[$class] |
| 711 |
) |
| 712 |
); |
| 713 |
break; |
| 714 |
case 'enum': |
| 715 |
// Enums are final so cannot be aliased with an `extends` shim like classes are; `class_alias()` |
| 716 |
// makes the original name a true alias of the renamed enum, preserving case identity (`===`), |
| 717 |
// `match` arms, `::cases()`, `::from()` and `instanceof` the enum itself. Unlike the class shim, |
| 718 |
// the alias does not implement the enum's original interface names, so `instanceof` against an |
| 719 |
// original interface name is false. Enums require PHP 8.1, but this only executes when an enum |
| 720 |
// is autoloaded by its original name, i.e. on a runtime already using enums. |
| 721 |
\class_alias( |
| 722 |
$this->autoloadAliases[$class]['concrete'], |
| 723 |
$class |
| 724 |
); |
| 725 |
break; |
| 726 |
default: |
| 727 |
// Never. |
| 728 |
break; |
| 729 |
} |
| 730 |
} |
| 731 |
|
| 732 |
private function load(string $includeFile): void |
| 733 |
{ |
| 734 |
file_put_contents($this->includeFilePath, $includeFile); |
| 735 |
include $this->includeFilePath; |
| 736 |
file_exists($this->includeFilePath) && unlink($this->includeFilePath); |
| 737 |
} |
| 738 |
|
| 739 |
/** |
| 740 |
* @param ClassAliasArray $class |
| 741 |
*/ |
| 742 |
private function classTemplate(array $class): string |
| 743 |
{ |
| 744 |
$abstract = $class['isabstract'] ? 'abstract ' : ''; |
| 745 |
$classname = $class['classname']; |
| 746 |
if (isset($class['namespace'])) { |
| 747 |
$namespace = "namespace {$class['namespace']};"; |
| 748 |
$extends = '\\' . $class['extends']; |
| 749 |
$implements = empty($class['implements']) ? '' |
| 750 |
: ' implements \\' . implode(', \\', $class['implements']); |
| 751 |
} else { |
| 752 |
$namespace = ''; |
| 753 |
$extends = $class['extends']; |
| 754 |
$implements = !empty($class['implements']) ? '' |
| 755 |
: ' implements ' . implode(', ', $class['implements']); |
| 756 |
} |
| 757 |
return <<<EOD |
| 758 |
<?php |
| 759 |
$namespace |
| 760 |
$abstract class $classname extends $extends $implements {} |
| 761 |
EOD; |
| 762 |
} |
| 763 |
|
| 764 |
/** |
| 765 |
* @param InterfaceAliasArray $interface |
| 766 |
*/ |
| 767 |
private function interfaceTemplate(array $interface): string |
| 768 |
{ |
| 769 |
$interfacename = $interface['interfacename']; |
| 770 |
$namespace = isset($interface['namespace']) |
| 771 |
? "namespace {$interface['namespace']};" : ''; |
| 772 |
$extends = isset($interface['namespace']) |
| 773 |
? '\\' . implode('\\ ,', $interface['extends']) |
| 774 |
: implode(', ', $interface['extends']); |
| 775 |
return <<<EOD |
| 776 |
<?php |
| 777 |
$namespace |
| 778 |
interface $interfacename extends $extends {} |
| 779 |
EOD; |
| 780 |
} |
| 781 |
|
| 782 |
/** |
| 783 |
* @param TraitAliasArray $trait |
| 784 |
*/ |
| 785 |
private function traitTemplate(array $trait): string |
| 786 |
{ |
| 787 |
$traitname = $trait['traitname']; |
| 788 |
$namespace = isset($trait['namespace']) |
| 789 |
? "namespace {$trait['namespace']};" : ''; |
| 790 |
$uses = isset($trait['namespace']) |
| 791 |
? '\\' . implode(';' . PHP_EOL . ' use \\', $trait['use']) |
| 792 |
: implode(';' . PHP_EOL . ' use ', $trait['use']); |
| 793 |
return <<<EOD |
| 794 |
<?php |
| 795 |
$namespace |
| 796 |
trait $traitname { |
| 797 |
use $uses; |
| 798 |
} |
| 799 |
EOD; |
| 800 |
} |
| 801 |
} |
| 802 |
|
| 803 |
spl_autoload_register([ new AliasAutoloader(), 'autoload' ]); |
| 804 |
} |
| 805 |
|