ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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);
35  $this->setIdentifier($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  {
62  return [self::DRAFT, self::FINAL, self::REVISED, self::UNAVAILABLE];
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()) {
84  case self::UNAVAILABLE:
85 
87 
88  case self::REVISED:
89  case self::FINAL:
90 
92 
93  case self::DRAFT:
94  default:
95 
97 
98  }
99  }
100 }
__construct($identifier='')
ilAssQuestionLomLifecycle constructor.