View/Helper/Gravatar.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_View
- Subpackage
- Helper
- Version
- $Id: Doctype.php 16971 2009-07-22 18:05:45Z mikaelkael $
\Zend_View_Helper_Gravatar
Package: Zend_View\HelperHelper for retrieving avatars from gravatar.com
- Parent(s)
- \Zend_View_Helper_HtmlElement
<
\Zend_View_Helper_Abstract
- Copyright
- Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Link
- http://pl.gravatar.com/site/implement/url
Constants
Properties
Methods



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



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
ParametersName | Type | Description |
---|
$email | string | null | Email adress. |
---|
$options | null | array | Options |
---|
$attribs | array | Attributes for image tag (title, alt etc.) |
---|
ReturnsDetails- See
-
- See
- More information about gravatar's service.



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().
ParametersName | Type | Description |
---|
$attribs | array | |
---|
Returns


setImgSize(int $imgSize) : \Zend_View_Helper_Gravatar
ParametersName | Type | Description |
---|
$imgSize | int | Size of img must be between 1 and 512 |
---|
Returns 


setRating(string $rating) : void
Must be one of the RATING_* constants
ParametersName | Type | Description |
---|
$rating | string | Value for rating. Allowed values are: g, px, r,x |
---|
ThrowsDetails- Link
- More information about rating.



setSecure(bool $flag) : \Zend_View_Helper_Gravatar
Load from an SSL or No-SSL location?
ParametersName | Type | Description |
---|
$flag | bool | |
---|
Returns