XG Proyect

Search extends BaseController
in package

Search Class

Table of Contents

MODULE_ID  = 17
$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
$noob  : NoobsProtectionLib
$results  : array<string|int, mixed>
Contains the search results
$search_terms  : array<string|int, mixed>
Contains the search terms provided by the player
__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
buildPage()  : void
Build the page
buildResultsBlock()  : string
Build the results block
getAllianceApplicationAction()  : string
Get alliance application action based on alliance permission
getPlayersActions()  : string
Undocumented function
parseResults()  : array<string|int, mixed>
Parse the list of results
runAction()  : void
Run an action
setPosition()  : string
Set the user position or not based on its level

Constants

MODULE_ID

public mixed MODULE_ID = 17

Properties

$planet

Contains the current planet data

protected array<string|int, mixed> $planet = []

$user

Contains the current user data

protected array<string|int, mixed> $user = []

$userLibrary

Contains the User object

protected User $userLibrary = null

$noob

private NoobsProtectionLib $noob = null

$results

Contains the search results

private array<string|int, mixed> $results = []

$search_terms

Contains the search terms provided by the player

private array<string|int, mixed> $search_terms = ['search_type' => '', 'player_name' => '', 'alliance_tag' => '', 'planet_names' => '', 'search_text' => '', 'error_block' => '']

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
throws
Exception
Return values
void

getObjects()

Will be removed

protected getObjects() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

getPlanetData()

Will be removed

protected getPlanetData() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

getTemplate()

Will be removed

protected getTemplate() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

getUserData()

Will be removed

protected getUserData() : array<string|int, mixed>
Tags
deprecated

since 3.2.0 will be removed on 4.0.0

Return values
array<string|int, mixed>

buildPage()

Build the page

private buildPage() : void
Return values
void

buildResultsBlock()

Build the results block

private buildResultsBlock() : string
Return values
string

getAllianceApplicationAction()

Get alliance application action based on alliance permission

private getAllianceApplicationAction(int $alliance_id, int $alliance_requests) : string
Parameters
$alliance_id : int
$alliance_requests : int
Return values
string

getPlayersActions()

Undocumented function

private getPlayersActions(int $user_id) : string
Parameters
$user_id : int
Return values
string

parseResults()

Parse the list of results

private parseResults() : array<string|int, mixed>
Return values
array<string|int, mixed>

runAction()

Run an action

private runAction() : void
Return values
void

setPosition()

Set the user position or not based on its level

private setPosition(int $user_rank, int $user_level) : string
Parameters
$user_rank : int
$user_level : int
Return values
string

Search results