XG Proyect

Preferences
in package

Preferences Class

Tags
category

Classes

author

XG Proyect Team

license

http://www.xgproyect.org XG Proyect

link
http://www.xgproyect.org
version
3.1.0

Table of Contents

$current_user_id  : int
$preferences  : array<string|int, mixed>
__construct()  : void
Constructor
getCurrentPreference()  : PreferencesEntity
Return current preference data
getPreferences()  : array<string|int, mixed>
Get all the preferences
isNickNameChangeAllowed()  : bool
Check if the username change is allowed
isOwner()  : bool
Check if is the preference owner
isVacationModeOn()  : bool
Check if the vacation mode is enabled
isVacationModeRemovalAllowed()  : bool
Check if the vacation mode removal is allowed
createNewPreferencesEntity()  : PreferencesEntity
Create a new instance of PreferencesEntity
getUserId()  : int
Get the user id
setUp()  : void
Set up the list of preferences
setUserId()  : void
Set the user id

Properties

$preferences

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

Methods

__construct()

Constructor

public __construct(array<string|int, mixed> $preferences, int $current_user_id) : void
Parameters
$preferences : array<string|int, mixed>
$current_user_id : int
Return values
void

getCurrentPreference()

Return current preference data

public getCurrentPreference() : PreferencesEntity
Return values
PreferencesEntity

getPreferences()

Get all the preferences

public getPreferences() : array<string|int, mixed>
Return values
array<string|int, mixed>

isNickNameChangeAllowed()

Check if the username change is allowed

public isNickNameChangeAllowed() : bool
Return values
bool

isOwner()

Check if is the preference owner

public isOwner() : bool
Return values
bool

isVacationModeOn()

Check if the vacation mode is enabled

public isVacationModeOn() : bool
Return values
bool

isVacationModeRemovalAllowed()

Check if the vacation mode removal is allowed

public isVacationModeRemovalAllowed() : bool
Return values
bool

createNewPreferencesEntity()

Create a new instance of PreferencesEntity

private createNewPreferencesEntity(array<string|int, mixed> $preference) : PreferencesEntity
Parameters
$preference : array<string|int, mixed>

Preference

Return values
PreferencesEntity

getUserId()

Get the user id

private getUserId() : int
Return values
int

setUp()

Set up the list of preferences

private setUp(array<string|int, mixed> $preferences) : void
Parameters
$preferences : array<string|int, mixed>

Preferences

Return values
void

setUserId()

Set the user id

private setUserId(int $user_id) : void
Parameters
$user_id : int

User Id

Return values
void

Search results