Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AutoloaderRegistry.php
Go to the documentation of this file.
1 <?php
7 
9 
14 {
18  protected static $autoloader;
19 
26  public static function registerAutoloader(AutoloaderInterface $newAutoloader)
27  {
28  self::$autoloader = $newAutoloader;
29  }
30 
37  public static function getAutoloader()
38  {
39  if (self::$autoloader !== null) {
40  return self::$autoloader;
41  } else {
42  throw new \Exception('Autoloader is not registered, cannot be retrieved.');
43  }
44  }
45 }
static registerAutoloader(AutoloaderInterface $newAutoloader)