PHP Class Frontend\Modules\Profiles\Engine\Profile

Datei anzeigen Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Property 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.

Public Methods

Method 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

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

Method Details

__construct() public method

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

getDisplayName() public method

Get display name.
public getDisplayName ( ) : string
return string

getEmail() public method

Get email.
public getEmail ( ) : string
return string

getId() public method

Get profile id.
public getId ( ) : integer
return integer

getRegisteredOn() public method

Get registered on date.
public getRegisteredOn ( ) : integer
return integer

getSetting() public method

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.
return mixed

getSettings() public method

Get all settings.
public getSettings ( ) : array
return array

getStatus() public method

Get status.
public getStatus ( ) : string
return string

getUrl() public method

Get profile url.
public getUrl ( ) : string
return string

isInGroup() public method

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

loadProfileByUrl() public method

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

setDisplayName() public method

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

setEmail() public method

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

setRegisteredOn() public method

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

setSetting() public method

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

setSettings() public method

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

setStatus() public method

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

setUrl() public method

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

toArray() public method

Convert the object into an array for usage in the template
public toArray ( ) : array
return 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
return array