Public Member Functions | Protected Attributes

Robo47_View_Helper_Gravatar Class Reference

List of all members.

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

Detailed Description

Definition at line 32 of file Gravatar.php.


Constructor & Destructor Documentation

Robo47_View_Helper_Gravatar::__construct ( Robo47_Service_Gravatar service = null  ) 

Constructor.

Parameters:
Zend_Cache_Core $cache
string $defaultAlt
Robo47_Service_Gravatar $service

Definition at line 47 of file Gravatar.php.

References setService().

    {
        $this->setService($service);
    }

Here is the call graph for this function:


Member Function Documentation

Robo47_View_Helper_Gravatar::getService (  ) 

Returns Service Instance.

Returns:
Robo47_Service_Gravatar

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.

Parameters:
string $email
array $params
Returns:
string

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.

Parameters:
Robo47_Service_Gravatar $service
Returns:
Robo47_View_Helper_Gravatar *Provides Fluent Interface*

Definition at line 58 of file Gravatar.php.

Referenced by __construct().

    {
        if (null === $service) {
            $service = new Robo47_Service_Gravatar();
        }
        $this->_service = $service;
        return $this;
    }

Here is the caller graph for this function:


Member Data Documentation

Robo47_View_Helper_Gravatar::$_service = null [protected]

Definition at line 38 of file Gravatar.php.


The documentation for this class was generated from the following file: