ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
PlusJob.php
Go to the documentation of this file.
1
<?php
2
3
namespace
ILIAS\BackgroundTasks\Implementation\Tasks
;
4
5
use
ILIAS\BackgroundTasks\Implementation\Bucket\BucketMock
;
6
use
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\IntegerValue
;
7
use
ILIAS\BackgroundTasks\Observer
;
8
use
ILIAS\BackgroundTasks\Task\UserInteraction\Option
;
9
use
ILIAS\BackgroundTasks\Value
;
10
use
ILIAS\BackgroundTasks\Types\SingleType
;
11
use
ILIAS\BackgroundTasks\Types\Type
;
12
13
class
PlusJob
extends
AbstractJob
14
{
15
22
public
function
__construct
()
23
{
24
}
25
26
30
public
function
getInputTypes
()
31
{
32
return
[
33
new
SingleType
(IntegerValue::class),
34
new
SingleType
(IntegerValue::class),
35
];
36
}
37
38
42
public
function
getOutputType
()
43
{
44
return
new
SingleType
(IntegerValue::class);
45
}
46
47
54
public
function
run
(
array
$input
,
Observer
$observer)
55
{
57
$a = $input[0];
59
$b = $input[1];
60
61
$output
=
new
IntegerValue
();
62
$output
->setValue($a->getValue() + $b->getValue());
63
64
return
$output
;
65
}
66
67
72
public
function
isStateless
()
73
{
74
return
true
;
75
}
76
77
81
public
function
getExpectedTimeOfTaskInSeconds
()
82
{
83
return
1;
84
}
85
}
SingleType
ILIAS\BackgroundTasks\Implementation\Tasks\PlusJob\__construct
__construct()
PlusJob constructor.
Definition:
PlusJob.php:22
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractTask\$output
$output
Definition:
AbstractTask.php:32
ILIAS\BackgroundTasks\Implementation\Tasks
Definition:
AbstractJob.php:3
ILIAS\BackgroundTasks\Implementation\Tasks\PlusJob
Definition:
PlusJob.php:13
Observer
ILIAS\BackgroundTasks\Task\Job\run
run(array $input, Observer $observer)
IntegerValue
ILIAS\BackgroundTasks\Types\SingleType
Definition:
SingleType.php:5
ILIAS\BackgroundTasks\Implementation\Values\ScalarValues\IntegerValue
Definition:
IntegerValue.php:7
ILIAS\BackgroundTasks\Observer
Definition:
Observer.php:5
ILIAS\BackgroundTasks\Implementation\Tasks\AbstractJob
Definition:
AbstractJob.php:14
ILIAS\BackgroundTasks\Implementation\Tasks\PlusJob\getOutputType
getOutputType()
Definition:
PlusJob.php:42
ILIAS\BackgroundTasks\Implementation\Tasks\PlusJob\getExpectedTimeOfTaskInSeconds
getExpectedTimeOfTaskInSeconds()
Definition:
PlusJob.php:81
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\PlusJob\isStateless
isStateless()
Definition:
PlusJob.php:72
BucketMock
Type
Value
Option
ILIAS\BackgroundTasks\Implementation\Tasks\PlusJob\getInputTypes
getInputTypes()
Definition:
PlusJob.php:30
src
BackgroundTasks
Implementation
Tasks
PlusJob.php
Generated on Tue Jan 28 2025 19:01:45 for ILIAS by
1.8.13 (using
Doxyfile
)