CirclesService
in package
Uses
TArrayTools
Class CirclesService
Tags
Table of Contents
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $circleProviderRequest : CircleProviderRequest
- $circlesRequest : DeprecatedCirclesRequest
- $configService : ConfigService
- $eventsService : EventsService
- $federatedLinksRequest : FederatedLinksRequest
- $fileSharesRequest : FileSharesRequest
- $groupManager : IGroupManager
- $gsUpstreamService : GSUpstreamService
- $l10n : IL10N
- $membersRequest : DeprecatedMembersRequest
- $membersService : MembersService
- $miscService : MiscService
- $tokensRequest : TokensRequest
- $userId : string
- __construct() : mixed
- CirclesService constructor.
- checkThatCircleIsNotFull() : mixed
- convertTypeStringToBitValue() : int|mixed
- Convert a Type in String to its Bit Value
- createCircle() : DeprecatedCircle
- Create circle using this->userId as owner
- detailsCircle() : DeprecatedCircle
- returns details on circle and its members if this->userId is a member itself.
- getCircleIcon() : string
- getCircleIcon()
- getFilesForCircles() : array<string|int, mixed>
- hasToBeAdmin() : mixed
- should be moved.
- hasToBeOwner() : mixed
- should be moved.
- infoCircleByName() : DeprecatedCircle|null
- joinCircle() : null|DeprecatedMember
- Join a circle.
- leaveCircle() : null|DeprecatedMember
- Leave a circle.
- listCircles() : array<string|int, DeprecatedCircle>
- list Circles depends on type (or all) and name (parts) and minimum level.
- typeOf() : string
- updatePasswordOnShares() : mixed
- validKey() : bool
- viewerIsAdmin() : bool
- cleanArray() : mixed
- extractArray() : mixed
- get() : string
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getList() : array<string|int, mixed>
- getObj() : mixed
- mustContains() : mixed
- detailsCircleFederatedCircles() : mixed
- get the Federated Circles list and add the result to the Circle.
- detailsCircleLinkedGroups() : mixed
- // TODO - check this on GS setup get the Linked Group list and add the result to the Circle.
- detailsCircleMembers() : mixed
- get the Members list and add the result to the Circle.
Properties
$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'
$circleProviderRequest
private
CircleProviderRequest
$circleProviderRequest
$circlesRequest
private
DeprecatedCirclesRequest
$circlesRequest
$configService
private
ConfigService
$configService
$eventsService
private
EventsService
$eventsService
$federatedLinksRequest
private
FederatedLinksRequest
$federatedLinksRequest
$fileSharesRequest
private
FileSharesRequest
$fileSharesRequest
$groupManager
private
IGroupManager
$groupManager
$gsUpstreamService
private
GSUpstreamService
$gsUpstreamService
$l10n
private
IL10N
$l10n
$membersRequest
private
DeprecatedMembersRequest
$membersRequest
$membersService
private
MembersService
$membersService
$miscService
private
MiscService
$miscService
$tokensRequest
private
TokensRequest
$tokensRequest
$userId
private
string
$userId
Methods
__construct()
CirclesService constructor.
public
__construct(string $userId, IL10N $l10n, IUserSession $userSession, IGroupManager $groupManager, MembersService $membersService, ConfigService $configService, DeprecatedCirclesRequest $circlesRequest, DeprecatedMembersRequest $membersRequest, TokensRequest $tokensRequest, FileSharesRequest $fileSharesRequest, FederatedLinksRequest $federatedLinksRequest, GSUpstreamService $gsUpstreamService, EventsService $eventsService, CircleProviderRequest $circleProviderRequest, MiscService $miscService) : mixed
Parameters
- $userId : string
- $l10n : IL10N
- $userSession : IUserSession
- $groupManager : IGroupManager
- $membersService : MembersService
- $configService : ConfigService
- $circlesRequest : DeprecatedCirclesRequest
- $membersRequest : DeprecatedMembersRequest
- $tokensRequest : TokensRequest
- $fileSharesRequest : FileSharesRequest
- $federatedLinksRequest : FederatedLinksRequest
- $gsUpstreamService : GSUpstreamService
- $eventsService : EventsService
- $circleProviderRequest : CircleProviderRequest
- $miscService : MiscService
Return values
mixed —checkThatCircleIsNotFull()
public
checkThatCircleIsNotFull(DeprecatedCircle $circle) : mixed
Parameters
- $circle : DeprecatedCircle
Tags
Return values
mixed —convertTypeStringToBitValue()
Convert a Type in String to its Bit Value
public
convertTypeStringToBitValue(string $type) : int|mixed
Parameters
- $type : string
Return values
int|mixed —createCircle()
Create circle using this->userId as owner
public
createCircle(int|string $type, string $name[, string $ownerId = '' ]) : DeprecatedCircle
Parameters
- $type : int|string
- $name : string
- $ownerId : string = ''
Tags
Return values
DeprecatedCircle —detailsCircle()
returns details on circle and its members if this->userId is a member itself.
public
detailsCircle(string $circleUniqueId[, bool $forceAll = false ]) : DeprecatedCircle
Parameters
- $circleUniqueId : string
- $forceAll : bool = false
Tags
Return values
DeprecatedCircle —getCircleIcon()
getCircleIcon()
public
static getCircleIcon(string $type[, bool $png = false ]) : string
Return the right imagePath for a type of circle.
Parameters
- $type : string
- $png : bool = false
Return values
string —getFilesForCircles()
public
getFilesForCircles(string $circleUniqueIds[, int $limit = -1 ], int $offset) : array<string|int, mixed>
Parameters
- $circleUniqueIds : string
- $limit : int = -1
- $offset : int
Tags
Return values
array<string|int, mixed> —hasToBeAdmin()
should be moved.
public
hasToBeAdmin(DeprecatedMember $member) : mixed
Parameters
- $member : DeprecatedMember
Tags
Return values
mixed —hasToBeOwner()
should be moved.
public
hasToBeOwner(DeprecatedMember $member) : mixed
Parameters
- $member : DeprecatedMember
Tags
Return values
mixed —infoCircleByName()
public
infoCircleByName( $circleName) : DeprecatedCircle|null
Parameters
Tags
Return values
DeprecatedCircle|null —joinCircle()
Join a circle.
public
joinCircle(string $circleUniqueId) : null|DeprecatedMember
Parameters
- $circleUniqueId : string
Tags
Return values
null|DeprecatedMember —leaveCircle()
Leave a circle.
public
leaveCircle(string $circleUniqueId) : null|DeprecatedMember
Parameters
- $circleUniqueId : string
Tags
Return values
null|DeprecatedMember —listCircles()
list Circles depends on type (or all) and name (parts) and minimum level.
public
listCircles(string $userId, mixed $type[, string $name = '' ], int $level[, bool $forceAll = false ]) : array<string|int, DeprecatedCircle>
Parameters
- $userId : string
- $type : mixed
- $name : string = ''
- $level : int
- $forceAll : bool = false
Tags
Return values
array<string|int, DeprecatedCircle> —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 —updatePasswordOnShares()
public
updatePasswordOnShares(DeprecatedCircle $circle) : mixed
Parameters
- $circle : DeprecatedCircle
Return values
mixed —validKey()
public
validKey(string $k, array<string|int, mixed> $arr) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
Return values
bool —viewerIsAdmin()
public
viewerIsAdmin() : bool
Return values
bool —cleanArray()
protected
cleanArray(array<string|int, mixed> &$arr) : mixed
Parameters
- $arr : array<string|int, mixed>
Return values
mixed —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 —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 —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 —detailsCircleFederatedCircles()
get the Federated Circles list and add the result to the Circle.
private
detailsCircleFederatedCircles(DeprecatedCircle $circle) : mixed
Parameters
- $circle : DeprecatedCircle
Return values
mixed —detailsCircleLinkedGroups()
// TODO - check this on GS setup get the Linked Group list and add the result to the Circle.
private
detailsCircleLinkedGroups(DeprecatedCircle $circle) : mixed
Parameters
- $circle : DeprecatedCircle
Tags
Return values
mixed —detailsCircleMembers()
get the Members list and add the result to the Circle.
private
detailsCircleMembers(DeprecatedCircle $circle[, mixed $forceAll = false ]) : mixed
Parameters
- $circle : DeprecatedCircle
- $forceAll : mixed = false