ShareByCircleProvider
in package
implements
IShareProvider
Uses
TArrayTools, TStringTools, TNCLogger
Class ShareByCircleProvider
Interfaces, Classes, Traits and Enums
- IShareProvider
Table of Contents
- IDENTIFIER = 'ocCircleShare'
- $ALERT : mixed
- $CRITICAL : mixed
- $DEBUG : mixed
- $EMERGENCY : mixed
- $ERROR : mixed
- $INFO : mixed
- $NOTICE : mixed
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $WARNING : mixed
- $circleService : CircleService
- $eventService : EventService
- $federatedEventService : FederatedEventService
- $federatedUserService : FederatedUserService
- $l10n : IL10N
- $logger : LoggerInterface
- $rootFolder : IRootFolder
- $shareWrapperService : ShareWrapperService
- $urlGenerator : IURLGenerator
- $userManager : IUserManager
- __construct() : mixed
- alert() : void
- create() : IShare
- debug() : void
- delete() : void
- deleteFromSelf() : void
- e() : void
- emergency() : void
- exception() : void
- formatShare() : array<string|int, mixed>
- generateRandomSentence() : string
- generateRandomWord() : string
- getAccessList() : array<string|int, mixed>
- getAllShares() : iteratable<string|int, mixed>
- getChildren() : array<string|int, mixed>
- We don't return a thing about children.
- getDateDiff() : string
- getShareById() : IShare
- getShareByToken() : IShare
- getSharedWith() : array<string|int, IShare>
- getSharesBy() : array<string|int, IShare>
- getSharesByPath() : array<string|int, IShare>
- getSharesInFolder() : array<string|int, mixed>
- groupDeleted() : void
- humanReadable() : string
- identifier() : string
- log() : void
- logger() : LoggerInterface
- move() : IShare
- notice() : void
- restore() : IShare
- t() : void
- throwable() : void
- typeOf() : string
- update() : IShare
- userDeleted() : void
- userDeletedFromGroup() : void
- validKey() : bool
- warning() : void
- cleanArray() : mixed
- commonPart() : string
- cut() : string
- extractArray() : mixed
- feedStringWithParams() : string
- get() : string
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getList() : array<string|int, mixed>
- getObj() : mixed
- isUuid() : bool
- mustContains() : mixed
- token() : string
- uuid() : string
- Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
Constants
IDENTIFIER
public
mixed
IDENTIFIER
= 'ocCircleShare'
Properties
$ALERT
public
static mixed
$ALERT
= 3
$CRITICAL
public
static mixed
$CRITICAL
= 3
$DEBUG
public
static mixed
$DEBUG
= 0
$EMERGENCY
public
static mixed
$EMERGENCY
= 4
$ERROR
public
static mixed
$ERROR
= 3
$INFO
public
static mixed
$INFO
= 1
$NOTICE
public
static mixed
$NOTICE
= 1
$TYPE_ARRAY
public
static mixed
$TYPE_ARRAY
= 'Array'
$TYPE_BOOLEAN
public
static mixed
$TYPE_BOOLEAN
= 'Boolean'
$TYPE_INTEGER
public
static mixed
$TYPE_INTEGER
= 'Integer'
$TYPE_NULL
public
static mixed
$TYPE_NULL
= 'Null'
$TYPE_SERIALIZABLE
public
static mixed
$TYPE_SERIALIZABLE
= 'Serializable'
$TYPE_STRING
public
static mixed
$TYPE_STRING
= 'String'
$WARNING
public
static mixed
$WARNING
= 2
$circleService
private
CircleService
$circleService
$eventService
private
EventService
$eventService
$federatedEventService
private
FederatedEventService
$federatedEventService
$federatedUserService
private
FederatedUserService
$federatedUserService
$l10n
private
IL10N
$l10n
$logger
private
LoggerInterface
$logger
$rootFolder
private
IRootFolder
$rootFolder
$shareWrapperService
private
ShareWrapperService
$shareWrapperService
$urlGenerator
private
IURLGenerator
$urlGenerator
$userManager
private
IUserManager
$userManager
Methods
__construct()
public
__construct(IDBConnection $connection, ISecureRandom $secureRandom, IUserManager $userManager, IRootFolder $rootFolder, IL10N $l10n, ILogger $logger, IURLGenerator $urlGenerator) : mixed
Parameters
- $connection : IDBConnection
- $secureRandom : ISecureRandom
- $userManager : IUserManager
- $rootFolder : IRootFolder
- $l10n : IL10N
- $logger : ILogger
- $urlGenerator : IURLGenerator
Return values
mixed —alert()
public
alert(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —create()
public
create(IShare $share) : IShare
Parameters
- $share : IShare
Tags
Return values
IShare —debug()
public
debug(string $message[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $serializable : array<string|int, mixed> = []
Return values
void —delete()
public
delete(IShare $share) : void
Parameters
- $share : IShare
Tags
Return values
void —deleteFromSelf()
public
deleteFromSelf(IShare $share, string $recipient) : void
Parameters
- $share : IShare
- $recipient : string
Tags
Return values
void —e()
public
e(Exception $e[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $e : Exception
- $serializable : array<string|int, mixed> = []
Return values
void —emergency()
public
emergency(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —exception()
public
exception(Exception $e[, int|array<string|int, mixed> $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $e : Exception
- $level : int|array<string|int, mixed> = 3
- $serializable : array<string|int, mixed> = []
Return values
void —formatShare()
public
formatShare(IShare $share) : array<string|int, mixed>
Parameters
- $share : IShare
Return values
array<string|int, mixed> —generateRandomSentence()
public
generateRandomSentence([int $words = 5 ]) : string
Parameters
- $words : int = 5
Return values
string —generateRandomWord()
public
generateRandomWord([int $length = 8 ]) : string
Parameters
- $length : int = 8
Return values
string —getAccessList()
public
getAccessList(array<string|int, Node> $nodes, bool $currentAccess) : array<string|int, mixed>
Parameters
- $nodes : array<string|int, Node>
- $currentAccess : bool
Return values
array<string|int, mixed> —getAllShares()
public
getAllShares() : iteratable<string|int, mixed>
Return values
iteratable<string|int, mixed> —getChildren()
We don't return a thing about children.
public
getChildren(IShare $parent) : array<string|int, mixed>
The call to this function is deprecated and should be removed in next release of NC. Also, we get the children in the delete() method.
Parameters
- $parent : IShare
Return values
array<string|int, mixed> —getDateDiff()
public
getDateDiff(int $first, int $second[, bool $short = false ][, array<string|int, mixed> $words = [] ]) : string
Parameters
- $first : int
- $second : int
- $short : bool = false
- $words : array<string|int, mixed> = []
Tags
Return values
string —getShareById()
public
getShareById(string $shareId[, string|null $recipientId = null ]) : IShare
Parameters
- $shareId : string
- $recipientId : string|null = null
Tags
Return values
IShare —getShareByToken()
public
getShareByToken(string $token) : IShare
Parameters
- $token : string
Tags
Return values
IShare —getSharedWith()
public
getSharedWith(string $userId, int $shareType, Node|null $node, int $limit, int $offset) : array<string|int, IShare>
Parameters
- $userId : string
- $shareType : int
- $node : Node|null
- $limit : int
- $offset : int
Tags
Return values
array<string|int, IShare> —getSharesBy()
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
- $limit : int
- $offset : int
Tags
Return values
array<string|int, IShare> —getSharesByPath()
public
getSharesByPath(Node $path) : array<string|int, IShare>
Parameters
- $path : Node
Tags
Return values
array<string|int, IShare> —getSharesInFolder()
public
getSharesInFolder(string $userId, Folder $node, bool $reshares[, bool $shallow = true ]) : array<string|int, mixed>
Parameters
- $userId : string
- $node : Folder
- $reshares : bool
- $shallow : bool = true
-
Whether the method should stop at the first level, or look into sub-folders.
Tags
Return values
array<string|int, mixed> —groupDeleted()
public
groupDeleted(string $gid) : void
Parameters
- $gid : string
Return values
void —humanReadable()
public
humanReadable(int $bytes) : string
Parameters
- $bytes : int
Return values
string —identifier()
public
identifier() : string
Return values
string —log()
public
log(int $level, string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $level : int
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —logger()
public
logger() : LoggerInterface
Return values
LoggerInterface —move()
public
move(IShare $share, string $recipient) : IShare
Parameters
- $share : IShare
- $recipient : string
Tags
Return values
IShare —notice()
public
notice(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —restore()
public
restore(IShare $share, string $recipient) : IShare
Parameters
- $share : IShare
- $recipient : string
Return values
IShare —t()
public
t(Throwable $t[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $t : Throwable
- $serializable : array<string|int, mixed> = []
Return values
void —throwable()
public
throwable(Throwable $t[, int $level = 3 ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $t : Throwable
- $level : int = 3
- $serializable : array<string|int, mixed> = []
Return values
void —typeOf()
public
typeOf(string $key, array<string|int, mixed> $arr[, bool $root = true ]) : string
Parameters
- $key : string
- $arr : array<string|int, mixed>
- $root : bool = true
Tags
Return values
string —update()
public
update(IShare $share) : IShare
Parameters
- $share : IShare
Tags
Return values
IShare —userDeleted()
public
userDeleted(string $uid, int $shareType) : void
Parameters
- $uid : string
- $shareType : int
Return values
void —userDeletedFromGroup()
public
userDeletedFromGroup(string $uid, string $gid) : void
Parameters
- $uid : string
- $gid : string
Return values
void —validKey()
public
validKey(string $k, array<string|int, mixed> $arr) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
Return values
bool —warning()
public
warning(string $message[, bool $trace = false ][, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $trace : bool = false
- $serializable : array<string|int, mixed> = []
Return values
void —cleanArray()
protected
cleanArray(array<string|int, mixed> &$arr) : mixed
Parameters
- $arr : array<string|int, mixed>
Return values
mixed —commonPart()
protected
commonPart(string $str1, string $str2[, bool $cs = true ]) : string
Parameters
- $str1 : string
- $str2 : string
- $cs : bool = true
-
case sensitive ?
Return values
string —cut()
protected
cut(string $line, int $length) : string
Parameters
- $line : string
- $length : int
Return values
string —extractArray()
protected
extractArray(string $k, string $value, array<string|int, mixed> $list) : mixed
Parameters
- $k : string
- $value : string
- $list : array<string|int, mixed>
Tags
Return values
mixed —feedStringWithParams()
protected
feedStringWithParams(string $line, array<string|int, mixed> $params) : string
Parameters
- $line : string
- $params : array<string|int, mixed>
Return values
string —get()
protected
get(string $k, array<string|int, mixed> $arr[, string $default = '' ]) : string
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : string = ''
Return values
string —getArray()
protected
getArray(string $k, array<string|int, mixed> $arr[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getBool()
protected
getBool(string $k, array<string|int, mixed> $arr[, bool $default = false ]) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : bool = false
Return values
bool —getFloat()
protected
getFloat(string $k, array<string|int, mixed> $arr, float $default) : float
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : float
Return values
float —getInt()
protected
getInt(string $k, array<string|int, mixed> $arr, int $default) : int
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : int
Return values
int —getList()
protected
getList(string $k, array<string|int, mixed> $arr, array<string|int, mixed> $import[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $import : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getObj()
protected
getObj(string $k, array<string|int, mixed> $arr[, JsonSerializable|null $default = null ]) : mixed
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : JsonSerializable|null = null
Return values
mixed —isUuid()
protected
isUuid(string $uuid) : bool
Parameters
- $uuid : string
Return values
bool —mustContains()
protected
mustContains(array<string|int, mixed> $keys, array<string|int, mixed> $arr) : mixed
Parameters
- $keys : array<string|int, mixed>
- $arr : array<string|int, mixed>
Tags
Return values
mixed —token()
protected
token([int $length = 15 ]) : string
Parameters
- $length : int = 15
Return values
string —uuid()
Generate uuid: 2b5a7a87-8db1-445f-a17b-405790f91c80
protected
uuid(int $length) : string
Parameters
- $length : int