private static function getConstants()
 {
     if (self::$constCache === NULL) {
         $reflect = new ReflectionClass(get_called_class());
         self::$constCache = $reflect->getConstants();
     }
     return self::$constCache;
 }
Exemplo n.º 2
0
 public function setActionPermissions($actionPermissions)
 {
     foreach ($actionPermissions as $action => $actionValue) {
         if (ActionPermissions::isValidValue($actionValue)) {
             $this->actionPermissions[$action] = $actionValue;
         } else {
             $this->actionPermissions[$action] = ActionPermissions::Undefined;
         }
     }
 }