Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
PermissionAnnotation.php
Go to the documentation of this file.
1<?php
3
4
6
21
22 public $name;
23
24 public $level;
25
29 public function initAnnotation(array $properties) {
30 if (isset($properties[0])) {
31 $this->name = $properties[0];
32 unset($properties[0]);
33 if (isset($properties[1])) {
34 $this->level = $properties[1];
35 unset($properties[1]);
36 }
37 } else if (isset($properties['name'])) {
38 $this->name = $properties['name'];
39 if (isset($properties['level'])) {
40 $this->level = $properties['level'];
41 }
42 } else {
43 throw new \Exception('Permission annotation must have a name');
44 }
45 }
46}
initAnnotation(array $properties)
Initialize the annotation.