FederatedUser
extends ManagedModel
in package
implements
IFederatedUser, IEntity, IDeserializable, IQueryRow, JsonSerializable
Uses
TArrayTools, TDeserialize
Class FederatedUser
Interfaces, Classes, Traits and Enums
- IFederatedUser
- Interface IFederatedUser
- IEntity
- Interface IMemberships
- IDeserializable
- IQueryRow
- Interface IQueryRow
- JsonSerializable
Table of Contents
- ID_LENGTH = 31
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $basedOn : Circle
- $config : int
- $displayName : string
- $inheritance : Membership
- $instance : string
- $memberships : array<string|int, Membership>
- $modelManager : ModelManager
- $singleId : string
- $userId : string
- $userType : int
- __construct() : mixed
- FederatedUser constructor.
- compareWith() : bool
- deserialize() : IDeserializable
- deserializeArray() : array<string|int, IDeserializable>
- deserializeJson() : IDeserializable
- deserializeList() : array<string|int, IDeserializable>
- getBasedOn() : Circle
- getConfig() : int
- getDisplayName() : string
- getInheritance() : Membership
- getInstance() : string
- getLink() : Membership
- getMemberships() : array<string|int, Membership>
- getSingleId() : string
- getUserId() : string
- getUserType() : int
- hasBasedOn() : bool
- hasInheritance() : bool
- hasMemberships() : bool
- import() : $this
- importFromCircle() : FederatedUser
- importFromDatabase() : IQueryRow
- import data to feed the model.
- importFromIFederatedUser() : void
- isLocal() : bool
- jsonSerialize() : array<string|int, string>
- serialize() : array<string|int, mixed>
- serializeArray() : array<string|int, mixed>
- set() : $this
- setBasedOn() : $this
- setConfig() : self
- setDisplayName() : FederatedUser
- setInheritance() : $this
- setInstance() : self
- setMemberships() : self
- setSingleId() : self
- setUserId() : self
- setUserType() : self
- typeOf() : string
- validKey() : bool
- cleanArray() : mixed
- extractArray() : mixed
- get() : string
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getList() : array<string|int, mixed>
- getManager() : ModelManager
- getObj() : mixed
- mustContains() : mixed
Constants
ID_LENGTH
public
mixed
ID_LENGTH
= 31
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'
$basedOn
private
Circle
$basedOn
$config
private
int
$config
= 0
$displayName
private
string
$displayName
= ''
$inheritance
private
Membership
$inheritance
$instance
private
string
$instance
$memberships
private
array<string|int, Membership>
$memberships
= null
$modelManager
private
ModelManager
$modelManager
$singleId
private
string
$singleId
= ''
$userId
private
string
$userId
$userType
private
int
$userType
Methods
__construct()
FederatedUser constructor.
public
__construct() : mixed
Return values
mixed —compareWith()
public
compareWith(IFederatedUser $member) : bool
Parameters
- $member : IFederatedUser
Return values
bool —deserialize()
public
deserialize(array<string|int, mixed> $data, string $class) : IDeserializable
Parameters
- $data : array<string|int, mixed>
- $class : string
Tags
Return values
IDeserializable —deserializeArray()
public
deserializeArray(array<string|int, mixed> $data, string $class[, bool $associative = false ]) : array<string|int, IDeserializable>
Parameters
- $data : array<string|int, mixed>
- $class : string
- $associative : bool = false
Return values
array<string|int, IDeserializable> —deserializeJson()
public
deserializeJson(string $json, string $class) : IDeserializable
Parameters
- $json : string
- $class : string
Tags
Return values
IDeserializable —deserializeList()
public
deserializeList(string $json, string $class) : array<string|int, IDeserializable>
Parameters
- $json : string
- $class : string
Tags
Return values
array<string|int, IDeserializable> —getBasedOn()
public
getBasedOn() : Circle
Return values
Circle —getConfig()
public
getConfig() : int
Return values
int —getDisplayName()
public
getDisplayName() : string
Return values
string —getInheritance()
public
getInheritance() : Membership
Return values
Membership —getInstance()
public
getInstance() : string
Return values
string —getLink()
public
getLink(string $singleId[, bool $detailed = false ]) : Membership
Parameters
- $singleId : string
- $detailed : bool = false
Tags
Return values
Membership —getMemberships()
public
getMemberships() : array<string|int, Membership>
Return values
array<string|int, Membership> —getSingleId()
public
getSingleId() : string
Return values
string —getUserId()
public
getUserId() : string
Return values
string —getUserType()
public
getUserType() : int
Return values
int —hasBasedOn()
public
hasBasedOn() : bool
Return values
bool —hasInheritance()
public
hasInheritance() : bool
Return values
bool —hasMemberships()
public
hasMemberships() : bool
Return values
bool —import()
public
import(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
Tags
Return values
$this —importFromCircle()
public
importFromCircle(Circle $circle) : FederatedUser
Parameters
- $circle : Circle
Tags
Return values
FederatedUser —importFromDatabase()
import data to feed the model.
public
importFromDatabase(array<string|int, mixed> $data[, string $prefix = '' ]) : IQueryRow
Parameters
- $data : array<string|int, mixed>
- $prefix : string = ''
Tags
Return values
IQueryRow —importFromIFederatedUser()
public
importFromIFederatedUser(IFederatedUser $orig) : void
Parameters
- $orig : IFederatedUser
Tags
Return values
void —isLocal()
public
isLocal() : bool
Return values
bool —jsonSerialize()
public
jsonSerialize() : array<string|int, string>
Tags
Return values
array<string|int, string> —serialize()
public
serialize(JsonSerializable $model) : array<string|int, mixed>
Parameters
- $model : JsonSerializable
Return values
array<string|int, mixed> —serializeArray()
public
serializeArray(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
Return values
array<string|int, mixed> —set()
public
set(string $userId[, string $instance = '' ][, int $type = Member::TYPE_USER ][, string $displayName = '' ][, Circle|null $basedOn = null ]) : $this
Parameters
- $userId : string
- $instance : string = ''
- $type : int = Member::TYPE_USER
- $displayName : string = ''
- $basedOn : Circle|null = null
Return values
$this —setBasedOn()
public
setBasedOn(Circle|null $basedOn) : $this
Parameters
- $basedOn : Circle|null
Return values
$this —setConfig()
public
setConfig(int $config) : self
Parameters
- $config : int
Return values
self —setDisplayName()
public
setDisplayName(string $displayName) : FederatedUser
Parameters
- $displayName : string
Return values
FederatedUser —setInheritance()
public
setInheritance(Membership $inheritance) : $this
Parameters
- $inheritance : Membership
Return values
$this —setInstance()
public
setInstance(string $instance) : self
Parameters
- $instance : string
Return values
self —setMemberships()
public
setMemberships(array<string|int, mixed> $memberships) : self
Parameters
- $memberships : array<string|int, mixed>
Return values
self —setSingleId()
public
setSingleId(string $singleId) : self
Parameters
- $singleId : string
Return values
self —setUserId()
public
setUserId(string $userId) : self
Parameters
- $userId : string
Return values
self —setUserType()
public
setUserType(int $userType) : self
Parameters
- $userType : int
Return values
self —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 —validKey()
public
validKey(string $k, array<string|int, mixed> $arr) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
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> —getManager()
protected
getManager() : ModelManager
Return values
ModelManager —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>