CirclesManager
in package
Class CirclesManager
Table of Contents
- $circleService : CircleService
- $circlesQueryHelper : CirclesQueryHelper
- $configService : ConfigService
- $federatedUserService : FederatedUserService
- $memberService : MemberService
- $membershipService : MembershipService
- __construct() : mixed
- CirclesManager constructor.
- addMember() : Member
- createCircle() : Circle
- destroyCircle() : void
- flagAsAppManaged() : void
- getCircle() : Circle
- getCircles() : array<string|int, Circle>
- WARNING: This method is not using Cached Memberships meaning that the request can be heavy and should only be used if probeCircles() does not fit your need.
- getCurrentFederatedUser() : IFederatedUser
- getDefinition() : string
- getFederatedUser() : FederatedUser
- getLink() : Membership
- getLocalFederatedUser() : FederatedUser
- getQueryHelper() : CirclesQueryHelper
- levelMember() : Member
- probeCircles() : array<string|int, mixed>
- Returns data about Circles based on cached Memberships.
- removeMember() : void
- startAppSession() : void
- startOccSession() : void
- $userId - userId to emulate as initiator (can be empty) $userType - specify if userIs not a singleId $circleId - if no userId specified, will use the owner of the Circle as initiator
- startSession() : void
- startSuperSession() : void
- stopSession() : void
- updateConfig() : void
Properties
$circleService
private
CircleService
$circleService
$circlesQueryHelper
private
CirclesQueryHelper
$circlesQueryHelper
$configService
private
ConfigService
$configService
$federatedUserService
private
FederatedUserService
$federatedUserService
$memberService
private
MemberService
$memberService
$membershipService
private
MembershipService
$membershipService
Methods
__construct()
CirclesManager constructor.
public
__construct(FederatedUserService $federatedUserService, CircleService $circleService, MemberService $memberService, MembershipService $membershipService, ConfigService $configService, CirclesQueryHelper $circlesQueryHelper) : mixed
Parameters
- $federatedUserService : FederatedUserService
- $circleService : CircleService
- $memberService : MemberService
- $membershipService : MembershipService
- $configService : ConfigService
- $circlesQueryHelper : CirclesQueryHelper
Return values
mixed —addMember()
public
addMember(string $circleId, FederatedUser $federatedUser) : Member
Parameters
- $circleId : string
- $federatedUser : FederatedUser
Tags
Return values
Member —createCircle()
public
createCircle(string $name[, FederatedUser|null $owner = null ][, bool $personal = false ][, bool $local = false ]) : Circle
Parameters
- $name : string
- $owner : FederatedUser|null = null
- $personal : bool = false
- $local : bool = false
Tags
Return values
Circle —destroyCircle()
public
destroyCircle(string $singleId) : void
Parameters
- $singleId : string
Tags
Return values
void —flagAsAppManaged()
public
flagAsAppManaged(string $circleId[, bool $enabled = true ]) : void
Parameters
- $circleId : string
- $enabled : bool = true
Tags
Return values
void —getCircle()
public
getCircle(string $singleId[, CircleProbe|null $probe = null ]) : Circle
Parameters
- $singleId : string
- $probe : CircleProbe|null = null
Tags
Return values
Circle —getCircles()
WARNING: This method is not using Cached Memberships meaning that the request can be heavy and should only be used if probeCircles() does not fit your need.
public
getCircles([CircleProbe|null $probe = null ][, bool $refreshCache = false ]) : array<string|int, Circle>
Always prefer probeCircles();
returns available Circles to the current session.
Parameters
- $probe : CircleProbe|null = null
- $refreshCache : bool = false
Tags
Return values
array<string|int, Circle> —getCurrentFederatedUser()
public
getCurrentFederatedUser() : IFederatedUser
Tags
Return values
IFederatedUser —getDefinition()
public
getDefinition(IEntity $circle) : string
Parameters
- $circle : IEntity
Return values
string —getFederatedUser()
public
getFederatedUser(string $federatedId[, int $type = Member::TYPE_SINGLE ]) : FederatedUser
Parameters
- $federatedId : string
- $type : int = Member::TYPE_SINGLE
Tags
Return values
FederatedUser —getLink()
public
getLink(string $circleId, string $singleId[, bool $detailed = false ]) : Membership
Parameters
- $circleId : string
- $singleId : string
- $detailed : bool = false
Tags
Return values
Membership —getLocalFederatedUser()
public
getLocalFederatedUser(string $userId) : FederatedUser
Parameters
- $userId : string
Tags
Return values
FederatedUser —getQueryHelper()
public
getQueryHelper() : CirclesQueryHelper
Return values
CirclesQueryHelper —levelMember()
public
levelMember(string $memberId, int $level) : Member
Parameters
- $memberId : string
- $level : int
Tags
Return values
Member —probeCircles()
Returns data about Circles based on cached Memberships.
public
probeCircles([CircleProbe|null $circleProbe = null ][, DataProbe|null $dataProbe = null ]) : array<string|int, mixed>
Meaning that only Circles the current user is a member will be returned.
CircleProbe is used to filter Circles to be returned by the method. DataProbe is used to add details to returned Circles.
Parameters
- $circleProbe : CircleProbe|null = null
- $dataProbe : DataProbe|null = null
Tags
Return values
array<string|int, mixed> —removeMember()
public
removeMember(string $memberId) : void
Parameters
- $memberId : string
Tags
Return values
void —startAppSession()
public
startAppSession(string $appId[, int $appSerial = Member::APP_DEFAULT ]) : void
Parameters
- $appId : string
- $appSerial : int = Member::APP_DEFAULT
Tags
Return values
void —startOccSession()
$userId - userId to emulate as initiator (can be empty) $userType - specify if userIs not a singleId $circleId - if no userId specified, will use the owner of the Circle as initiator
public
startOccSession(string $userId[, int $userType = Member::TYPE_SINGLE ][, string $circleId = '' ]) : void
Parameters
- $userId : string
- $userType : int = Member::TYPE_SINGLE
- $circleId : string = ''
Tags
Return values
void —startSession()
public
startSession([FederatedUser|null $federatedUser = null ]) : void
Parameters
- $federatedUser : FederatedUser|null = null
Tags
Return values
void —startSuperSession()
public
startSuperSession() : void
Return values
void —stopSession()
public
stopSession() : void
Return values
void —updateConfig()
public
updateConfig(Circle $circle) : void
Parameters
- $circle : Circle