コード例 #1
0
ファイル: manager.php プロジェクト: rajeshpillai/core
 /**
  * Retrieve a share by the share id
  *
  * @param string $id
  * @return Share
  *
  * @throws ShareNotFound
  */
 public function getShareById($id)
 {
     $share = $this->defaultProvider->getShareById($id);
     if ($share->getSharedWith() !== $this->currentUser && $share->getSharedBy() !== $this->currentUser && $share->getShareOwner() !== $this->currentUser) {
         throw new ShareNotFound();
     }
     return $share;
 }
コード例 #2
0
ファイル: manager.php プロジェクト: gcstang/core
 /**
  * Retrieve a share by the share id
  *
  * @param string $id
  * @return Share
  *
  * @throws ShareNotFound
  */
 public function getShareById($id)
 {
     if ($id === null) {
         throw new ShareNotFound();
     }
     $share = $this->defaultProvider->getShareById($id);
     return $share;
 }