Added an exception when passing an invalid object to ApcClassLoader

This commit is contained in:
Christophe Coevoet 2012-04-02 19:53:22 +02:00
parent f5cb167554
commit f1f1494bbf

View File

@ -58,6 +58,10 @@ class ApcClassLoader
throw new \RuntimeException('Unable to use ApcUniversalClassLoader as APC is not enabled.');
}
if (!method_exists($classFinder, 'findFile')) {
throw new \InvalidArgumentException('The class finder must implement a "findFile" method.');
}
$this->prefix = $prefix;
$this->classFinder = $classFinder;
}