/**
  * Remove a registered loader module from the stack by its name.
  * To determine a module name use the modules getName() method.
  *
  * @param string $moduleName The module name
  * @param inst $priority The priority
  *
  * @return bool
  *
  * @throws \BuildR\ClassLoader\Exception\ModuleException
  */
 public function removeModule($moduleName, $priority)
 {
     foreach ($this->modules as $modulePriority => $module) {
         if (call_user_func([$module, 'getName']) === $moduleName && $modulePriority == $priority) {
             unset($this->modules[$priority]);
             ksort($this->modules);
             return TRUE;
         }
     }
     throw ModuleException::notFound('Name: ' . $moduleName . ' Priority: ' . $priority);
 }