Messages
extends Model
in package
Messages Class
Table of Contents
- $db : Database
- Contains the Database instance
- __construct() : mixed
- Constructor
- __destruct() : mixed
- Destructor
- countAddressBookAndNotes() : mixed
- Count alliance members, buddys, operators and notes
- countMessagesByType() : mixed
- Count messages sum by type
- deleteAllByOwner() : void
- Delete all messages for the current user
- deleteByOwnerAndIds() : mixed
- Delete message by id and current user
- deleteByOwnerAndMessageType() : mixed
- Delete message by id and current user
- getAllianceMembers() : mixed
- Get all alliance members that the user can contact
- getByUserId() : mixed
- Get the list of messages by user id
- getByUserIdAndType() : mixed
- Get the list of messages by user id and type
- getFriends() : mixed
- Get all the user friends
- getHomePlanet() : mixed
- Get home planet details
- getNotes() : mixed
- Get all the user notes
- getOperators() : mixed
- Get all the game operators
- markAsRead() : mixed
- Mark messages as read by user id and type
- markAsReadByType() : mixed
- Mark messages as read by user id and type
- setNewDb() : void
- Creates a new Database object
Properties
$db
Contains the Database instance
protected
Database
$db
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —__destruct()
Destructor
public
__destruct() : mixed
Return values
mixed —countAddressBookAndNotes()
Count alliance members, buddys, operators and notes
public
countAddressBookAndNotes(int $user_id, int $user_ally_id) : mixed
Parameters
- $user_id : int
-
User ID
- $user_ally_id : int
-
User Alliance ID
Return values
mixed —countMessagesByType()
Count messages sum by type
public
countMessagesByType(int $user_id) : mixed
Parameters
- $user_id : int
-
User ID
Return values
mixed —deleteAllByOwner()
Delete all messages for the current user
public
deleteAllByOwner(type $user_id) : void
Parameters
- $user_id : type
-
User ID
Return values
void —deleteByOwnerAndIds()
Delete message by id and current user
public
deleteByOwnerAndIds(int $user_id, int $messages_ids) : mixed
Parameters
- $user_id : int
-
The user ID
- $messages_ids : int
-
The messages ID
Return values
mixed —deleteByOwnerAndMessageType()
Delete message by id and current user
public
deleteByOwnerAndMessageType(int $user_id, int $message_type) : mixed
Parameters
- $user_id : int
-
The user ID
- $message_type : int
-
The messages type
Return values
mixed —getAllianceMembers()
Get all alliance members that the user can contact
public
getAllianceMembers(int $user_id, int $user_ally_id) : mixed
Parameters
- $user_id : int
-
User ID
- $user_ally_id : int
-
User Alliance ID
Return values
mixed —getByUserId()
Get the list of messages by user id
public
getByUserId(int $user_id) : mixed
Parameters
- $user_id : int
-
User id
Return values
mixed —getByUserIdAndType()
Get the list of messages by user id and type
public
getByUserIdAndType(int $user_id, string $msg_type_string) : mixed
Parameters
- $user_id : int
-
User id
- $msg_type_string : string
-
Message types
Return values
mixed —getFriends()
Get all the user friends
public
getFriends(int $user_id) : mixed
Parameters
- $user_id : int
-
User ID
Return values
mixed —getHomePlanet()
Get home planet details
public
getHomePlanet(int $planet_id) : mixed
Parameters
- $planet_id : int
-
Planet ID
Return values
mixed —getNotes()
Get all the user notes
public
getNotes(int $user_id) : mixed
Parameters
- $user_id : int
-
User ID
Return values
mixed —getOperators()
Get all the game operators
public
getOperators(int $user_id) : mixed
Parameters
- $user_id : int
-
User ID
Return values
mixed —markAsRead()
Mark messages as read by user id and type
public
markAsRead(int $user_id) : mixed
Parameters
- $user_id : int
-
User id
Return values
mixed —markAsReadByType()
Mark messages as read by user id and type
public
markAsReadByType(int $user_id, string $msg_type_string) : mixed
Parameters
- $user_id : int
-
User id
- $msg_type_string : string
-
Message types
Return values
mixed —setNewDb()
Creates a new Database object
private
setNewDb() : void