Ejemplo n.º 1
0
 /**
  * @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;
 }
Ejemplo n.º 2
0
 /**
  * Delete an invitation
  * @param ShareInvitation $invitation
  * @return bool
  */
 public function deleteInvitation(ShareInvitation $invitation)
 {
     $this->storage->simpleStoreClear(OCS_SQLSTORE_NS_INVITATION, $invitation->getId());
     return true;
 }