PHP 클래스 Phalcon\Avatar\Gravatar

This component provides an easy way to retrieve a user's profile image from Gravatar site based on a given email address. If the email address cannot be matched with a Gravatar account, an alternative will be returned based on the Gravatar::$defaultImage setting. Users with gravatars can have a default image if you want to.
상속: implements Phalcon\Avatar\Avatarable
파일 보기 프로젝트 열기: phalcon/incubator 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $config )
disableForceDefault ( ) : Gravatar Disable forces default image
disableSecureURL ( ) : Gravatar Disable the use of the secure protocol for image URLs
enableForceDefault ( ) : Gravatar Forces Gravatar to display default image
enableSecureURL ( ) : Gravatar Enable the use of the secure protocol for image URLs
getAvatar ( string $identity ) : string
getDefaultImage ( ) : mixed
getEmailHash ( string $email ) : string Get the email hash to use
getRating ( ) : integer Get the current maximum allowed rating for avatars
getSize ( ) : integer
isUseForceDefault ( ) : boolean Check if need to force the default image to always load
isUseSecureURL ( ) : boolean Check if we are using the secure protocol for the image URLs
setDefaultImage ( mixed $image ) : Gravatar
setRating ( string $rating ) : Gravatar Set the maximum allowed rating for avatars
setSize ( integer $size ) : Gravatar

보호된 메소드들

메소드 설명
buildURL ( string $email ) : string Build the Gravatar URL based on the configuration and provided email address

메소드 상세

__construct() 공개 메소드

public __construct ( $config )

buildURL() 보호된 메소드

Build the Gravatar URL based on the configuration and provided email address
protected buildURL ( string $email ) : string
$email string The email to get the gravatar for
리턴 string

disableForceDefault() 공개 메소드

Disable forces default image
public disableForceDefault ( ) : Gravatar
리턴 Gravatar

disableSecureURL() 공개 메소드

Disable the use of the secure protocol for image URLs
public disableSecureURL ( ) : Gravatar
리턴 Gravatar

enableForceDefault() 공개 메소드

Forces Gravatar to display default image
public enableForceDefault ( ) : Gravatar
리턴 Gravatar

enableSecureURL() 공개 메소드

Enable the use of the secure protocol for image URLs
public enableSecureURL ( ) : Gravatar
리턴 Gravatar

getAvatar() 공개 메소드

public getAvatar ( string $identity ) : string
$identity string The email to get the gravatar for
리턴 string

getDefaultImage() 공개 메소드

public getDefaultImage ( ) : mixed
리턴 mixed

getEmailHash() 공개 메소드

Get the email hash to use
public getEmailHash ( string $email ) : string
$email string The email to get the hash for
리턴 string

getRating() 공개 메소드

The string representing the current maximum allowed rating ('g', 'pg', 'r', 'x').
public getRating ( ) : integer
리턴 integer

getSize() 공개 메소드

public getSize ( ) : integer
리턴 integer

isUseForceDefault() 공개 메소드

Check if need to force the default image to always load
public isUseForceDefault ( ) : boolean
리턴 boolean

isUseSecureURL() 공개 메소드

Check if we are using the secure protocol for the image URLs
public isUseSecureURL ( ) : boolean
리턴 boolean

setDefaultImage() 공개 메소드

Possible $image formats: - a string specifying a recognized gravatar "default" - a string containing a valid image URL - boolean false for the gravatar default
public setDefaultImage ( mixed $image ) : Gravatar
$image mixed The default image to use
리턴 Gravatar

setRating() 공개 메소드

Set the maximum allowed rating for avatars
public setRating ( string $rating ) : Gravatar
$rating string The maximum rating to use for avatars ('g', 'pg', 'r', 'x')
리턴 Gravatar

setSize() 공개 메소드

By default, images from Gravatar.com will be returned as 80x80px
public setSize ( integer $size ) : Gravatar
$size integer The avatar size to use
리턴 Gravatar