ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilAssQuestionLomLifecycle.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
14{
15 const DRAFT = 'draft';
16 const FINAL = 'final';
17 const REVISED = 'revised';
18 const UNAVAILABLE = 'unavailable';
19
23 protected $identifier;
24
30 public function __construct($identifier = '')
31 {
32 if (strlen($identifier)) {
33 $identifier = strtolower($identifier);
36 }
37 }
38
42 public function getIdentifier()
43 {
44 return $this->identifier;
45 }
46
51 public function setIdentifier($identifier)
52 {
54 $this->identifier = $identifier;
55 }
56
60 public function getValidIdentifiers()
61 {
63 }
64
70 {
71 if (!in_array($identifier, $this->getValidIdentifiers())) {
73 'invalid lom lifecycle given: ' . $identifier
74 );
75 }
76 }
77
82 {
83 switch ($this->getIdentifier()) {
85
87
88 case self::REVISED:
89 case self::FINAL:
90
92
93 case self::DRAFT:
94 default:
95
97
98 }
99 }
100}
An exception for terminatinating execution or to throw for unit testing.
__construct($identifier='')
ilAssQuestionLomLifecycle constructor.