Constructor.
@api
string $prefix A prefix to create a namespace in Xcache:
object $classFinder An object that implements findFile() method.:
public function __construct($prefix, $classFinder) {
if (!extension_loaded('Xcache')) {
throw new \RuntimeException('Unable to use XcacheClassLoader as Xcache 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;
}