ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAssQuestionLomLifecycle.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 public const DRAFT = 'draft';
29 public const FINAL = 'final';
30 public const REVISED = 'revised';
31 public const UNAVAILABLE = 'unavailable';
32
33 protected string $identifier;
34
40 public function __construct($identifier = '')
41 {
42 if (is_string($identifier) && $identifier !== '') {
43 $identifier = strtolower($identifier);
44 }
45
46 $this->validateIdentifier($identifier);
47 $this->setIdentifier($identifier);
48 }
49
50 public function getIdentifier(): string
51 {
52 return $this->identifier;
53 }
54
59 public function setIdentifier($identifier): void
60 {
61 $this->validateIdentifier($identifier);
62 $this->identifier = $identifier;
63 }
64
68 public function getValidIdentifiers(): array
69 {
71 }
72
77 public function validateIdentifier($identifier): void
78 {
79 if (!in_array($identifier, $this->getValidIdentifiers(), true)) {
81 'Invalid lom lifecycle given: ' . $identifier
82 );
83 }
84 }
85
86 public function getMappedIliasLifecycleIdentifer(): string
87 {
88 switch ($this->getIdentifier()) {
91
92 case self::REVISED:
93 case self::FINAL:
95
96 case self::DRAFT:
97 default:
99 }
100 }
101}
__construct($identifier='')
ilAssQuestionLomLifecycle constructor.