31 if (isset($properties[0])) {
32 $this->role = $properties[0];
33 unset($properties[0]);
34 if (isset($properties[1])) {
35 $this->resource = $properties[1];
36 unset($properties[1]);
37 if (isset($properties[2])) {
38 $this->permission = $properties[2];
39 unset($properties[2]);
42 }
else if (isset($properties[
'role'])) {
43 $this->role = $properties[
'role'];
44 if (isset($properties[
'resource'])) {
45 $this->resource = $properties[
'resource'];
47 if (isset($properties[
'permission'])) {
48 $this->permission = $properties[
'permission'];
51 throw new \Exception(
'Allow annotation must have a role');