ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Cache\Adaptor\Factory Class Reference
+ Collaboration diagram for ILIAS\Cache\Adaptor\Factory:

Public Member Functions

 getSpecific (string $adaptor, Config $config)
 
 getWithConfig (Config $config)
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 28 of file Factory.php.

Member Function Documentation

◆ getSpecific()

ILIAS\Cache\Adaptor\Factory::getSpecific ( string  $adaptor,
Config  $config 
)

Definition at line 30 of file Factory.php.

30 : 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 }

References ILIAS\Cache\Config\APCU, ILIAS\Cache\Adaptor\PHPStatic\isAvailable(), ILIAS\Cache\Config\MEMCACHED, and ILIAS\Cache\Config\PHPSTATIC.

Referenced by ILIAS\Cache\Adaptor\Factory\getWithConfig().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWithConfig()

ILIAS\Cache\Adaptor\Factory::getWithConfig ( Config  $config)

Definition at line 42 of file Factory.php.

42 : Adaptor
43 {
44 return $this->getSpecific($config->getAdaptorName(), $config);
45 }
getSpecific(string $adaptor, Config $config)
Definition: Factory.php:30

References ILIAS\Cache\Config\getAdaptorName(), and ILIAS\Cache\Adaptor\Factory\getSpecific().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: