예제 #1
0
 /**
  * Unregister an AutoLoadable Object
  *
  * @param Next\Loader\AutoLoader\AutoLoadable $autoloader
  *   The AutoLoader Object to be registered
  *
  * @return Next\AutoLoader
  *   AutoLoader Instance (Fluent Interface)
  *
  * @throws Next\LoaderException
  *   Trying to unregister a non registered AutoLoadable Object
  */
 public function unregisterAutoLoader(AutoLoadable $autoloader)
 {
     if (!$this->autoloaders->contains($autoloader)) {
         require_once 'LoaderException.php';
         throw LoaderException::unknown();
     }
     $this->autoloaders->detach($autoloader);
     spl_autoload_unregister($autoloader->call());
     return $this;
 }