Buddies
extends BaseController
in package
Buddies Class
Table of Contents
- MODULE_ID = 20
- 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
- $buddy : Buddy
- Contains a Buddy 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
- acceptRequest() : void
- Accept a buddy request
- buildListOfBuddies() : array<string|int, mixed>
- Build the list of buddies
- buildListOfRequestsReceived() : string
- Build the list of requests received
- buildListOfRequestsSent() : string
- Build the list of requests sent
- buildPage() : void
- Build the page
- buildRequestForm() : void
- Build the buddy request form page
- execAction() : mixed
- Exec provided action
- extractPlayerData() : arrau
- Extract player data based on provided object
- generateUrl() : string
- Generate the URL
- hasAny() : bool
- Check if there's anything
- removeRequest() : void
- Reject, Cancel, Delete or Remove a buddy request
- runAction() : void
- Run an action
- sendMessage() : void
- Send message
- sendRequest() : void
- Send a buddy request
- setAction() : string
- Set action button based on the request status
- setText() : string
- Set the text
- setUpBudies() : void
- Creates a new buddy object that will handle all the buddies creation methods and actions
Constants
MODULE_ID
The module ID
public
int
MODULE_ID
= 20
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
$buddy
Contains a Buddy object
private
Buddy
$buddy
= 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> —acceptRequest()
Accept a buddy request
private
acceptRequest() : void
Return values
void —buildListOfBuddies()
Build the list of buddies
private
buildListOfBuddies() : array<string|int, mixed>
Return values
array<string|int, mixed> —buildListOfRequestsReceived()
Build the list of requests received
private
buildListOfRequestsReceived() : string
Return values
string —buildListOfRequestsSent()
Build the list of requests sent
private
buildListOfRequestsSent() : string
Return values
string —buildPage()
Build the page
private
buildPage() : void
Return values
void —buildRequestForm()
Build the buddy request form page
private
buildRequestForm() : void
Return values
void —execAction()
Exec provided action
private
execAction(string $action) : mixed
Parameters
- $action : string
-
Action
Tags
Return values
mixed —extractPlayerData()
Extract player data based on provided object
private
extractPlayerData(BuddyEntity $buddy) : arrau
Parameters
- $buddy : BuddyEntity
-
Buddy Entity Object
Return values
arrau —generateUrl()
Generate the URL
private
generateUrl(int $buddy_id, int $sm, string $lang_line) : string
Parameters
- $buddy_id : int
-
Buddy ID
- $sm : int
-
Action
- $lang_line : string
-
Lang Line
Return values
string —hasAny()
Check if there's anything
private
hasAny(array<string|int, mixed> $array) : bool
Parameters
- $array : array<string|int, mixed>
-
Array
Return values
bool —removeRequest()
Reject, Cancel, Delete or Remove a buddy request
private
removeRequest() : void
Return values
void —runAction()
Run an action
private
runAction() : void
Return values
void —sendMessage()
Send message
private
sendMessage(int $to, int $type) : void
Parameters
- $to : int
-
To
- $type : int
-
Type
Return values
void —sendRequest()
Send a buddy request
private
sendRequest() : void
Return values
void —setAction()
Set action button based on the request status
private
setAction(BuddyEntity $buddy) : string
Parameters
- $buddy : BuddyEntity
-
Buddy
Return values
string —setText()
Set the text
private
setText(BuddyEntity $buddy, mixed $online_time) : string
Parameters
- $buddy : BuddyEntity
-
Buddy
- $online_time : mixed
Return values
string —setUpBudies()
Creates a new buddy object that will handle all the buddies creation methods and actions
private
setUpBudies() : void