code: protected function checkProtected($class, $alias)
  	{
  		if (!$this->protectInternals) {
  			return;
  		}
  
  		if ($this->isProtected($class) || ($alias && $this->isProtected($alias))) {
  			if ($alias) {
  				$class = "$class (via alias $alias)";
  			}
  			$msg = "Class $class is internal and cannot be resolved.";
  			throw new Exception\ResolvingInternalException($msg);
  		}
  	}
docs: Check if a class and its alias (optionally) are protected, and throw an
  exception if they are.
  
  @param  string $class
  @param  string|null $alias
  
  @return void
  
  @throws Exception\ResolvingInternalException If class or alias is internal