Public Member Functions | |
| __construct (Robo47_Service_Gravatar $service=null) | |
| Constructor. | |
| getService () | |
| Returns Service Instance. | |
| Gravatar ($email, $size=null, $rating=null, $default=null, $ssl=null, $separator= '&', array $params=array()) | |
| Returns Gravatar-Image-tag. | |
| setService (Robo47_Service_Gravatar $service=null) | |
| Sets Service Instance. | |
Protected Attributes | |
| $_service = null | |
Definition at line 32 of file Gravatar.php.
| Robo47_View_Helper_Gravatar::__construct | ( | Robo47_Service_Gravatar $ | service = null |
) |
Constructor.
| Zend_Cache_Core | $cache | |
| string | $defaultAlt | |
| Robo47_Service_Gravatar | $service |
Definition at line 47 of file Gravatar.php.
References setService().
{
$this->setService($service);
}
| Robo47_View_Helper_Gravatar::getService | ( | ) |
Returns Service Instance.
Definition at line 72 of file Gravatar.php.
{
return $this->_service;
}
| Robo47_View_Helper_Gravatar::Gravatar | ( | $ | email, | |
| $ | size = null, |
|||
| $ | rating = null, |
|||
| $ | default = null, |
|||
| $ | ssl = null, |
|||
| $ | separator = '&', |
|||
| array $ | params = array() | |||
| ) |
Returns Gravatar-Image-tag.
| string | ||
| array | $params |
Definition at line 84 of file Gravatar.php.
{
$params['src'] = $this->_service->getUri(
$email,
$size,
$rating,
$default,
$ssl,
$separator
);
if (!isset($params['alt'])) {
$params['alt'] = 'Gravatar ' .
$this->_service->getGravatarHash($email);
}
$image = '<img ';
$image .= $this->_htmlAttribs($params);
$image .= $this->getClosingBracket();
return $image;
}
| Robo47_View_Helper_Gravatar::setService | ( | Robo47_Service_Gravatar $ | service = null |
) |
Sets Service Instance.
| Robo47_Service_Gravatar | $service |
Definition at line 58 of file Gravatar.php.
Referenced by __construct().
{
if (null === $service) {
$service = new Robo47_Service_Gravatar();
}
$this->_service = $service;
return $this;
}
Robo47_View_Helper_Gravatar::$_service = null [protected] |
Definition at line 38 of file Gravatar.php.
1.7.1