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