Alliance
extends BaseController
in package
Alliance Class
Table of Contents
- DEFAULT_RANKS = ['founder' => 0, 'newcomer' => 1]
- Default alliance ranks
- MODULE_ID = 13
- The module ID
- $objects : Objects
- Contains the whole set of objects by request
- $page : Page
- Contains the Page object
- $planet : array<string|int, mixed>
- Contains the current planet data
- $template : Template
- Contains the Template object
- $user : array<string|int, mixed>
- Contains the current user data
- $userLibrary : User
- Contains the User object
- $alliance : Alliance
- Contains an Alliance object
- $bbcode : BBCodeLib
- Contains a BBCodeLib object
- __construct() : mixed
- Constructor
- index() : void
- Users land here
- loadLang() : void
- Load a language file using CI Library
- loadModel() : void
- Load the provided model, support a dir path
- getObjects() : array<string|int, mixed>
- Will be removed
- getPlanetData() : array<string|int, mixed>
- Will be removed
- getTemplate() : array<string|int, mixed>
- Will be removed
- getUserData() : array<string|int, mixed>
- Will be removed
- allianceNameExists() : bool
- allianceTagExists() : bool
- buildAdminMembersActionBlock() : string
- Build the admin members action block
- buildAdminMembersRankBlock() : string
- Build the admin members rank block
- buildCircularBlock() : array<string|int, mixed>
- Build the circular message block
- buildDescriptionBlock() : array<string|int, mixed>
- Build the description block
- buildImageBlock() : array<string|int, mixed>
- Build the image block
- buildLeaveBlock() : array<string|int, mixed>
- Build the leave block
- buildMembersBlock() : array<string|int, mixed>
- Build the members block
- buildNameBlock() : array<string|int, mixed>
- Build the name block
- buildPage() : void
- Build the page
- buildPublicRequestsBlock() : string
- buildRankBlock() : array<string|int, mixed>
- Build the ranks block
- buildRequestsBlock() : array<string|int, mixed>
- Build the requests block
- buildTagBlock() : array<string|int, mixed>
- Build the tag block
- buildTextBlock() : array<string|int, mixed>
- Build the description block
- buildWebBlock() : array<string|int, mixed>
- Build the web block
- getAdminAllySection() : string
- Get admin main section
- getAdminExitSection() : string
- Get admin delete section
- getAdminMembersSection() : string
- Get admin members section
- getAdminNameSection() : string
- Get admin name section
- getAdminRequestsSection() : string
- Get admin requests section
- getAdminRightsSection() : string
- Get admin rights section
- getAdminSection() : string
- Get alliance admin section
- getAdminTagSection() : string
- Get admin tag section
- getAdminTransferSection() : string
- Get admin transfer section
- getAinfoSection() : string
- Get alliance information section
- getAllianceId() : int
- Get current alliance ID
- getApplySection() : string
- Get alliance apply section
- getCircularSection() : string
- Get alliance circular section
- getCurrentSection() : string
- Determine the current page and validate it
- getDefaultAwaitingApprovalSection() : string
- Get alliance default message for awaiting approval
- getDefaultIsMemberSection() : string
- Get default section for a member user
- getDefaultPublicSection() : type
- Get alliance default menu for search and create
- getDefaultSection() : string
- Get alliance default section, calling the right method
- getExitSection() : string
- Get alliance exit section
- getMakeSection() : string
- Get alliance make section
- getMemberslistSection() : string
- Get alliance member list section
- getSearchSection() : string
- Get alliance search section
- getUserAccess() : string
- Get user level based on their alliance status
- getUserRank() : string
- Get user rank
- isPageAllowed() : bool
- Check if the page that the user is trying to access is allowed
- setUpAlliances() : void
- Creates a new alliance object that will handle all the alliance creation methods and actions
Constants
DEFAULT_RANKS
Default alliance ranks
public
array<string|int, mixed>
DEFAULT_RANKS
= ['founder' => 0, 'newcomer' => 1]
MODULE_ID
The module ID
public
int
MODULE_ID
= 13
Properties
$objects
Contains the whole set of objects by request
protected
Objects
$objects
$page
Contains the Page object
protected
Page
$page
= null
$planet
Contains the current planet data
protected
array<string|int, mixed>
$planet
= []
$template
Contains the Template object
protected
Template
$template
= null
$user
Contains the current user data
protected
array<string|int, mixed>
$user
= []
$userLibrary
Contains the User object
protected
User
$userLibrary
= null
$alliance
Contains an Alliance object
private
Alliance
$alliance
= null
$bbcode
Contains a BBCodeLib object
private
BBCodeLib
$bbcode
= null
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —index()
Users land here
public
index() : void
Return values
void —loadLang()
Load a language file using CI Library
public
loadLang(string|array<string|int, mixed> $language_file) : void
Parameters
- $language_file : string|array<string|int, mixed>
Return values
void —loadModel()
Load the provided model, support a dir path
public
loadModel(string $class) : void
Parameters
- $class : string
-
Mandatory field, if not will throw an exception
Tags
Return values
void —getObjects()
Will be removed
protected
getObjects() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getPlanetData()
Will be removed
protected
getPlanetData() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getTemplate()
Will be removed
protected
getTemplate() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getUserData()
Will be removed
protected
getUserData() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —allianceNameExists()
private
allianceNameExists(string $name) : bool
Parameters
- $name : string
-
Alliance Name
Return values
bool —allianceTagExists()
private
allianceTagExists(string $tag) : bool
Parameters
- $tag : string
-
Alliance Tag
Return values
bool —buildAdminMembersActionBlock()
Build the admin members action block
private
buildAdminMembersActionBlock(int $member_id, string $member_name, int $requested_rank) : string
Parameters
- $member_id : int
-
Member ID
- $member_name : string
-
Member Name
- $requested_rank : int
-
Requested Rank
Return values
string —buildAdminMembersRankBlock()
Build the admin members rank block
private
buildAdminMembersRankBlock(int $member_id, int $member_rank_id, int $requested_rank) : string
Parameters
- $member_id : int
- $member_rank_id : int
- $requested_rank : int
Return values
string —buildCircularBlock()
Build the circular message block
private
buildCircularBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildDescriptionBlock()
Build the description block
private
buildDescriptionBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildImageBlock()
Build the image block
private
buildImageBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildLeaveBlock()
Build the leave block
private
buildLeaveBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildMembersBlock()
Build the members block
private
buildMembersBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildNameBlock()
Build the name block
private
buildNameBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildPage()
Build the page
private
buildPage() : void
Return values
void —buildPublicRequestsBlock()
private
buildPublicRequestsBlock() : string
Return values
string —buildRankBlock()
Build the ranks block
private
buildRankBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildRequestsBlock()
Build the requests block
private
buildRequestsBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildTagBlock()
Build the tag block
private
buildTagBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildTextBlock()
Build the description block
private
buildTextBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildWebBlock()
Build the web block
private
buildWebBlock() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAdminAllySection()
Get admin main section
private
getAdminAllySection() : string
Return values
string —getAdminExitSection()
Get admin delete section
private
getAdminExitSection() : string
Return values
string —getAdminMembersSection()
Get admin members section
private
getAdminMembersSection() : string
Return values
string —getAdminNameSection()
Get admin name section
private
getAdminNameSection() : string
Return values
string —getAdminRequestsSection()
Get admin requests section
private
getAdminRequestsSection() : string
Return values
string —getAdminRightsSection()
Get admin rights section
private
getAdminRightsSection() : string
Return values
string —getAdminSection()
Get alliance admin section
private
getAdminSection() : string
Return values
string —getAdminTagSection()
Get admin tag section
private
getAdminTagSection() : string
Return values
string —getAdminTransferSection()
Get admin transfer section
private
getAdminTransferSection() : string
Return values
string —getAinfoSection()
Get alliance information section
private
getAinfoSection() : string
Return values
string —getAllianceId()
Get current alliance ID
private
getAllianceId() : int
Return values
int —getApplySection()
Get alliance apply section
private
getApplySection() : string
Return values
string —getCircularSection()
Get alliance circular section
private
getCircularSection() : string
Return values
string —getCurrentSection()
Determine the current page and validate it
private
getCurrentSection() : string
Return values
string —getDefaultAwaitingApprovalSection()
Get alliance default message for awaiting approval
private
getDefaultAwaitingApprovalSection() : string
Return values
string —getDefaultIsMemberSection()
Get default section for a member user
private
getDefaultIsMemberSection() : string
Return values
string —getDefaultPublicSection()
Get alliance default menu for search and create
private
getDefaultPublicSection() : type
Return values
type —getDefaultSection()
Get alliance default section, calling the right method
private
getDefaultSection() : string
Return values
string —getExitSection()
Get alliance exit section
private
getExitSection() : string
Return values
string —getMakeSection()
Get alliance make section
private
getMakeSection() : string
Return values
string —getMemberslistSection()
Get alliance member list section
private
getMemberslistSection() : string
Return values
string —getSearchSection()
Get alliance search section
private
getSearchSection() : string
Return values
string —getUserAccess()
Get user level based on their alliance status
private
getUserAccess() : string
Return values
string —getUserRank()
Get user rank
private
getUserRank(int $member_id, int $member_rank_id) : string
Parameters
- $member_id : int
-
Member ID
- $member_rank_id : int
-
Member Rank ID
Return values
string —isPageAllowed()
Check if the page that the user is trying to access is allowed
private
isPageAllowed() : bool
Return values
bool —setUpAlliances()
Creates a new alliance object that will handle all the alliance creation methods and actions
private
setUpAlliances() : void