function VirtualFilesystem::addClass in X Autoload 7.5
Same name and namespace in other branches
- 7.4 tests/lib/Filesystem/VirtualFilesystem.php \Drupal\xautoload\Tests\Filesystem\VirtualFilesystem::addClass()
Parameters
string $file:
string $class:
Throws
\Exception
File
- tests/
src/ Filesystem/ VirtualFilesystem.php, line 69
Class
Namespace
Drupal\xautoload\Tests\FilesystemCode
function addClass($file, $class) {
$this
->addKnownFile($file);
if (self::FILE !== ($existing = $this->knownPaths[$file])) {
throw new \Exception("A non-empty file already exists at '{$file}'. Cannot overwrite with class '{$class}'.");
}
$this->knownPaths[$file] = $class;
}