ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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

string $type
 
int $max_concurrent_tasks
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

33 {
34 $types = [
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 }

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

Member Function Documentation

◆ getMaxCurrentTasks()

ilBackgroundTasksSetupConfig::getMaxCurrentTasks ( )

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

57 : int
58 {
60 }

References $max_concurrent_tasks.

◆ getType()

ilBackgroundTasksSetupConfig::getType ( )

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

52 : string
53 {
54 return $this->type;
55 }

References $type.

Field Documentation

◆ $max_concurrent_tasks

int ilBackgroundTasksSetupConfig::$max_concurrent_tasks
protected

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

Referenced by __construct(), and getMaxCurrentTasks().

◆ $type

string ilBackgroundTasksSetupConfig::$type
protected

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

Referenced by __construct(), and getType().

◆ TYPE_ASYNCHRONOUS

const ilBackgroundTasksSetupConfig::TYPE_ASYNCHRONOUS = "async"

Definition at line 24 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: