MembershipService
in package
Uses
TNCLogger
Class MembershipService
Table of Contents
- $ALERT : mixed
- $CRITICAL : mixed
- $DEBUG : mixed
- $EMERGENCY : mixed
- $ERROR : mixed
- $INFO : mixed
- $NOTICE : mixed
- $WARNING : mixed
- $circleRequest : CircleRequest
- $eventService : EventService
- $memberRequest : MemberRequest
- $membershipRequest : MembershipRequest
- $outputService : OutputService
- $shareWrapperService : ShareWrapperService
- __construct() : mixed
- MembershipService constructor.
- alert() : void
- debug() : void
- deleteFederatedUser() : mixed
- e() : void
- emergency() : void
- exception() : void
- getMembership() : Membership
- log() : void
- logger() : LoggerInterface
- manageMemberships() : int
- notice() : void
- onUpdate() : void
- resetMemberships() : mixed
- t() : void
- throwable() : void
- updatePopulation() : void
- warning() : void
- createNewMemberships() : array<string|int, Membership>
- fillMemberships() : mixed
- Add the new membership if unknown or Update known membership if: - new membership comes with more power - level is the same, but inheritance is shorter
- generateMemberships() : array<string|int, mixed>
- getChildrenMembers() : array<string|int, mixed>
- getChildrenMemberships() : array<string|int, mixed>
- getMembershipsFromList() : Membership
- removeDeprecatedMemberships() : array<string|int, Membership>
- updateMembershipsDatabase() : int
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
$WARNING
public
static mixed
$WARNING
= 2
$circleRequest
private
CircleRequest
$circleRequest
$eventService
private
EventService
$eventService
$memberRequest
private
MemberRequest
$memberRequest
$membershipRequest
private
MembershipRequest
$membershipRequest
$outputService
private
OutputService
$outputService
$shareWrapperService
private
ShareWrapperService
$shareWrapperService
Methods
__construct()
MembershipService constructor.
public
__construct(MembershipRequest $membershipRequest, CircleRequest $circleRequest, MemberRequest $memberRequest, EventService $eventService, ShareWrapperService $shareWrapperService, OutputService $outputService) : mixed
Parameters
- $membershipRequest : MembershipRequest
- $circleRequest : CircleRequest
- $memberRequest : MemberRequest
- $eventService : EventService
- $shareWrapperService : ShareWrapperService
- $outputService : OutputService
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 —debug()
public
debug(string $message[, array<string|int, mixed> $serializable = [] ]) : void
Parameters
- $message : string
- $serializable : array<string|int, mixed> = []
Return values
void —deleteFederatedUser()
public
deleteFederatedUser(FederatedUser $federatedUser) : mixed
Parameters
- $federatedUser : FederatedUser
Return values
mixed —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 —getMembership()
public
getMembership(string $circleId, string $singleId[, bool $detailed = false ]) : Membership
Parameters
- $circleId : string
- $singleId : string
- $detailed : bool = false
Tags
Return values
Membership —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 —manageMemberships()
public
manageMemberships(string $singleId) : int
Parameters
- $singleId : string
Tags
Return values
int —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 —onUpdate()
public
onUpdate(string $singleId) : void
Parameters
- $singleId : string
Tags
Return values
void —resetMemberships()
public
resetMemberships([string $singleId = '' ][, bool $all = false ]) : mixed
Parameters
- $singleId : string = ''
- $all : bool = false
Return values
mixed —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 —updatePopulation()
public
updatePopulation(Circle $circle) : void
Parameters
- $circle : Circle
Return values
void —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 —createNewMemberships()
private
createNewMemberships(array<string|int, Membership> $memberships, array<string|int, Membership> $known) : array<string|int, Membership>
Parameters
- $memberships : array<string|int, Membership>
- $known : array<string|int, Membership>
Return values
array<string|int, Membership> —fillMemberships()
Add the new membership if unknown or Update known membership if: - new membership comes with more power - level is the same, but inheritance is shorter
private
fillMemberships(Membership $membership, array<string|int, Membership> &$memberships) : mixed
Parameters
- $membership : Membership
- $memberships : array<string|int, Membership>
Return values
mixed —generateMemberships()
private
generateMemberships(string $singleId[, string $circleId = '' ][, array<string|int, mixed> &$memberships = [] ][, array<string|int, mixed> $knownIds = [] ][, array<string|int, mixed> $path = [] ]) : array<string|int, mixed>
Parameters
- $singleId : string
- $circleId : string = ''
- $memberships : array<string|int, mixed> = []
- $knownIds : array<string|int, mixed> = []
- $path : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed> —getChildrenMembers()
private
getChildrenMembers(string $id[, array<string|int, mixed> &$knownIds = [] ]) : array<string|int, mixed>
Parameters
- $id : string
- $knownIds : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed> —getChildrenMemberships()
private
getChildrenMemberships(string $id[, array<string|int, mixed> &$knownIds = [] ]) : array<string|int, mixed>
Parameters
- $id : string
- $knownIds : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getMembershipsFromList()
private
getMembershipsFromList(array<string|int, Membership> $list, string $circleId) : Membership
Parameters
- $list : array<string|int, Membership>
- $circleId : string
Tags
Return values
Membership —removeDeprecatedMemberships()
private
removeDeprecatedMemberships(array<string|int, Membership> $memberships, array<string|int, Membership> $known) : array<string|int, Membership>
Parameters
- $memberships : array<string|int, Membership>
- $known : array<string|int, Membership>
Return values
array<string|int, Membership> —updateMembershipsDatabase()
private
updateMembershipsDatabase(string $singleId, array<string|int, Membership> $memberships) : int
Parameters
- $singleId : string
- $memberships : array<string|int, Membership>