Zend Framework
1.12
|
Public Member Functions | |
gravatar ($email="", $options=array(), $attribs=array()) | |
Returns an avatar from gravatar's service. | |
setOptions (array $options) | |
Configure state. | |
getImgSize () | |
Get img size. | |
setImgSize ($imgSize) | |
Set img size in pixels. | |
getDefaultImg () | |
Get default img. | |
setDefaultImg ($defaultImg) | |
Set default img. | |
setRating ($rating) | |
Set rating value. | |
getRating () | |
Get rating value. | |
setEmail ($email) | |
Set email adress. | |
getEmail () | |
Get email adress. | |
setSecure ($flag) | |
Load from an SSL or No-SSL location? | |
getSecure () | |
Get an SSL or a No-SSL location. | |
getAttribs () | |
Get attribs of image. | |
setAttribs (array $attribs) | |
Set attribs for image tag. | |
getImgTag () | |
Return valid image tag. | |
__toString () | |
Return valid image tag. | |
![]() | |
getClosingBracket () | |
Get the tag closing bracket. | |
![]() | |
setView (Zend_View_Interface $view) | |
Set the View object. | |
direct () | |
Strategy pattern: currently unutilized. | |
Public Attributes | |
const | GRAVATAR_URL = 'http://www.gravatar.com/avatar' |
URL to gravatar service. | |
const | GRAVATAR_URL_SECURE = 'https://secure.gravatar.com/avatar' |
Secure URL to gravatar service. | |
const | RATING_G = 'g' |
Gravatar rating. | |
const | RATING_PG = 'pg' |
const | RATING_R = 'r' |
const | RATING_X = 'x' |
const | DEFAULT_404 = '404' |
Default gravatar image value constants. | |
const | DEFAULT_MM = 'mm' |
const | DEFAULT_IDENTICON = 'identicon' |
const | DEFAULT_MONSTERID = 'monsterid' |
const | DEFAULT_WAVATAR = 'wavatar' |
![]() | |
const | EOL = "\n" |
EOL character. | |
![]() | |
$view = null | |
Protected Member Functions | |
_getGravatarUrl () | |
Get URL to gravatar's service. | |
_getAvatarUrl () | |
Get avatar url (including size, rating and default image oprions) | |
_setSrcAttribForImg () | |
Set src attrib for image. | |
![]() | |
_isXhtml () | |
Is doctype XHTML? | |
_isHtml5 () | |
Is doctype HTML5? | |
_isStrictDoctype () | |
Is doctype strict? | |
_htmlAttribs ($attribs) | |
Converts an associative array to a string of tag attributes. | |
_normalizeId ($value) | |
Normalize an ID. | |
Protected Attributes | |
$_options | |
$_email | |
$_attribs | |
![]() | |
$_closingBracket = null | |
__toString | ( | ) |
Return valid image tag.
|
protected |
Get avatar url (including size, rating and default image oprions)
|
protected |
Get URL to gravatar's service.
|
protected |
Set src attrib for image.
You shouldn't set a own url value! It sets value, uses protected method _getAvatarUrl.
If already exsist overwritten.
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!
getDefaultImg | ( | ) |
Get default img.
getEmail | ( | ) |
Get email adress.
getImgSize | ( | ) |
Get img size.
getImgTag | ( | ) |
Return valid image tag.
getRating | ( | ) |
Get rating value.
getSecure | ( | ) |
Get an SSL or a No-SSL location.
gravatar | ( | $email = "" , |
|
$options = array() , |
|||
$attribs = array() |
|||
) |
Returns an avatar from gravatar's service.
$options may include the following:
string | null | Email adress. | |
null | array | $options | Options |
array | $attribs | Attributes for image tag (title, alt etc.) |
setAttribs | ( | array | $attribs | ) |
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().
array | $attribs |
setDefaultImg | ( | $defaultImg | ) |
Set default img.
Can be either an absolute URL to an image, or one of the DEFAULT_* constants
string | $defaultImg | More information about default image. Zend_View_Helper_Gravatar |
setEmail | ( | ) |
setImgSize | ( | $imgSize | ) |
Set img size in pixels.
int | $imgSize | Size of img must be between 1 and 512 |
setOptions | ( | array | $options | ) |
setRating | ( | $rating | ) |
Set rating value.
Must be one of the RATING_* constants
string | $rating | Value for rating. Allowed values are: g, px, r,x More information about rating. Zend_View_Exception |
setSecure | ( | $flag | ) |
|
protected |
|
protected |
|
protected |
const DEFAULT_404 = '404' |
Default gravatar image value constants.
const DEFAULT_IDENTICON = 'identicon' |
const DEFAULT_MM = 'mm' |
const DEFAULT_MONSTERID = 'monsterid' |
const DEFAULT_WAVATAR = 'wavatar' |
const GRAVATAR_URL = 'http://www.gravatar.com/avatar' |
URL to gravatar service.
const GRAVATAR_URL_SECURE = 'https://secure.gravatar.com/avatar' |
Secure URL to gravatar service.
const RATING_G = 'g' |
Gravatar rating.
const RATING_PG = 'pg' |
const RATING_R = 'r' |
const RATING_X = 'x' |