ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ ilDoc Overview
class.ilBackgroundTasksSetupConfig.php
Go to the documentation of this file.
1
<?php
2
19
use
ILIAS\Setup\Config
;
20
21
class
ilBackgroundTasksSetupConfig
implements
Config
22
{
23
public
const
TYPE_SYNCHRONOUS
=
"sync"
;
24
public
const
TYPE_ASYNCHRONOUS
=
"async"
;
25
26
protected
string
$type
;
27
28
protected
int
$max_concurrent_tasks
;
29
30
public
function
__construct
(
31
string
$type,
32
int
$max_concurrent_tasks
33
) {
34
$types = [
35
self::TYPE_SYNCHRONOUS,
36
self::TYPE_ASYNCHRONOUS
37
];
38
if
(!in_array($type, $types)) {
39
throw
new \InvalidArgumentException(
40
"Unknown background tasks type: '$type'"
41
);
42
}
43
if
($max_concurrent_tasks < 1) {
44
throw
new \InvalidArgumentException(
45
"There must be at least 1 concurrent background task."
46
);
47
}
48
$this->type =
$type
;
49
$this->max_concurrent_tasks =
$max_concurrent_tasks
;
50
}
51
52
public
function
getType
(): string
53
{
54
return
$this->type
;
55
}
56
57
public
function
getMaxCurrentTasks
():
int
58
{
59
return
$this->max_concurrent_tasks
;
60
}
61
}
ilBackgroundTasksSetupConfig\__construct
__construct(string $type, int $max_concurrent_tasks)
Definition:
class.ilBackgroundTasksSetupConfig.php:30
ilBackgroundTasksSetupConfig\getType
getType()
Definition:
class.ilBackgroundTasksSetupConfig.php:52
ilBackgroundTasksSetupConfig\$type
string $type
Definition:
class.ilBackgroundTasksSetupConfig.php:26
Config
ilBackgroundTasksSetupConfig\$max_concurrent_tasks
int $max_concurrent_tasks
Definition:
class.ilBackgroundTasksSetupConfig.php:28
ilBackgroundTasksSetupConfig\TYPE_ASYNCHRONOUS
const TYPE_ASYNCHRONOUS
Definition:
class.ilBackgroundTasksSetupConfig.php:24
ILIAS\Setup\Config
A configuration for the setup.
Definition:
Config.php:26
ilBackgroundTasksSetupConfig
Definition:
class.ilBackgroundTasksSetupConfig.php:21
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
ilBackgroundTasksSetupConfig\TYPE_SYNCHRONOUS
const TYPE_SYNCHRONOUS
Definition:
class.ilBackgroundTasksSetupConfig.php:23
ilBackgroundTasksSetupConfig\getMaxCurrentTasks
getMaxCurrentTasks()
Definition:
class.ilBackgroundTasksSetupConfig.php:57
components
ILIAS
BackgroundTasks_
classes
Setup
class.ilBackgroundTasksSetupConfig.php
Generated on Mon Sep 1 2025 23:02:25 for ILIAS by
1.8.13 (using
Doxyfile
)