1 <?php declare(strict_types=1);
34 return $this->refinery->custom()->transformation(
function (
$data) {
35 $settings = new \ilGlobalCacheSettings();
38 !isset(
$data[
"components"]) ||
39 !
$data[
"components"] ||
40 !isset(
$data[
"service"]) ||
41 $data[
"service"] ===
"none" ||
43 $data[
"service"] ===
"memcached" &&
44 (!isset(
$data[
"memcached_nodes"]) || count(
$data[
"memcached_nodes"]) === 0)
47 $settings->setActive(
false);
49 $settings->setActive(
true);
50 switch (
$data[
"service"]) {
58 array_walk(
$data[
"memcached_nodes"],
function (array $node) use ($settings) {
67 throw new \InvalidArgumentException(
68 "Unknown caching service: '{$data["service
"]}'" 71 $settings->resetActivatedComponents();
72 if (
$data[
"components"] ===
"all") {
73 $settings->activateAll();
75 foreach (
$data[
"components"] as $cmp => $active) {
77 $settings->addActivatedComponent($cmp);
91 $m->setHost((
string) $node[
"host"]);
92 $m->setPort((
int) $node[
"port"]);
93 $m->setWeight((
int) $node[
"weight"]);
114 return new Setup\Objective\NullObjective();
122 return new Setup\Objective\NullObjective();
143 if ($name ==
"flushAll") {
147 "There is no named objective '$name'"
getBuildArtifactObjective()
An objective is a desired state of the system that is supposed to be created by the setup...
getStatusObjective(Setup\Metrics\Storage $storage)
getNamedObjective(string $name, Setup\Config $config=null)
getArrayToConfigTransformation()
getUpdateObjective(Setup\Config $config=null)
__construct(Refinery\Factory $refinery)
getMemcachedServer(array $node)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getInstallObjective(Setup\Config $config=null)
A configuration for the setup.