ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
BackgroundTasks.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS;
22
36
37class BackgroundTasks implements Component
38{
39 public function init(
40 array | \ArrayAccess &$define,
41 array | \ArrayAccess &$implement,
42 array | \ArrayAccess &$use,
43 array | \ArrayAccess &$contribute,
44 array | \ArrayAccess &$seek,
45 array | \ArrayAccess &$provide,
46 array | \ArrayAccess &$pull,
47 array | \ArrayAccess &$internal,
48 ): void {
49 $define[] = Registry::class;
50
51 // components putting tasks or values into buckets contribute them, see Registry\Registry
52 $implement[Registry::class] = static fn(): Registry =>
53 new BasicRegistry(
54 $seek[Task::class],
55 $seek[Value::class]
56 );
57
58 $contribute[Value::class] = static fn() => new Values\ScalarValues\ScalarValue();
59 $contribute[Value::class] = static fn() => new Values\ScalarValues\BooleanValue();
60 $contribute[Value::class] = static fn() => new Values\ScalarValues\FloatValue();
61 $contribute[Value::class] = static fn() => new Values\ScalarValues\IntegerValue();
62 $contribute[Value::class] = static fn() => new Values\ScalarValues\StringValue();
63 $contribute[Value::class] = static fn() => new Values\AggregationValues\ListValue();
64 $contribute[Value::class] = static fn() => new Values\ThunkValue();
65 $contribute[Task::class] = static fn() => new Tasks\Aggregation\ConcatenationJob();
66 $contribute[Task::class] = static fn() => new Tasks\NotFoundUserInteraction();
67
68 $contribute[Agent::class] = static fn(): Agent =>
70 $pull[Factory::class]
71 );
72 $contribute[LanguageFileDirectory::class] = fn() => new ComponentLanguageFileDirectory(
73 $this,
74 'bgtask'
75 );
76 $contribute[LanguageFileDirectory::class] = fn() => new ComponentLanguageFileDirectory(
77 $this,
78 'background_tasks'
79 );
80
81 $contribute[PublicAsset::class] = fn(): ComponentJS => new ComponentJS(
82 $this,
83 "background_task_refresh.js"
84 );
85 }
86}
init(array|\ArrayAccess &$define, array|\ArrayAccess &$implement, array|\ArrayAccess &$use, array|\ArrayAccess &$contribute, array|\ArrayAccess &$seek, array|\ArrayAccess &$provide, array|\ArrayAccess &$pull, array|\ArrayAccess &$internal,)
This is a js file provided by some component.
Definition: ComponentJS.php:27
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
All tasks and values the components contribute via $contribute[\ILIAS\BackgroundTasks\Task::class] an...
Definition: Registry.php:43
An public asset is a file or folder that should be served via the web.
Definition: PublicAsset.php:27
A directory of language files with a path and a prefix for them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: AbstractJob.php:19
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Job.php:19
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.