/** * 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; }
/** * 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; }