MemberHelper
in package
Uses
TArrayTools
Class MemberHelper
Table of Contents
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $member : Member
- __call() : void
- __construct() : mixed
- Member constructor.
- cannotBeAdmin() : void
- cannotBeMember() : void
- cannotBeModerator() : void
- cannotBeOwner() : void
- mustBeAdmin() : void
- mustBeHigherLevelThan() : mixed
- mustBeHigherOrSameLevelThan() : mixed
- mustBeMember() : void
- mustBeModerator() : void
- mustBeOwner() : void
- mustHaveLevelAbove() : mixed
- mustHaveLevelAboveOrEqual() : mixed
- mustHaveLevelEqualOrAbove() : mixed
- 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>
- getObj() : mixed
- mustContains() : mixed
- cannotBe() : void
- mustBe() : void
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'
$member
private
Member
$member
Methods
__call()
public
__call(string $name, array<string|int, mixed> $arguments) : void
Parameters
- $name : string
- $arguments : array<string|int, mixed>
Tags
Return values
void —__construct()
Member constructor.
public
__construct(Member $member) : mixed
Parameters
- $member : Member
Return values
mixed —cannotBeAdmin()
public
cannotBeAdmin() : void
@throws MemberHelperException, MemberLevelException
Return values
void —cannotBeMember()
public
cannotBeMember() : void
@throws MemberHelperException, MemberLevelException
Return values
void —cannotBeModerator()
public
cannotBeModerator() : void
@throws MemberHelperException, MemberLevelException
Return values
void —cannotBeOwner()
public
cannotBeOwner() : void
@throws MemberHelperException, MemberLevelException
Return values
void —mustBeAdmin()
public
mustBeAdmin() : void
@throws MemberHelperException, MemberLevelException
Return values
void —mustBeHigherLevelThan()
public
mustBeHigherLevelThan(Member $compare) : mixed
Parameters
- $compare : Member
Tags
Return values
mixed —mustBeHigherOrSameLevelThan()
public
mustBeHigherOrSameLevelThan(Member $compare) : mixed
Parameters
- $compare : Member
Tags
Return values
mixed —mustBeMember()
public
mustBeMember() : void
@throws MemberHelperException, MemberLevelException
Return values
void —mustBeModerator()
public
mustBeModerator() : void
@throws MemberHelperException, MemberLevelException
Return values
void —mustBeOwner()
public
mustBeOwner() : void
@throws MemberHelperException, MemberLevelException
Return values
void —mustHaveLevelAbove()
public
mustHaveLevelAbove(int $level) : mixed
Parameters
- $level : int
Tags
Return values
mixed —mustHaveLevelAboveOrEqual()
public
mustHaveLevelAboveOrEqual(int $level) : mixed
Parameters
- $level : int
Tags
Return values
mixed —mustHaveLevelEqualOrAbove()
public
mustHaveLevelEqualOrAbove(int $level) : mixed
Parameters
- $level : int
Tags
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 —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> —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 —cannotBe()
private
cannotBe(string $levelString, array<string|int, mixed> $arguments) : void
Parameters
- $levelString : string
- $arguments : array<string|int, mixed>
Tags
Return values
void —mustBe()
private
mustBe(string $levelString, array<string|int, mixed> $arguments) : void
Parameters
- $levelString : string
- $arguments : array<string|int, mixed>