ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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\ValueType
;
10
use
ILIAS\BackgroundTasks\Types\ListType
;
11
use
ILIAS\BackgroundTasks\Types\SingleType
;
12
use
ILIAS\BackgroundTasks\Types\Type
;
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
81
public
function
getExpectedTimeOfTaskInSeconds
()
82
{
83
return
1;
84
}
85
}
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:81
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
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$input
$input
Definition:
AbstractTask.php:28
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ILIAS\BackgroundTasks\Implementation\Tasks\Aggregation\ConcatenationJob\getId
getId()
Definition:
ConcatenationJob.php:55
ILIAS\BackgroundTasks\Types\ListType
Definition:
ListType.php:20
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\StringValue
Definition:
StringValue.php:7
Type
ValueType
src
BackgroundTasks
Implementation
Tasks
Aggregation
ConcatenationJob.php
Generated on Tue Jan 28 2025 19:01:45 for ILIAS by
1.8.13 (using
Doxyfile
)