Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/class-loader/MapClassLoader.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
20 * | 20 * |
21 * @deprecated since version 3.3, to be removed in 4.0. | 21 * @deprecated since version 3.3, to be removed in 4.0. |
22 */ | 22 */ |
23 class MapClassLoader | 23 class MapClassLoader |
24 { | 24 { |
25 private $map = array(); | 25 private $map = []; |
26 | 26 |
27 /** | 27 /** |
28 * @param array $map A map where keys are classes and values the absolute file path | 28 * @param array $map A map where keys are classes and values the absolute file path |
29 */ | 29 */ |
30 public function __construct(array $map) | 30 public function __construct(array $map) |
37 * | 37 * |
38 * @param bool $prepend Whether to prepend the autoloader or not | 38 * @param bool $prepend Whether to prepend the autoloader or not |
39 */ | 39 */ |
40 public function register($prepend = false) | 40 public function register($prepend = false) |
41 { | 41 { |
42 spl_autoload_register(array($this, 'loadClass'), true, $prepend); | 42 spl_autoload_register([$this, 'loadClass'], true, $prepend); |
43 } | 43 } |
44 | 44 |
45 /** | 45 /** |
46 * Loads the given class or interface. | 46 * Loads the given class or interface. |
47 * | 47 * |