ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
ConcatenationJob.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation
;
4
5
use
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractJob
;
6
use
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\ScalarValue
;
7
use
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\StringValue
;
8
use
ILIAS\BackgroundTasks\Observer
;
9
use
ILIAS\BackgroundTasks\Types\ListType
;
10
use
ILIAS\BackgroundTasks\Types\SingleType
;
11
use
ILIAS\BackgroundTasks\Types\Type
;
12
use
ILIAS\BackgroundTasks\ValueType
;
13
14
class
ConcatenationJob
extends
AbstractJob
15
{
16
23
public
function
run
(array
$input
,
Observer
$observer)
24
{
26
$list
= $input[0]->getList();
28
$values
= array_map(
29
function
($a) {
30
return
$a->getValue();
31
},
32
$list
33
);
34
35
$string_value =
new
StringValue
();
36
$string_value->setValue(implode(
', '
,
$values
));
37
38
return
$string_value;
39
}
40
41
46
public
function
isStateless
()
47
{
48
return
true
;
49
}
50
51
55
public
function
getId
()
56
{
57
return
get_called_class();
58
}
59
60
64
public
function
getInputTypes
()
65
{
66
return
[
new
ListType
(ScalarValue::class)];
67
}
68
69
73
public
function
getOutputType
()
74
{
75
return
new
SingleType
(StringValue::class);
76
}
77
78
82
public
function
getExpectedTimeOfTaskInSeconds
()
83
{
84
return
1;
85
}
86
}
SingleType
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob\isStateless
isStateless()
Definition:
ConcatenationJob.php:46
$list
if(isset($_REQUEST['delete'])) $list
Definition:
registry.php:41
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob\getOutputType
getOutputType()
Definition:
ConcatenationJob.php:73
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob\getInputTypes
getInputTypes()
Definition:
ConcatenationJob.php:64
ListType
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob\getExpectedTimeOfTaskInSeconds
getExpectedTimeOfTaskInSeconds()
int the amount of seconds this task usually taskes. If your task-duration scales with the the amount ...
Definition:
ConcatenationJob.php:82
StringValue
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob
Definition:
ConcatenationJob.php:14
AbstractJob
Observer
ScalarValue
ILIAS\BackgroundTasks\Task\Job\run
run(array $input, Observer $observer)
ILIAS\BackgroundTasks\Types\SingleType
Definition:
SingleType.php:5
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation
Definition:
ConcatenationJob.php:3
ILIAS\BackgroundTasks\Observer
Definition:
Observer.php:5
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractJob
Definition:
AbstractJob.php:14
$values
$values
Definition:
testOperations.php:7
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$input
$input
Definition:
AbstractTask.php:28
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob\getId
getId()
Definition:
ConcatenationJob.php:55
ILIAS\BackgroundTasks\Types\ListType
Definition:
ListType.php:20
php
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\StringValue
Definition:
StringValue.php:7
Type
ValueType
src
BackgroundTasks
Implementation
Tasks
Aggregation
ConcatenationJob.php
Generated on Thu Jan 30 2025 19:02:10 for ILIAS by
1.8.13 (using
Doxyfile
)