ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
StorageHandlerFactory.php
Go to the documentation of this file.
1
<?php declare(strict_types=1);
2
3
namespace
ILIAS\MainMenu\Storage\StorageHandler
;
4
5
use
ILIAS\MainMenu\Storage\StorableResource
;
6
12
class
StorageHandlerFactory
13
{
14
20
public
function
getHandlerForResource
(
StorableResource
$resource) :
StorageHandler
21
{
22
$file_system_storage_handler =
new
FileSystemStorageHandler
();
23
switch
($resource->
getStorageID
()) {
24
case
$file_system_storage_handler->getID():
25
26
return
$file_system_storage_handler;
27
// More to come
28
default
:
29
throw
new \LogicException(
"no other StorageHandler possible at the moment"
);
30
}
31
}
32
}
ILIAS\MainMenu\Storage\StorageHandler\FileSystemStorageHandler
Class FileSystemStorage.
Definition:
FileSystemStorageHandler.php:23
ILIAS\MainMenu\Storage\StorageHandler\StorageHandler
Class FileResourceHandler.
Definition:
StorageHandler.php:17
ILIAS\MainMenu\Storage\StorableResource\getStorageID
getStorageID()
ILIAS\MainMenu\Storage\StorageHandler
Definition:
FileSystemStorageHandler.php:3
StorableResource
ILIAS\MainMenu\Storage\StorageHandler\StorageHandlerFactory\getHandlerForResource
getHandlerForResource(StorableResource $resource)
Definition:
StorageHandlerFactory.php:20
ILIAS\MainMenu\Storage\StorageHandler\StorageHandlerFactory
Class StorageHandlerFactory.
Definition:
StorageHandlerFactory.php:12
ILIAS\MainMenu\Storage\StorableResource
Interface StorageResource.
Definition:
StorableResource.php:15
Services
MainMenu
classes
Storage
StorageHandler
StorageHandlerFactory.php
Generated on Wed Sep 3 2025 20:01:16 for ILIAS by
1.8.13 (using
Doxyfile
)