RdbAdmin Module

Gravatar
in package

Gravatar class.

Tags
since
0.2.1

Table of Contents

Properties

$gravatarUrlBase  : string

Methods

getImage()  : string
Get Gravatar image tag with URL or just URL.

Properties

$gravatarUrlBase

public string $gravatarUrlBase = 'https://www.gravatar.com/avatar/'

Gravatar URL base with trailing slash.

Methods

getImage()

Get Gravatar image tag with URL or just URL.

public getImage(string $email[, int $size = 80 ][, string $default = 'mp' ][, string $rating = 'g' ][, bool $htmlImg = false ][, array<string|int, mixed> $htmlImgAttributes = [] ]) : string
Parameters
$email : string

The email address of target Gravatar.

$size : int = 80

Gravatar size.

$default : string = 'mp'

Default image. Accept: 404, mp, identicon, monsterid, wavatar, retro, robohash, blank.

$rating : string = 'g'

Rating. Accept: g, pg, r, x.

$htmlImg : bool = false

Set to true to return &lt;img&gt; tag. Default is false means it will be return only URL.

$htmlImgAttributes : array<string|int, mixed> = []

The associative array of img attributes.

Tags
link

Gravatar reference.

link

Original source code.

Return values
string

Return URL or img tag with URL.


        
On this page

Search results