Class Gravatar

Summary

Fully Qualified Name: Zend\View\Helper\Gravatar
Extends: AbstractHtmlElement

Description

Helper for retrieving avatars from gravatar.com

Methods

Name Description Defined By
__invoke() Returns an avatar from gravatar's service. Gravatar
__toString() Return valid image tag Gravatar
getAttribs() Get attribs of image Gravatar
getAttributes() Get attributes of image Gravatar
getClosingBracket() Get the tag closing bracket AbstractHtmlElement
getDefaultImg() Get default img Gravatar
getEmail() Get email address Gravatar
getImgSize() Get img size Gravatar
getImgTag() Return valid image tag Gravatar
getRating() Get rating value Gravatar
getSecure() Get an SSL or a No-SSL location Gravatar
getView() Get the view object AbstractHelper
setAttribs() Set attribs for image tag Gravatar
setAttributes() Set attributes for image tag Gravatar
setDefaultImg() Set default img Gravatar
setEmail() Set email address Gravatar
setImgSize() Set img size in pixels Gravatar
setOptions() Configure state Gravatar
setRating() Set rating value Gravatar
setSecure() Load from an SSL or No-SSL location? Gravatar
setView() Set the View object AbstractHelper

Method Details

__invoke()

Returns an avatar from gravatar's service.

$options may include the following:

Parameter Name Type Description
$email string|null Email
$options null|array Options
$attributes array Attributes

Returns: \Gravatar

__toString()

Return valid image tag

Returns: string

getAttribs()

Get attribs of image

Warning! If you set src attrib, you get it, but this value will be overwritten in protected method setSrcAttribForImg(). And finally your get other src value!

Returns: array

getAttributes()

Get attributes of image

Warning! If you set src attribute, you get it, but this value will be overwritten in protected method setSrcAttribForImg(). And finally your get other src value!

Returns: array

getClosingBracket()

Get the tag closing bracket

Returns: string

getDefaultImg()

Get default img

Returns: string

getEmail()

Get email address

Returns: string

getImgSize()

Get img size

Returns: int The img size

getImgTag()

Return valid image tag

Returns: string

getRating()

Get rating value

Returns: string

getSecure()

Get an SSL or a No-SSL location

Returns: bool

getView()

Get the view object

Returns: null|\Renderer

setAttribs()

Set attribs for image tag

Parameter Name Type Description
$attribs array

Returns: \Gravatar

setAttributes()

Set attributes for image tag

Warning! You shouldn't set src attribute for image tag. This attribute is overwritten in protected method setSrcAttribForImg(). This method(_setSrcAttribForImg) is called in public method getImgTag().

Parameter Name Type Description
$attributes array

Returns: \Gravatar

setDefaultImg()

Set default img

Can be either an absolute URL to an image, or one of the DEFAULT_* constants

Parameter Name Type Description
$defaultImg string

Returns: \Gravatar

setEmail()

Set email address

Parameter Name Type Description
$email string

Returns: \Gravatar

setImgSize()

Set img size in pixels

Parameter Name Type Description
$imgSize int Size

Returns: \Gravatar

setOptions()

Configure state

Parameter Name Type Description
$options array

Returns: \Gravatar

setRating()

Set rating value

Must be one of the RATING_* constants

Parameter Name Type Description
$rating string Value

Returns: \Gravatar

setSecure()

Load from an SSL or No-SSL location?

Parameter Name Type Description
$flag bool

Returns: \Gravatar

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top