MembersService
in package
Uses
TNCRequest, TArrayTools
Class MembersService
Tags
Table of Contents
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $accountsRequest : AccountsRequest
- $circlesRequest : DeprecatedCirclesRequest
- $configService : ConfigService
- $eventsService : EventsService
- $fileSharesRequest : FileSharesRequest
- $fileSharingBroadcaster : FileSharingBroadcaster
- $gsUpstreamService : GSUpstreamService
- $l10n : IL10N
- $membersRequest : DeprecatedMembersRequest
- $miscService : MiscService
- $tokensRequest : TokensRequest
- $userId : string
- $userManager : IUserManager
- __construct() : mixed
- MembersService constructor.
- addMember() : array<string|int, mixed>
- addMember();
- addMemberBasedOnItsType() : mixed
- add a new member based on its type.
- clientService() : IClientService
- doRequest() : void
- getCircleFromMembership() : DeprecatedCircle
- getMember() : DeprecatedMember
- getMember();
- getMemberById() : DeprecatedMember
- getUserDisplayName() : string
- levelMember() : array<string|int, mixed>
- onUserRemoved() : mixed
- When a user is removed, remove him from all Circles
- removeMember() : array<string|int, DeprecatedMember>
- retrieveJson() : array<string|int, mixed>
- setMaxDownloadSize() : mixed
- typeOf() : string
- updateCachedFromCircle() : mixed
- updateCachedName() : mixed
- updateMember() : mixed
- validKey() : bool
- verifyIdentBasedOnItsType() : mixed
- // TODO - check this on GS setup Verify the availability of an ident, based on its type.
- 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
- addContact() : mixed
- // TODO - check this on GS setup Add contact as member.
- addEmailAddress() : mixed
- add mail address as contact.
- addGroupMembers() : array<string|int, DeprecatedMember>
- addLocalMember() : mixed
- addMassiveMails() : array<string|int, DeprecatedMember>
- // TODO - check this on GS setup
- addMassiveMembers() : array<string|int, DeprecatedMember>
- add a bunch of users to a circle based on the type of the 'bunch'
- addSingleMember() : DeprecatedMember
- add a single member to a circle.
- filterDuplicate() : array<string|int, mixed>
- generationClientOptions() : mixed
- getGlobalScaleUserDisplayName() : string
- useClient() : IResponse
- verifyIdentContact() : mixed
- Verify if a contact exist in current user address books.
- verifyIdentEmailAddress() : mixed
- Verify if a mail have a valid format.
- verifyIdentLocalMember() : mixed
- Verify if a local account is valid.
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'
$accountsRequest
private
AccountsRequest
$accountsRequest
$circlesRequest
private
DeprecatedCirclesRequest
$circlesRequest
$configService
private
ConfigService
$configService
$eventsService
private
EventsService
$eventsService
$fileSharesRequest
private
FileSharesRequest
$fileSharesRequest
$fileSharingBroadcaster
private
FileSharingBroadcaster
$fileSharingBroadcaster
$gsUpstreamService
private
GSUpstreamService
$gsUpstreamService
$l10n
private
IL10N
$l10n
$membersRequest
private
DeprecatedMembersRequest
$membersRequest
$miscService
private
MiscService
$miscService
$tokensRequest
private
TokensRequest
$tokensRequest
$userId
private
string
$userId
$userManager
private
IUserManager
$userManager
Methods
__construct()
MembersService constructor.
public
__construct(string $userId, IL10N $l10n, IUserManager $userManager, ConfigService $configService, DeprecatedCirclesRequest $circlesRequest, DeprecatedMembersRequest $membersRequest, AccountsRequest $accountsRequest, FileSharesRequest $fileSharesRequest, TokensRequest $tokensRequest, EventsService $eventsService, GSUpstreamService $gsUpstreamService, FileSharingBroadcaster $fileSharingBroadcaster, MiscService $miscService) : mixed
Parameters
- $userId : string
- $l10n : IL10N
- $userManager : IUserManager
- $configService : ConfigService
- $circlesRequest : DeprecatedCirclesRequest
- $membersRequest : DeprecatedMembersRequest
- $accountsRequest : AccountsRequest
- $fileSharesRequest : FileSharesRequest
- $tokensRequest : TokensRequest
- $eventsService : EventsService
- $gsUpstreamService : GSUpstreamService
- $fileSharingBroadcaster : FileSharingBroadcaster
- $miscService : MiscService
Return values
mixed —addMember()
addMember();
public
addMember(string $circleUniqueId, $ident, int $type, string $instance[, bool $force = false ]) : array<string|int, mixed>
add a new member to a circle.
Parameters
Tags
Return values
array<string|int, mixed> —addMemberBasedOnItsType()
add a new member based on its type.
public
addMemberBasedOnItsType(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Tags
Return values
mixed —clientService()
public
clientService() : IClientService
Return values
IClientService —doRequest()
public
doRequest(NCRequest $request[, bool $exceptionOnIssue = true ]) : void
Parameters
- $request : NCRequest
- $exceptionOnIssue : bool = true
Tags
Return values
void —getCircleFromMembership()
public
getCircleFromMembership(DeprecatedMember $member) : DeprecatedCircle
Parameters
- $member : DeprecatedMember
Tags
Return values
DeprecatedCircle —getMember()
getMember();
public
getMember( $circleId, $userId, $type[, bool $forceAll = false ]) : DeprecatedMember
Will return any data of a user related to a circle (as a Member). User can be a 'non-member' Viewer needs to be at least Member of the Circle
Parameters
Tags
Return values
DeprecatedMember —getMemberById()
public
getMemberById(string $memberId) : DeprecatedMember
Parameters
- $memberId : string
Tags
Return values
DeprecatedMember —getUserDisplayName()
public
getUserDisplayName(string $ident[, bool $fresh = false ]) : string
Parameters
- $ident : string
- $fresh : bool = false
Tags
Return values
string —levelMember()
public
levelMember(string $circleUniqueId, string $name, int $type, string $instance, int $level[, bool $force = false ]) : array<string|int, mixed>
Parameters
- $circleUniqueId : string
- $name : string
- $type : int
- $instance : string
- $level : int
- $force : bool = false
Tags
Return values
array<string|int, mixed> —onUserRemoved()
When a user is removed, remove him from all Circles
public
onUserRemoved(string $userId) : mixed
Parameters
- $userId : string
Tags
Return values
mixed —removeMember()
public
removeMember(string $circleUniqueId, string $name, int $type, string $instance[, bool $force = false ]) : array<string|int, DeprecatedMember>
Parameters
- $circleUniqueId : string
- $name : string
- $type : int
- $instance : string
- $force : bool = false
Tags
Return values
array<string|int, DeprecatedMember> —retrieveJson()
public
retrieveJson(NCRequest $request) : array<string|int, mixed>
Parameters
- $request : NCRequest
Tags
Return values
array<string|int, mixed> —setMaxDownloadSize()
public
setMaxDownloadSize(int $size) : mixed
Parameters
- $size : int
Return values
mixed —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 —updateCachedFromCircle()
public
updateCachedFromCircle(DeprecatedCircle $circle) : mixed
Parameters
- $circle : DeprecatedCircle
Return values
mixed —updateCachedName()
public
updateCachedName(DeprecatedMember $member[, bool $fresh = true ]) : mixed
Parameters
- $member : DeprecatedMember
- $fresh : bool = true
Return values
mixed —updateMember()
public
updateMember(DeprecatedMember $member) : mixed
Parameters
- $member : DeprecatedMember
Tags
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 —verifyIdentBasedOnItsType()
// TODO - check this on GS setup Verify the availability of an ident, based on its type.
public
verifyIdentBasedOnItsType(string &$ident, int $type[, string $instance = '' ]) : mixed
Parameters
- $ident : string
- $type : int
- $instance : string = ''
Tags
Return values
mixed —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 —addContact()
// TODO - check this on GS setup Add contact as member.
private
addContact(DeprecatedMember $member) : mixed
Parameters
- $member : DeprecatedMember
Return values
mixed —addEmailAddress()
add mail address as contact.
private
addEmailAddress(DeprecatedMember $member) : mixed
Parameters
- $member : DeprecatedMember
Return values
mixed —addGroupMembers()
private
addGroupMembers(DeprecatedCircle $circle, string $groupId) : array<string|int, DeprecatedMember>
Parameters
- $circle : DeprecatedCircle
- $groupId : string
Tags
Return values
array<string|int, DeprecatedMember> —addLocalMember()
private
addLocalMember(DeprecatedCircle $circle, DeprecatedMember $member) : mixed
Parameters
- $circle : DeprecatedCircle
- $member : DeprecatedMember
Tags
Return values
mixed —addMassiveMails()
// TODO - check this on GS setup
private
addMassiveMails(DeprecatedCircle $circle, string $mails) : array<string|int, DeprecatedMember>
Parameters
- $circle : DeprecatedCircle
- $mails : string
Return values
array<string|int, DeprecatedMember> —addMassiveMembers()
add a bunch of users to a circle based on the type of the 'bunch'
private
addMassiveMembers(DeprecatedCircle $circle, string $ident, int $type) : array<string|int, DeprecatedMember>
Parameters
- $circle : DeprecatedCircle
- $ident : string
- $type : int
Tags
Return values
array<string|int, DeprecatedMember> —addSingleMember()
add a single member to a circle.
private
addSingleMember(DeprecatedCircle $circle, string $ident, int $type[, string $instance = '' ][, bool $force = false ]) : DeprecatedMember
Parameters
- $circle : DeprecatedCircle
- $ident : string
- $type : int
- $instance : string = ''
- $force : bool = false
Tags
Return values
DeprecatedMember —filterDuplicate()
private
filterDuplicate(array<string|int, DeprecatedMember> $curr, array<string|int, DeprecatedMember> $new) : array<string|int, mixed>
Parameters
- $curr : array<string|int, DeprecatedMember>
- $new : array<string|int, DeprecatedMember>
Return values
array<string|int, mixed> —generationClientOptions()
private
generationClientOptions(NCRequest $request) : mixed
Parameters
- $request : NCRequest
Return values
mixed —getGlobalScaleUserDisplayName()
private
getGlobalScaleUserDisplayName(string $ident) : string
Parameters
- $ident : string
Tags
Return values
string —useClient()
private
useClient(NCRequest $request) : IResponse
Parameters
- $request : NCRequest
Tags
Return values
IResponse —verifyIdentContact()
Verify if a contact exist in current user address books.
private
verifyIdentContact( &$ident, $type) : mixed
Parameters
Tags
Return values
mixed —verifyIdentEmailAddress()
Verify if a mail have a valid format.
private
verifyIdentEmailAddress(string $ident, int $type) : mixed
Parameters
- $ident : string
- $type : int
Tags
Return values
mixed —verifyIdentLocalMember()
Verify if a local account is valid.
private
verifyIdentLocalMember( &$ident, $type[, string $instance = '' ]) : mixed