API / Minn\Runtime / Avatar

Avatar final class

Minn\Runtime\Avatar · public/minn/src/Minn/Runtime/Avatar.php · 62 lines

Avatars the way get_avatar_data and get_avatar decide them: the argument defaults, the email an id, user, post, or comment names, the Gravatar URL, and the <img> attributes. Behaviour pinned by contracts/fixtures/api/functions.json.

Public

staticdataArgs(array $args): array#

The data arguments normalised: sizes to integers, the default token, the rating lowercased.

statichash(string $email): string#

The Gravatar hash an email yields; '' for no email.

statichashFromAddress(string $address): ?string#

A hash given as an md5.gravatar.com address, else null.

staticurlArgs(array $args): array#

The Gravatar URL's query arguments for the data arguments. @return array<string, string|int|false>

@return array<string, string|int|false>
staticclasses(int $size, bool $isDefault, mixed $extra): array#

The <img> classes: the size class, a default marker, the caller's own. @return list<string>

@return list<string>
staticextraAttributes(string $extra, mixed $loading, mixed $decoding): string#

The extra attribute string with loading and decoding added when the caller did not set them.