private function check_class($class)
{
if (!is_subclass_of($class, $this->base, true) && (!$this->base_is_class || $class !== $this->base)) {
throw new InvalidClassException(sprintf('The class "%1$s" is invalid with respect to the defined base "%2$s".', $class, $this->base));
}
}