ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilBackgroundTasksSetupConfig Class Reference
+ Inheritance diagram for ilBackgroundTasksSetupConfig:
+ Collaboration diagram for ilBackgroundTasksSetupConfig:

Public Member Functions

 __construct (string $type, int $max_concurrent_tasks)
 
 getType ()
 
 getMaxCurrentTasks ()
 

Data Fields

const TYPE_SYNCHRONOUS = "sync"
 
const TYPE_ASYNCHRONOUS = "async"
 

Protected Attributes

 $type
 
 $max_concurrent_tasks
 

Detailed Description

Definition at line 8 of file class.ilBackgroundTasksSetupConfig.php.

Constructor & Destructor Documentation

◆ __construct()

ilBackgroundTasksSetupConfig::__construct ( string  $type,
int  $max_concurrent_tasks 
)

Definition at line 23 of file class.ilBackgroundTasksSetupConfig.php.

26 {
27 $types = [
30 ];
31 if (!in_array($type, $types)) {
32 throw new \InvalidArgumentException(
33 "Unknown background tasks type: '$type'"
34 );
35 }
36 if ($max_concurrent_tasks < 1) {
37 throw new \InvalidArgumentException(
38 "There must be at least 1 concurrent background task."
39 );
40 }
41 $this->type = $type;
42 $this->max_concurrent_tasks = $max_concurrent_tasks;
43 }

References $max_concurrent_tasks, $type, TYPE_ASYNCHRONOUS, and TYPE_SYNCHRONOUS.

Member Function Documentation

◆ getMaxCurrentTasks()

ilBackgroundTasksSetupConfig::getMaxCurrentTasks ( )

Definition at line 50 of file class.ilBackgroundTasksSetupConfig.php.

50 : int
51 {
53 }

References $max_concurrent_tasks.

◆ getType()

ilBackgroundTasksSetupConfig::getType ( )

Definition at line 45 of file class.ilBackgroundTasksSetupConfig.php.

45 : string
46 {
47 return $this->type;
48 }

References $type.

Field Documentation

◆ $max_concurrent_tasks

ilBackgroundTasksSetupConfig::$max_concurrent_tasks
protected

Definition at line 21 of file class.ilBackgroundTasksSetupConfig.php.

Referenced by __construct(), and getMaxCurrentTasks().

◆ $type

ilBackgroundTasksSetupConfig::$type
protected

Definition at line 16 of file class.ilBackgroundTasksSetupConfig.php.

Referenced by __construct(), and getType().

◆ TYPE_ASYNCHRONOUS

const ilBackgroundTasksSetupConfig::TYPE_ASYNCHRONOUS = "async"

Definition at line 11 of file class.ilBackgroundTasksSetupConfig.php.

Referenced by __construct().

◆ TYPE_SYNCHRONOUS

const ilBackgroundTasksSetupConfig::TYPE_SYNCHRONOUS = "sync"

The documentation for this class was generated from the following file: