Bristol SU Support Package
Evaluation.php
Go to the documentation of this file.
1 <?php
2 
3 
5 
6 
8 
13 {
19  private $active = false;
20 
26  private $visible = false;
27 
33  private $mandatory = false;
34 
40  private $complete = false;
41 
47  public function active(): bool
48  {
49  return $this->active;
50  }
51 
57  public function mandatory(): bool
58  {
59  return $this->mandatory;
60  }
61 
67  public function complete(): bool
68  {
69  return $this->complete;
70  }
71 
78  public function setActive(bool $active)
79  {
80  $this->active = $active;
81  }
82 
89  public function setMandatory(bool $mandatory)
90  {
91  $this->mandatory = $mandatory;
92  }
93 
100  public function setVisible(bool $visible)
101  {
102  $this->visible = $visible;
103  }
104 
111  public function setComplete(bool $complete)
112  {
113  $this->complete = $complete;
114  }
115 
121  public function visible(): bool
122  {
123  return $this->visible;
124  }
125 
131  public function toArray()
132  {
133  return [
134  'active' => $this->active(),
135  'visible' => $this->visible(),
136  'mandatory' => $this->mandatory(),
137  'complete' => $this->complete()
138  ];
139  }
140 
141 
148  public function toJson($options = 0)
149  {
150  return json_encode($this->toArray(), $options);
151  }
152 
158  public function __toString()
159  {
160  return $this->toJson();
161  }
162 }