Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * 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;
 }