function DummyFilesystem::addClass in X Autoload 7.3
Parameters
string $file:
string $class:
Throws
\Exception
File
- tests/
Drupal/ xautoload/ Tests/ DummyFilesystem.php, line 23
Class
Namespace
Drupal\xautoload\TestsCode
function addClass($file, $class) {
$this
->addKnownFile($file);
if (self::FILE !== ($existing = $this->knownPaths[$file])) {
throw new \Exception("A class '{$existing}' already exists at '{$file}'. Cannot overwrite with class '{$class}'.");
}
$this->knownPaths[$file] = $class;
}