ILIAS  release_8 Revision v8.24
class.ilBackgroundTasksSetupConfig.php
Go to the documentation of this file.
1<?php
2
19use ILIAS\Setup;
21
23{
24 public const TYPE_SYNCHRONOUS = "sync";
25 public const TYPE_ASYNCHRONOUS = "async";
26
27 protected string $type;
28
29 protected int $max_concurrent_tasks;
30
31 public function __construct(
32 string $type,
34 ) {
35 $types = [
38 ];
39 if (!in_array($type, $types)) {
40 throw new \InvalidArgumentException(
41 "Unknown background tasks type: '$type'"
42 );
43 }
44 if ($max_concurrent_tasks < 1) {
45 throw new \InvalidArgumentException(
46 "There must be at least 1 concurrent background task."
47 );
48 }
49 $this->type = $type;
50 $this->max_concurrent_tasks = $max_concurrent_tasks;
51 }
52
53 public function getType(): string
54 {
55 return $this->type;
56 }
57
58 public function getMaxCurrentTasks(): int
59 {
61 }
62}
A password is used as part of credentials for authentication.
Definition: Password.php:17
__construct(string $type, int $max_concurrent_tasks)
A configuration for the setup.
Definition: Config.php:27
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...