ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
UploadPolicy.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public const POLICY_ID = 'policy_id';
27  public const AUDIENCE_TYPE_ALL_USERS = 0;
28  public const AUDIENCE_TYPE_GLOBAL_ROLE = 1;
29  public const SCOPE_DEFINITION_GLOBAL = "Global";
30 
31  public function __construct(
32  protected ?int $policy_id,
33  protected string $title,
34  protected int $upload_limit_in_mb,
35  protected array $audience,
36  protected int $audience_type,
37  protected string $scope_definition,
38  protected bool $active,
39  protected ?DateTimeImmutable $valid_from,
40  protected ?DateTimeImmutable $valid_until,
41  protected int $owner,
42  protected DateTimeImmutable $create_date,
43  protected DateTimeImmutable $last_update
44  ) {
45  }
46 
47  public function getPolicyId(): ?int
48  {
49  return $this->policy_id;
50  }
51 
52  public function getTitle(): string
53  {
54  return $this->title;
55  }
56 
57  public function getUploadLimitInMB(): int
58  {
59  return $this->upload_limit_in_mb;
60  }
61 
62  public function getAudience(): array
63  {
64  return $this->audience;
65  }
66 
67  public function getAudienceType(): int
68  {
69  return $this->audience_type;
70  }
71 
72  public function getScopeDefinition(): string
73  {
74  return $this->scope_definition;
75  }
76 
77  public function isActive(): bool
78  {
79  return $this->active;
80  }
81 
82  public function getValidFrom(): ?DateTimeImmutable
83  {
84  return $this->valid_from;
85  }
86 
87  public function getValidUntil(): ?DateTimeImmutable
88  {
89  return $this->valid_until;
90  }
91 
92  public function getOwnerId(): int
93  {
94  return $this->owner;
95  }
96 
97  public function getCreateDate(): DateTimeImmutable
98  {
99  return $this->create_date;
100  }
101 
102  public function getLastUpdate(): DateTimeImmutable
103  {
104  return $this->last_update;
105  }
106 }
__construct(protected ?int $policy_id, protected string $title, protected int $upload_limit_in_mb, protected array $audience, protected int $audience_type, protected string $scope_definition, protected bool $active, protected ?DateTimeImmutable $valid_from, protected ?DateTimeImmutable $valid_until, protected int $owner, protected DateTimeImmutable $create_date, protected DateTimeImmutable $last_update)
const AUDIENCE_TYPE_GLOBAL_ROLE
const AUDIENCE_TYPE_ALL_USERS
const SCOPE_DEFINITION_GLOBAL