Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Helper for retrieving avatars from gravatar.com

_getAvatarUrl(
)
:
string
Get avatar url (including size, rating and default image oprions)
Type | Description |
---|---|
string |

_htmlAttribs(
array $attribs
)
:
string
Converts an associative array to a string of tag attributes.
Inherited from: \Zend_View_Helper_HtmlElement::_htmlAttribs()Name | Type | Description |
---|---|---|
$attribs | array | From this array, each key-value pair is converted to an attribute name and value. |
Type | Description |
---|---|
string | The XHTML for the attributes. |

_isStrictDoctype(
)
:
boolean
Is doctype strict?
Inherited from: \Zend_View_Helper_HtmlElement::_isStrictDoctype()Type | Description |
---|---|
boolean |

_isXhtml(
)
:
boolean
Is doctype XHTML?
Inherited from: \Zend_View_Helper_HtmlElement::_isXhtml()Type | Description |
---|---|
boolean |

_normalizeId(
string $value
)
:
string
Normalize an ID
Inherited from: \Zend_View_Helper_HtmlElement::_normalizeId()Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
string |

_setSrcAttribForImg(
)
:
void
Set src attrib for image.
You shouldn't set a own url value! It sets value, uses protected method _getAvatarUrl.
If already exsist overwritten.

direct(
)
:
void
Strategy pattern: currently unutilized
Inherited from: \Zend_View_Helper_Abstract::direct()
getAttribs(
)
:
array
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!
Type | Description |
---|---|
array |

getClosingBracket(
)
:
string
Get the tag closing bracket
Inherited from: \Zend_View_Helper_HtmlElement::getClosingBracket()Type | Description |
---|---|
string |

gravatar(
string|null $email, null|array $options
=
array, array $attribs
=
array
)
:
\Zend_View_Helper_Gravatar
Returns an avatar from gravatar's service.
$options may include the following: - 'img_size' int height of img to return - 'default_img' string img to return if email adress has not found - 'rating' string rating parameter for avatar - 'secure' bool load from the SSL or Non-SSL location
Name | Type | Description |
---|---|---|
string|null | Email adress. | |
$options | null|array | Options |
$attribs | array | Attributes for image tag (title, alt etc.) |
Type | Description |
---|---|
\Zend_View_Helper_Gravatar |

setAttribs(
array $attribs
)
:
\Zend_View_Helper_Gravatar
Set attribs for image tag
Warning! You shouldn't set src attrib for image tag. This attrib is overwritten in protected method _setSrcAttribForImg(). This method(_setSrcAttribForImg) is called in public method getImgTag().
Name | Type | Description |
---|---|---|
$attribs | array |
Type | Description |
---|---|
\Zend_View_Helper_Gravatar |

setDefaultImg(
string $defaultImg
)
:
\Zend_View_Helper_Gravatar
Set default img
Can be either an absolute URL to an image, or one of the DEFAULT_* constants
Name | Type | Description |
---|---|---|
$defaultImg | string |
Type | Description |
---|---|
\Zend_View_Helper_Gravatar |

setImgSize(
int $imgSize
)
:
\Zend_View_Helper_Gravatar
Set img size in pixels
Name | Type | Description |
---|---|---|
$imgSize | int | Size of img must be between 1 and 512 |
Type | Description |
---|---|
\Zend_View_Helper_Gravatar |

setRating(
string $rating
)
:
void
Set rating value
Must be one of the RATING_* constants
Name | Type | Description |
---|---|---|
$rating | string | Value for rating. Allowed values are: g, px, r,x |
Exception | Description |
---|---|
\Zend_View_Exception |

setView(
\Zend_View_Interface $view
)
:
\Zend_View_Helper_Abstract
Set the View object
Inherited from: \Zend_View_Helper_Abstract::setView()Name | Type | Description |
---|---|---|
$view | \Zend_View_Interface |
Type | Description |
---|---|
\Zend_View_Helper_Abstract |