PHP Class Frontend\Modules\Profiles\Engine\Profile

Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Свойство Type Description
$groups array The groups this profile belongs to, if any. The keys are the group IDs, the values the HTML-escaped group names.

Méthodes publiques

Méthode Description
__construct ( integer $profileId = null ) Constructor.
getDisplayName ( ) : string Get display name.
getEmail ( ) : string Get email.
getId ( ) : integer Get profile id.
getRegisteredOn ( ) : integer Get registered on date.
getSetting ( string $name, string $defaultValue = null ) : mixed Get a profile setting by name.
getSettings ( ) : array Get all settings.
getStatus ( ) : string Get status.
getUrl ( ) : string Get profile url.
isInGroup ( integer $groupId ) : boolean Does this user belong to the group with the given ID?
loadProfileByUrl ( string $url ) Load a profile by URL
setDisplayName ( string $value ) Set a display name.
setEmail ( string $value ) Set a profile email.
setRegisteredOn ( integer $value ) Set a register date.
setSetting ( string $name, string $value ) Set a profile setting.
setSettings ( array $values ) Insert or update multiple profile settings.
setStatus ( string $value ) Set a profile status.
setUrl ( string $value ) Set a profile url.
toArray ( ) : array Convert the object into an array for usage in the template

Private Methods

Méthode Description
loadProfile ( integer $id ) Load a user profile by id.
setId ( integer $value ) Set a profile id.

Method Details

__construct() public méthode

Constructor.
public __construct ( integer $profileId = null )
$profileId integer The profile id to load data from.

getDisplayName() public méthode

Get display name.
public getDisplayName ( ) : string
Résultat string

getEmail() public méthode

Get email.
public getEmail ( ) : string
Résultat string

getId() public méthode

Get profile id.
public getId ( ) : integer
Résultat integer

getRegisteredOn() public méthode

Get registered on date.
public getRegisteredOn ( ) : integer
Résultat integer

getSetting() public méthode

Get a profile setting by name.
public getSetting ( string $name, string $defaultValue = null ) : mixed
$name string Setting name.
$defaultValue string Default value is used when the setting does not exist.
Résultat mixed

getSettings() public méthode

Get all settings.
public getSettings ( ) : array
Résultat array

getStatus() public méthode

Get status.
public getStatus ( ) : string
Résultat string

getUrl() public méthode

Get profile url.
public getUrl ( ) : string
Résultat string

isInGroup() public méthode

Does this user belong to the group with the given ID?
public isInGroup ( integer $groupId ) : boolean
$groupId integer Group id.
Résultat boolean

loadProfileByUrl() public méthode

Load a profile by URL
public loadProfileByUrl ( string $url )
$url string

setDisplayName() public méthode

Set a display name.
public setDisplayName ( string $value )
$value string Display name value.

setEmail() public méthode

Set a profile email.
public setEmail ( string $value )
$value string Email address.

setRegisteredOn() public méthode

Set a register date.
public setRegisteredOn ( integer $value )
$value integer Register date timestamp.

setSetting() public méthode

Set a profile setting.
public setSetting ( string $name, string $value )
$name string Setting name.
$value string New setting value.

setSettings() public méthode

Insert or update multiple profile settings.
public setSettings ( array $values )
$values array Settings in key=>value form.

setStatus() public méthode

Set a profile status.
public setStatus ( string $value )
$value string Status.

setUrl() public méthode

Set a profile url.
public setUrl ( string $value )
$value string Url.

toArray() public méthode

Convert the object into an array for usage in the template
public toArray ( ) : array
Résultat array

Property Details

$groups protected_oe property

The groups this profile belongs to, if any. The keys are the group IDs, the values the HTML-escaped group names.
protected array $groups
Résultat array