コード例 #1
0
ファイル: Key.inc.php プロジェクト: ergo70/dataserver
 public function getPermissions()
 {
     if ($this->erased) {
         throw new Exception("Cannot access permissions of deleted key {$this->id}");
     }
     if (($this->id || $this->key) && !$this->loaded) {
         $this->load();
     }
     $permissions = new Zotero_Permissions($this->userID);
     foreach ($this->permissions as $libraryID => $p) {
         foreach ($p as $key => $val) {
             $permissions->setPermission($libraryID, $key, $val);
         }
     }
     return $permissions;
 }