ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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().

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  }
+ 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.

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

42  : Adaptor
43  {
44  return $this->getSpecific($config->getAdaptorName(), $config);
45  }
getSpecific(string $adaptor, Config $config)
Definition: Factory.php:30
+ Here is the call graph for this function:

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