47 foreach ($this->agents as
$c) {
48 if ($c->hasConfig()) {
67 $inputs[$k] =
$c->getConfigInput(
$config->getConfig($k));
69 $inputs[$k] =
$c->getConfigInput();
73 return $this->field_factory->group($inputs)
74 ->withAdditionalTransformation(
75 $this->refinery->in()->series([
76 $this->refinery->custom()->transformation(
function ($v) {
79 $this->refinery->to()->toNew(ConfigCollection::class)
89 return $this->refinery->in()->series([
90 $this->refinery->custom()->transformation(
function (
$in) {
92 foreach ($this->agents as $key => $agent) {
93 if (!$agent->hasConfig()) {
96 $val =
$in[$key] ?? null;
97 $transformation = $agent->getArrayToConfigTransformation();
98 $out[$key] = $transformation($val);
102 $this->refinery->custom()->transformation(
function ($v) {
105 $this->refinery->to()->toNew(ConfigCollection::class)
131 foreach ($this->agents as $k =>
$c) {
132 $gs[] =
$c->getBuildArtifactObjective();
142 foreach ($this->agents as $k =>
$c) {
143 if (
$c->hasConfig()) {
144 $gs[] = call_user_func([
$c, $which],
$config->getConfig($k));
146 $gs[] = call_user_func([
$c, $which]);
156 throw new \InvalidArgumentException(
157 "Expected ConfigCollection for configuration." 164 foreach ($this->agents as $k =>
$c) {
165 if (
$c->hasConfig()) {
A objective collection is a objective that is achieved once all subobjectives are achieved...
getInstallObjective(Config $config=null)
An objective is a desired state of the system that is supposed to be created by the setup...
An agent that is just a collection of some other agents.
A agent is some component that performs part of the setup process.
getArrayToConfigTransformation()
getConfigInput(Config $config=null)
__construct(FieldFactory $field_factory, Refinery $refinery, array $agents)
checkConfig(Config $config)
getBuildArtifactObjective()
getUpdateObjective(Config $config=null)
if(php_sapi_name() !='cli') $in
A configuration for the setup.
A collection of some configurations.
getXObjective(string $which, Config $config=null)