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"]);
143 if (
$name ==
"flushAll") {
146 throw new InvalidArgumentException(
147 "There is no named objective '$name'"
An exception for terminatinating execution or to throw for unit testing.
A non-objective, nothing to do to achieve it...
getUpdateObjective(Setup\Config $config=null)
getStatusObjective(Setup\Metrics\Storage $storage)
getInstallObjective(Setup\Config $config=null)
getMigrations()
@inheritDoc
getNamedObjective(string $name, Setup\Config $config=null)
getBuildArtifactObjective()
__construct(Refinery\Factory $refinery)
getArrayToConfigTransformation()
getMemcachedServer(array $node)
A agent is some component that performs part of the setup process.
A configuration for the setup.
An objective is a desired state of the system that is supposed to be created by the setup.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...