/** * @param string $remoteServer * @param string $remoteUser * @param string $documentName * @return ShareInvitation */ public function createInvitation($remoteServer, $remoteUser, $documentName) { $invitation = new ShareInvitation(); $invitation->setStatus(OCS_INVITATION_STATUS_PENDING); $invitation->setLinkHash($this->getHash()); $invitation->setOwner($this->getOwnerId()); $invitation->setTargetHost($remoteServer); $invitation->setTargetUser($remoteUser); $invitation->setDocumentName($documentName); return $invitation; }
/** * Delete an invitation * @param ShareInvitation $invitation * @return bool */ public function deleteInvitation(ShareInvitation $invitation) { $this->storage->simpleStoreClear(OCS_SQLSTORE_NS_INVITATION, $invitation->getId()); return true; }