public function __invoke($className)
{
if (!$this->splRegistered) {
return false;
}
if (!$this->enabled) {
return false;
}
if (!is_callable($this->callback)) {
if ($this->flags & self::NO_EXCEPTION) {
return false;
}
throw new \BadMethodCallException('Autoload callback is not callable');
}
return call_user_func($this->callback, $className);
}