IShareProviderWithNotification
extends
IShareProvider
in
Interface IShareProvider
Tags
Table of Contents
Methods
- create() : IShare
- Create a share
- delete() : mixed
- Delete a share
- deleteFromSelf() : mixed
- Unshare a file from self as recipient.
- getAccessList() : array<string|int, mixed>
- Get the access list to the array of provided nodes.
- getAllShares() : iterable<string|int, mixed>
- Get all the shares in this provider returned as iterable to reduce memory overhead
- getShareById() : IShare
- Get share by id
- getShareByToken() : IShare
- Get a share by token
- getSharedWith() : array<string|int, IShare>
- Get shared with the given user
- getSharesBy() : array<string|int, IShare>
- Get all shares by the given user
- getSharesByPath() : array<string|int, IShare>
- Get shares for a given path
- getSharesInFolder() : array<string|int, array<string|int, IShare>>
- Get all shares by the given user in a folder
- groupDeleted() : mixed
- A group is deleted from the system.
- identifier() : string
- Return the identifier of this provider.
- move() : IShare
- Move a share as a recipient.
- restore() : IShare
- Restore a share for a given recipient. The implementation could be provider independant.
- sendMailNotification() : bool
- Send a mail notification to the recipient of a share
- update() : IShare
- Update a share
- userDeleted() : mixed
- A user is deleted from the system So clean up the relevant shares.
- userDeletedFromGroup() : mixed
- A user is deleted from a group We have to clean up all the related user specific group shares Providers not handling group shares should just return
Methods
create()
Create a share
public
create(IShare $share) : IShare
Parameters
- $share : IShare
Tags
Return values
IShare —The share object
delete()
Delete a share
public
delete(IShare $share) : mixed
Parameters
- $share : IShare
Tags
deleteFromSelf()
Unshare a file from self as recipient.
public
deleteFromSelf(IShare $share, string $recipient) : mixed
This may require special handling. If a user unshares a group share from their self then the original group share should still exist.
Parameters
- $share : IShare
- $recipient : string
-
UserId of the recipient
Tags
getAccessList()
Get the access list to the array of provided nodes.
public
getAccessList(array<string|int, Node> $nodes, bool $currentAccess) : array<string|int, mixed>
Parameters
- $nodes : array<string|int, Node>
-
The list of nodes to get access for
- $currentAccess : bool
-
If current access is required (like for removed shares that might get revived later)
Tags
Return values
array<string|int, mixed>getAllShares()
Get all the shares in this provider returned as iterable to reduce memory overhead
public
getAllShares() : iterable<string|int, mixed>
Tags
Return values
iterable<string|int, mixed>getShareById()
Get share by id
public
getShareById(int $id[, string|null $recipientId = null ]) : IShare
Parameters
- $id : int
- $recipientId : string|null = null
Tags
Return values
ISharegetShareByToken()
Get a share by token
public
getShareByToken(string $token) : IShare
Parameters
- $token : string
Tags
Return values
ISharegetSharedWith()
Get shared with the given user
public
getSharedWith(string $userId, int $shareType, Node|null $node, int $limit, int $offset) : array<string|int, IShare>
Parameters
- $userId : string
-
get shares where this user is the recipient
- $shareType : int
- $node : Node|null
- $limit : int
-
The max number of entries returned, -1 for all
- $offset : int
Tags
Return values
array<string|int, IShare>getSharesBy()
Get all shares by the given user
public
getSharesBy(string $userId, int $shareType, Node|null $node, bool $reshares, int $limit, int $offset) : array<string|int, IShare>
Parameters
- $userId : string
- $shareType : int
- $node : Node|null
- $reshares : bool
-
Also get the shares where $user is the owner instead of just the shares where $user is the initiator
- $limit : int
-
The maximum number of shares to be returned, -1 for all shares
- $offset : int
Tags
Return values
array<string|int, IShare>getSharesByPath()
Get shares for a given path
public
getSharesByPath(Node $path) : array<string|int, IShare>
Parameters
- $path : Node
Tags
Return values
array<string|int, IShare>getSharesInFolder()
Get all shares by the given user in a folder
public
getSharesInFolder(string $userId, Folder $node, bool $reshares[, bool $shallow = true ]) : array<string|int, array<string|int, IShare>>
Parameters
- $userId : string
- $node : Folder
- $reshares : bool
-
Also get the shares where $user is the owner instead of just the shares where $user is the initiator
- $shallow : bool = true
-
Whether the method should stop at the first level, or look into sub-folders.
Tags
Return values
array<string|int, array<string|int, IShare>>groupDeleted()
A group is deleted from the system.
public
groupDeleted(string $gid) : mixed
We have to clean up all shares to this group. Providers not handling group shares should just return
Parameters
- $gid : string
Tags
identifier()
Return the identifier of this provider.
public
identifier() : string
Tags
Return values
string —Containing only [a-zA-Z0-9]
move()
Move a share as a recipient.
public
move(IShare $share, string $recipient) : IShare
This is updating the share target. Thus the mount point of the recipient. This may require special handling. If a user moves a group share the target should only be changed for them.
Parameters
- $share : IShare
- $recipient : string
-
userId of recipient
Tags
Return values
ISharerestore()
Restore a share for a given recipient. The implementation could be provider independant.
public
restore(IShare $share, string $recipient) : IShare
Parameters
- $share : IShare
- $recipient : string
Tags
Return values
IShare —The restored share object
sendMailNotification()
Send a mail notification to the recipient of a share
public
sendMailNotification(IShare $share) : bool
Parameters
- $share : IShare
Tags
Return values
bool —True if the mail was sent successfully
update()
Update a share
public
update(IShare $share) : IShare
Parameters
- $share : IShare
Tags
Return values
IShare —The share object
userDeleted()
A user is deleted from the system So clean up the relevant shares.
public
userDeleted(string $uid, int $shareType) : mixed
Parameters
- $uid : string
- $shareType : int
Tags
userDeletedFromGroup()
A user is deleted from a group We have to clean up all the related user specific group shares Providers not handling group shares should just return
public
userDeletedFromGroup(string $uid, string $gid) : mixed
Parameters
- $uid : string
- $gid : string