You are here

public function AvatarBaseInterface::setIdentifier in Avatar Kit 8

Sets a unique identifier to be passed to the API.

Parameters

string $identifier: A unique identifier, such as an e-mail address.

bool $pre_hashed: Whether the ID has been pre-obfuscated, otherwise it will happen when the URL is generated.

Return value

\Drupal\avatars\AvatarBaseInterface Returns the called Robohash object for chaining.

Throws

\Drupal\avatars\Exception\AvatarException Thrown if the identifier is malformed.

1 method overrides AvatarBaseInterface::setIdentifier()
AvatarBase::setIdentifier in src/AvatarBase.php
Sets a unique identifier to be passed to the API.

File

src/AvatarBaseInterface.php, line 52

Class

AvatarBaseInterface
Interface for Avatar APIs.

Namespace

Drupal\avatars

Code

public function setIdentifier($identifier, $pre_hashed = FALSE);