PHP 클래스 Frontend\Modules\Profiles\Engine\Model

파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
deleteSetting ( integer $id, string $name ) : integer Delete a setting.
existsByEmail ( string $email, integer $ignoreId = null ) : boolean Check if a profile exists by email address.
existsDisplayName ( string $displayName, integer $id = null ) : boolean Check if a display name exists.
get ( integer $profileId ) : Profile Get profile by its id.
getAvatar ( integer $id, string $email = null, string $size = '240x240' ) : string Get avatar
getEncryptedString ( string $string, string $salt ) : string Get an encrypted string.
getIdByEmail ( string $email ) : integer Get profile id by email.
getIdBySetting ( string $name, string $value ) : integer Get profile id by setting.
getRandomString ( integer $length = 15, boolean $numeric = true, boolean $lowercase = true, boolean $uppercase = true, boolean $special = true ) : string Generate a random string.
getSetting ( integer $id, string $name ) : string Get a setting for a profile.
getSettings ( integer $id ) : array Get all settings for a profile.
getUrl ( string $displayName, integer $id = null ) : string Retrieve a unique URL for a profile based on the display name.
insert ( array $values ) : integer Insert a new profile.
parse ( ) Parse the general profiles info into the template.
setSetting ( integer $id, string $name, string $value ) Insert or update a single profile setting.
setSettings ( integer $id, array $values ) Insert or update multiple profile settings.
update ( integer $id, array $values ) : integer Update a profile.

메소드 상세

deleteSetting() 공개 정적인 메소드

Delete a setting.
public static deleteSetting ( integer $id, string $name ) : integer
$id integer Profile id.
$name string Setting name.
리턴 integer

existsByEmail() 공개 정적인 메소드

Check if a profile exists by email address.
public static existsByEmail ( string $email, integer $ignoreId = null ) : boolean
$email string Email to check for existence.
$ignoreId integer Profile id to ignore.
리턴 boolean

existsDisplayName() 공개 정적인 메소드

Check if a display name exists.
public static existsDisplayName ( string $displayName, integer $id = null ) : boolean
$displayName string Display name to check for existence.
$id integer Profile id to ignore.
리턴 boolean

get() 공개 정적인 메소드

Get profile by its id.
public static get ( integer $profileId ) : Profile
$profileId integer Id of the wanted profile.
리턴 Profile

getAvatar() 공개 정적인 메소드

Get avatar
public static getAvatar ( integer $id, string $email = null, string $size = '240x240' ) : string
$id integer The id for the profile we want to get the avatar from.
$email string The email from the user we can use for gravatar.
$size string The resolution you want to use. Default: 240x240 pixels.
리턴 string $avatar The absolute path to the avatar.

getEncryptedString() 공개 정적인 메소드

Get an encrypted string.
public static getEncryptedString ( string $string, string $salt ) : string
$string string String to encrypt.
$salt string Salt to add to the string.
리턴 string

getIdByEmail() 공개 정적인 메소드

Get profile id by email.
public static getIdByEmail ( string $email ) : integer
$email string Email address.
리턴 integer

getIdBySetting() 공개 정적인 메소드

Get profile id by setting.
public static getIdBySetting ( string $name, string $value ) : integer
$name string Setting name.
$value string Value of the setting.
리턴 integer

getRandomString() 공개 정적인 메소드

Generate a random string.
public static getRandomString ( integer $length = 15, boolean $numeric = true, boolean $lowercase = true, boolean $uppercase = true, boolean $special = true ) : string
$length integer Length of random string.
$numeric boolean Use numeric characters.
$lowercase boolean Use alphanumeric lowercase characters.
$uppercase boolean Use alphanumeric uppercase characters.
$special boolean Use special characters.
리턴 string

getSetting() 공개 정적인 메소드

Get a setting for a profile.
public static getSetting ( integer $id, string $name ) : string
$id integer Profile id.
$name string Setting name.
리턴 string

getSettings() 공개 정적인 메소드

Get all settings for a profile.
public static getSettings ( integer $id ) : array
$id integer Profile id.
리턴 array

getUrl() 공개 정적인 메소드

Retrieve a unique URL for a profile based on the display name.
public static getUrl ( string $displayName, integer $id = null ) : string
$displayName string The display name to base on.
$id integer The id of the profile to ignore.
리턴 string

insert() 공개 정적인 메소드

Insert a new profile.
public static insert ( array $values ) : integer
$values array Profile data.
리턴 integer

parse() 공개 정적인 메소드

Parse the general profiles info into the template.
public static parse ( )

setSetting() 공개 정적인 메소드

Insert or update a single profile setting.
public static setSetting ( integer $id, string $name, string $value )
$id integer Profile id.
$name string Setting name.
$value string New setting value.

setSettings() 공개 정적인 메소드

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

update() 공개 정적인 메소드

Update a profile.
public static update ( integer $id, array $values ) : integer
$id integer The profile id.
$values array The values to update.
리턴 integer