From 4f2e84a0eccfb5e85102a30a93799522e510a375 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 15 Dec 2015 09:52:04 +0100 Subject: [PATCH] [Share 2.0] Update share class More getters and setters are required to properly create shares --- lib/private/share20/ishare.php | 35 +++++++++++++++++++++++++++++++++- lib/private/share20/share.php | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/private/share20/ishare.php b/lib/private/share20/ishare.php index 2e54da7a02..a149c578fb 100644 --- a/lib/private/share20/ishare.php +++ b/lib/private/share20/ishare.php @@ -101,7 +101,7 @@ interface IShare { * @param \DateTime $expireDate * @return Share The modified object */ - public function setExpirationDate(\DateTime $expireDate); + public function setExpirationDate($expireDate); /** * Get the share expiration date @@ -110,6 +110,14 @@ interface IShare { */ public function getExpirationDate(); + /** + * Set the sharer of the path + * + * @param IUser|string $sharedBy + * @return Share The modified object + */ + public function setSharedBy($sharedBy); + /** * Get share sharer * @@ -117,6 +125,15 @@ interface IShare { */ public function getSharedBy(); + /** + * Set the original share owner (who owns the path) + * + * @param IUser|string + * + * @return Share The modified object + */ + public function setShareOwner($shareOwner); + /** * Get the original share owner (who owns the path) * @@ -140,6 +157,14 @@ interface IShare { */ public function getPassword(); + /** + * Set the token + * + * @param string $token + * @return Share The modified object + */ + public function setToken($token); + /** * Get the token * @@ -154,6 +179,14 @@ interface IShare { */ public function getParent(); + /** + * Set the target of this share + * + * @param string $target + * @return Share The modified object + */ + public function setTarget($target); + /** * Get the target of this share * diff --git a/lib/private/share20/share.php b/lib/private/share20/share.php index b7ce38ac61..4827000eef 100644 --- a/lib/private/share20/share.php +++ b/lib/private/share20/share.php @@ -163,7 +163,7 @@ class Share implements IShare { * @param \DateTime $expireDate * @return Share The modified object */ - public function setExpirationDate(\DateTime $expireDate) { + public function setExpirationDate($expireDate) { //TODO checks $this->expireDate = $expireDate;