ILIAS
trunk Revision v11.0_alpha-1723-g8e69f309bab
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
Factory.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Cache\Adaptor
;
22
23
use
ILIAS\Cache\Config
;
24
28
class
Factory
29
{
30
public
function
getSpecific
(
string
$adaptor,
Config
$config):
Adaptor
31
{
32
$adaptor_implementation = match ($adaptor) {
33
Config::APCU
=>
new
APCu
($config),
34
Config::PHPSTATIC
=>
new
PHPStatic
($config),
35
Config::MEMCACHED
=>
new
Memcached
($config),
36
default
=>
new
PHPStatic
($config),
37
};
38
39
return
$adaptor_implementation->
isAvailable
() ? $adaptor_implementation :
new
PHPStatic
($config);
40
}
41
42
public
function
getWithConfig
(
Config
$config):
Adaptor
43
{
44
return
$this->
getSpecific
($config->
getAdaptorName
(), $config);
45
}
46
}
ILIAS\Cache\Adaptor\Adaptor\Adaptor
Definition:
Adaptor.php:28
ILIAS\Cache\Adaptor\PHPStatic
Definition:
PHPStatic.php:28
ILIAS\Cache\Adaptor
Definition:
Adaptor.php:21
ILIAS\Cache\Config\getAdaptorName
getAdaptorName()
Definition:
Config.php:48
ILIAS\Cache\Config
Definition:
Config.php:29
ILIAS\Cache\Adaptor\Factory
Definition:
Factory.php:28
ILIAS\Cache\Adaptor\APCu
Definition:
APCu.php:26
ILIAS\Cache\Adaptor\Factory\getSpecific
getSpecific(string $adaptor, Config $config)
Definition:
Factory.php:30
ILIAS\Cache\Adaptor\Factory\getWithConfig
getWithConfig(Config $config)
Definition:
Factory.php:42
ILIAS\Cache\Adaptor\Memcached
Definition:
Memcached.php:28
ILIAS\Cache\Config\MEMCACHED
const MEMCACHED
Definition:
Config.php:34
Config
ILIAS\Cache\Adaptor\PHPStatic\isAvailable
isAvailable()
Definition:
PHPStatic.php:36
ILIAS\Cache\Config\APCU
const APCU
Definition:
Config.php:32
ILIAS\Cache\Config\PHPSTATIC
const PHPSTATIC
Definition:
Config.php:33
components
ILIAS
Cache
src
Adaptor
Factory.php
Generated on Sun Apr 6 2025 23:02:08 for ILIAS by
1.8.13 (using
Doxyfile
)