| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* @package Gantry5 |
| 5 |
* @author RocketTheme http://www.rockettheme.com |
| 6 |
* @copyright Copyright (C) 2007 - 2021 RocketTheme, LLC |
| 7 |
* @license Dual License: MIT or GNU/GPLv2 and later |
| 8 |
* |
| 9 |
* http://opensource.org/licenses/MIT |
| 10 |
* http://www.gnu.org/licenses/gpl-2.0.html |
| 11 |
* |
| 12 |
* Gantry Framework code that extends GPL code is considered GNU/GPLv2 and later |
| 13 |
*/ |
| 14 |
|
| 15 |
namespace Gantry5; |
| 16 |
|
| 17 |
use Composer\Autoload\ClassLoader; |
| 18 |
|
| 19 |
/** |
| 20 |
* Class Loader |
| 21 |
* @package Gantry5 |
| 22 |
*/ |
| 23 |
abstract class Loader |
| 24 |
{ |
| 25 |
/** @var ClassLoader */ |
| 26 |
private static $loader; |
| 27 |
|
| 28 |
/** |
| 29 |
* @return void |
| 30 |
*/ |
| 31 |
public static function setup() |
| 32 |
{ |
| 33 |
self::get(); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* @return ClassLoader |
| 38 |
*/ |
| 39 |
public static function get() |
| 40 |
{ |
| 41 |
if (null === self::$loader) { |
| 42 |
require_once __DIR__ . '/RealLoader.php'; |
| 43 |
self::$loader = RealLoader::getClassLoader(); |
| 44 |
} |
| 45 |
|
| 46 |
return self::$loader; |
| 47 |
} |
| 48 |
} |
| 49 |
|