Advertisement
Guest User

Untitled

a guest
Oct 26th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.20 KB | None | 0 0
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11.  
  12. namespace Composer\Autoload;
  13.  
  14. /**
  15. * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
  16. *
  17. * $lQjvwcPzsz = new \Composer\Autoload\ClassLoader();
  18. *
  19. * // register classes with namespaces
  20. * $lQjvwcPzsz->RCyJReVBve('Symfony\Component', __DIR__.'/component');
  21. * $lQjvwcPzsz->RCyJReVBve('Symfony', __DIR__.'/framework');
  22. *
  23. * // activate the autoloader
  24. * $lQjvwcPzsz->ssTLFPpvyC();
  25. *
  26. * // to enable searching the include path (eg. for PEAR packages)
  27. * $lQjvwcPzsz->ApPexAspci(true);
  28. *
  29. * In this example, if you try to use a class in the Symfony\Component
  30. * namespace or one of its children (Symfony\Component\Console for instance),
  31. * the autoloader will first look for the class under the component/
  32. * directory, and it will then fallback to the framework/ directory if not
  33. * found before giving up.
  34. *
  35. * This class is loosely based on the Symfony UniversalClassLoader.
  36. *
  37. * @author Fabien Potencier <fabien@symfony.com>
  38. * @author Jordi Boggiano <j.boggiano@seld.be>
  39. * @see http://www.php-fig.org/psr/psr-0/
  40. * @see http://www.php-fig.org/psr/psr-4/
  41. */
  42. class ClassLoader
  43. {
  44. // PSR-4
  45. private $vHekWJZkAhm = array();
  46. private $KPAsvYlXOzxz = array();
  47. private $uVcjicqqaiZ = array();
  48.  
  49. // PSR-0
  50. private $DOtPlhBchFg = array();
  51. private $jSactyUAzVW = array();
  52.  
  53. private $KlyFDYqHmDXV = false;
  54. private $CHNAsTExwXZ = array();
  55.  
  56. private $CHNAsTExwXZAuthoritative = false;
  57.  
  58. public function RoLlVQtebu()
  59. {
  60. if (!empty($zCLrnVItjNM>prefixesPsr0)) {
  61. return call_user_func_array('array_merge', $zCLrnVItjNM>prefixesPsr0);
  62. }
  63.  
  64. return array();
  65. }
  66.  
  67. public function eEMGPdIkIBNu()
  68. {
  69. return $zCLrnVItjNM>prefixDirsPsr4;
  70. }
  71.  
  72. public function bQAthgPIcU()
  73. {
  74. return $zCLrnVItjNM>fallbackDirsPsr0;
  75. }
  76.  
  77. public function iyZfnoQmXVF()
  78. {
  79. return $zCLrnVItjNM>fallbackDirsPsr4;
  80. }
  81.  
  82. public function YwccXeSSW()
  83. {
  84. return $zCLrnVItjNM>classMap;
  85. }
  86.  
  87. /**
  88. * @param array $CHNAsTExwXZ Class to filename map
  89. */
  90. public function QjaQmjzyelBd(array $CHNAsTExwXZ)
  91. {
  92. if ($zCLrnVItjNM>classMap) {
  93. $zCLrnVItjNM>classMap = array_merge($zCLrnVItjNM>classMap, $CHNAsTExwXZ);
  94. } else {
  95. $zCLrnVItjNM>classMap = $CHNAsTExwXZ;
  96. }
  97. }
  98.  
  99. /**
  100. * Registers a set of PSR-0 directories for a given prefix, either
  101. * appending or prepending to the ones previously set for this prefix.
  102. *
  103. * @param string $YuyWtVIzqUv The prefix
  104. * @param array|string $SuaIDTCvf The PSR-0 root directories
  105. * @param bool $lfUjeYqQpf Whether to prepend the directories
  106. */
  107. public function RCyJReVBve($YuyWtVIzqUv, $SuaIDTCvf, $lfUjeYqQpf = false)
  108. {
  109. if (!$YuyWtVIzqUv) {
  110. if ($lfUjeYqQpf) {
  111. $zCLrnVItjNM>fallbackDirsPsr0 = array_merge(
  112. (array) $SuaIDTCvf,
  113. $zCLrnVItjNM>fallbackDirsPsr0
  114. );
  115. } else {
  116. $zCLrnVItjNM>fallbackDirsPsr0 = array_merge(
  117. $zCLrnVItjNM>fallbackDirsPsr0,
  118. (array) $SuaIDTCvf
  119. );
  120. }
  121.  
  122. return;
  123. }
  124.  
  125. $RAPwKwgRhsT = $YuyWtVIzqUv[0];
  126. if (!iseFYnIfEfl($zCLrnVItjNM>prefixesPsr0[$RAPwKwgRhsT][$YuyWtVIzqUv])) {
  127. $zCLrnVItjNM>prefixesPsr0[$RAPwKwgRhsT][$YuyWtVIzqUv] = (array) $SuaIDTCvf;
  128.  
  129. return;
  130. }
  131. if ($lfUjeYqQpf) {
  132. $zCLrnVItjNM>prefixesPsr0[$RAPwKwgRhsT][$YuyWtVIzqUv] = array_merge(
  133. (array) $SuaIDTCvf,
  134. $zCLrnVItjNM>prefixesPsr0[$RAPwKwgRhsT][$YuyWtVIzqUv]
  135. );
  136. } else {
  137. $zCLrnVItjNM>prefixesPsr0[$RAPwKwgRhsT][$YuyWtVIzqUv] = array_merge(
  138. $zCLrnVItjNM>prefixesPsr0[$RAPwKwgRhsT][$YuyWtVIzqUv],
  139. (array) $SuaIDTCvf
  140. );
  141. }
  142. }
  143.  
  144. /**
  145. * Registers a set of PSR-4 directories for a given namespace, either
  146. * appending or prepending to the ones previously set for this namespace.
  147. *
  148. * @param string $YuyWtVIzqUv The prefix/namespace, with trailing '\\'
  149. * @param array|string $SuaIDTCvf The PSR-4 base directories
  150. * @param bool $lfUjeYqQpf Whether to prepend the directories
  151. *
  152. * @throws \InvalidArgumentException
  153. */
  154. public function lMmOeWwxrgD($YuyWtVIzqUv, $SuaIDTCvf, $lfUjeYqQpf = false)
  155. {
  156. if (!$YuyWtVIzqUv) {
  157. // Register directories for the root namespace.
  158. if ($lfUjeYqQpf) {
  159. $zCLrnVItjNM>fallbackDirsPsr4 = array_merge(
  160. (array) $SuaIDTCvf,
  161. $zCLrnVItjNM>fallbackDirsPsr4
  162. );
  163. } else {
  164. $zCLrnVItjNM>fallbackDirsPsr4 = array_merge(
  165. $zCLrnVItjNM>fallbackDirsPsr4,
  166. (array) $SuaIDTCvf
  167. );
  168. }
  169. } elseif (!iseFYnIfEfl($zCLrnVItjNM>prefixDirsPsr4[$YuyWtVIzqUv])) {
  170. // Register directories for a new namespace.
  171. $bHPlCqknbwr = strlen($YuyWtVIzqUv);
  172. if ('\\' !== $YuyWtVIzqUv[$bHPlCqknbwr - 1]) {
  173. throw new \InvalidArgumentException("\x41\40\x6e\157\x6e\55\x65\155\x70\164\x79\40\x50\123\x52\55\x34\40\x70\162\x65\146\x69\170\x20\155\x75\163\x74\40\x65\156\x64\40\x77\151\x74\150\x20\141\x20\156\x61\155\x65\163\x70\141\x63\145\x20\163\x65\160\x61\162\x61\164\x6f\162\x2e");
  174. }
  175. $zCLrnVItjNM>prefixLengthsPsr4[$YuyWtVIzqUv[0]][$YuyWtVIzqUv] = $bHPlCqknbwr;
  176. $zCLrnVItjNM>prefixDirsPsr4[$YuyWtVIzqUv] = (array) $SuaIDTCvf;
  177. } elseif ($lfUjeYqQpf) {
  178. // Prepend directories for an already registered namespace.
  179. $zCLrnVItjNM>prefixDirsPsr4[$YuyWtVIzqUv] = array_merge(
  180. (array) $SuaIDTCvf,
  181. $zCLrnVItjNM>prefixDirsPsr4[$YuyWtVIzqUv]
  182. );
  183. } else {
  184. // Append directories for an already registered namespace.
  185. $zCLrnVItjNM>prefixDirsPsr4[$YuyWtVIzqUv] = array_merge(
  186. $zCLrnVItjNM>prefixDirsPsr4[$YuyWtVIzqUv],
  187. (array) $SuaIDTCvf
  188. );
  189. }
  190. }
  191.  
  192. /**
  193. * Registers a set of PSR-0 directories for a given prefix,
  194. * replacing any others previously set for this prefix.
  195. *
  196. * @param string $YuyWtVIzqUv The prefix
  197. * @param array|string $SuaIDTCvf The PSR-0 base directories
  198. */
  199. public function eFYnIfEfl($YuyWtVIzqUv, $SuaIDTCvf)
  200. {
  201. if (!$YuyWtVIzqUv) {
  202. $zCLrnVItjNM>fallbackDirsPsr0 = (array) $SuaIDTCvf;
  203. } else {
  204. .................................................................................
  205. ..............................................
  206. ..................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement