Exemple #1
0
 public function setEyeosGroup(AbstractEyeosGroup $group)
 {
     try {
         $principals = $this->subject->getPrincipals();
         foreach ($principals as $principal) {
             if ($principal instanceof AbstractEyeosGroup && $principal->getId() == $group->getId()) {
                 $this->eyeosGroup = $group;
                 return;
             }
         }
         throw new EyeNoSuchGroupException('Specified group not found in context principals.');
     } catch (EyeException $e) {
         throw new EyeInvalidArgumentException('Invalid group.', 0, $e);
     }
 }
Exemple #2
0
 public function getAttributesMap()
 {
     return array_merge(parent::getAttributesMap(), get_object_vars($this));
 }