19 declare(strict_types=1);
44 public function __construct(array $handlers,
string $base_dir)
47 foreach ($handlers as $handler) {
48 $this->handlers[$handler->getID()] = $handler;
49 if ($handler->isPrimary()) {
50 if ($this->primary !== null) {
51 throw new \LogicException(
"Only one primary StorageHandler can exist");
53 $this->primary = $handler;
56 if ($this->primary === null) {
57 throw new \LogicException(
"One primary StorageHandler must exist");
78 if (isset($this->handlers[$storage_id])) {
79 return $this->handlers[$storage_id];
82 throw new \LogicException(
"no StorageHandler for '$storage_id' available");
Class FileResourceHandler.
Interface StorageResource.
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getHandlerForStorageId(string $storage_id)
ILIAS ResourceStorage StorageHandler StorageHandler $primary
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(array $handlers, string $base_dir)
StorageHandlerFactory constructor.
getHandlerForRevision(Revision $revision)
getHandlerForResource(StorableResource $resource)
Class StorageHandlerFactory.