Alliances
in package
Alliance Class
Tags
Table of Contents
- $_alliances : array<string|int, mixed>
- $_current_user_id : int
- $_current_user_rank_id : int
- __construct() : void
- Constructor
- checkRank() : bool
- Check the rank for the current user
- getAlliances() : array<string|int, mixed>
- Get all the alliances
- getCurrentAlliance() : array<string|int, mixed>
- Return current alliance data
- getCurrentAllianceRankObject() : Ranks
- Get current alliance rank
- hasAccess() : bool
- Check if the user has access to certain section of the alliance
- isOwner() : string
- Check if is the alliance owner
- createNewAllianceEntity() : AllianceEntity
- Create a new instance of AllianceEntity
- getUserId() : int
- getUserRankId() : int
- setUp() : void
- Set up the list of alliances
- setUserId() : mixed
- setUserRankId() : mixed
Properties
$_alliances
private
array<string|int, mixed>
$_alliances
= []
$_current_user_id
private
int
$_current_user_id
= 0
$_current_user_rank_id
private
int
$_current_user_rank_id
= 0
Methods
__construct()
Constructor
public
__construct(array<string|int, mixed> $alliances, int $current_user_id, int $current_user_rank_id) : void
Parameters
- $alliances : array<string|int, mixed>
-
Alliances
- $current_user_id : int
-
Current User ID
- $current_user_rank_id : int
-
Current User Rank Id
Return values
void —checkRank()
Check the rank for the current user
public
checkRank(mixed $rank) : bool
Parameters
- $rank : mixed
Return values
bool —getAlliances()
Get all the alliances
public
getAlliances() : array<string|int, mixed>
Return values
array<string|int, mixed> —getCurrentAlliance()
Return current alliance data
public
getCurrentAlliance() : array<string|int, mixed>
Return values
array<string|int, mixed> —getCurrentAllianceRankObject()
Get current alliance rank
public
getCurrentAllianceRankObject() : Ranks
Return values
Ranks —hasAccess()
Check if the user has access to certain section of the alliance
public
hasAccess(int $rank) : bool
Parameters
- $rank : int
-
Rank
Return values
bool —isOwner()
Check if is the alliance owner
public
isOwner() : string
Return values
string —createNewAllianceEntity()
Create a new instance of AllianceEntity
private
createNewAllianceEntity(array<string|int, mixed> $alliance) : AllianceEntity
Parameters
- $alliance : array<string|int, mixed>
-
Alliance
Return values
AllianceEntity —getUserId()
private
getUserId() : int
Return values
int —getUserRankId()
private
getUserRankId() : int
Return values
int —setUp()
Set up the list of alliances
private
setUp(array<string|int, mixed> $alliances) : void
Parameters
- $alliances : array<string|int, mixed>
-
Alliances
Return values
void —setUserId()
private
setUserId(int $user_id) : mixed
Parameters
- $user_id : int
-
User Id
Return values
mixed —setUserRankId()
private
setUserRankId(int $user_rank_id) : mixed
Parameters
- $user_rank_id : int
-
User Rank Id