You are here

class EntityAvatarIdentifierProxy in Avatar Kit 8.2

Wraps an avatar identifier object with Drupal entity support.

Encapsulates any object implementing \dpi\ak\AvatarIdentifierInterface while adding Drupal entity specific functionality.

Proxies some methods back to an avatar identifier object.

Hierarchy

Expanded class hierarchy of EntityAvatarIdentifierProxy

File

src/EntityAvatarIdentifierProxy.php, line 15

Namespace

Drupal\avatars
View source
class EntityAvatarIdentifierProxy extends EntityAvatarIdentifier {

  /**
   * An avatar identifier object.
   *
   * @var \dpi\ak\AvatarIdentifierInterface
   */
  protected $original;

  /**
   * Creates a new EntityAvatarIdentifierProxy object.
   *
   * @param \dpi\ak\AvatarIdentifierInterface $identifier
   *   An avatar identifier object.
   */
  public function __construct(AvatarIdentifierInterface $identifier) {
    $this->original = $identifier;
  }

  /**
   * {@inheritdoc}
   */
  public function getRaw() {
    return $this->original
      ->getRaw();
  }

  /**
   * {@inheritdoc}
   */
  public function setRaw(string $raw) {
    return $this->original
      ->setRaw($raw);
  }

  /**
   * {@inheritdoc}
   */
  public function getHashed() {
    return $this->original
      ->getHashed();
  }

  /**
   * {@inheritdoc}
   */
  public function setHashed(string $string) {
    return $this->original
      ->setHashed($string);
  }

  /**
   * {@inheritdoc}
   */
  public function setHasher(callable $callable) {
    return $this->original
      ->setHasher($callable);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityAvatarIdentifier::$entity protected property An entity.
EntityAvatarIdentifier::entityFieldHandler protected function Get the entity field handler service.
EntityAvatarIdentifier::getEntity public function Get the entity for this identifier. Overrides EntityAvatarIdentifierInterface::getEntity
EntityAvatarIdentifier::setEntity public function Set the entity for this identifier. Overrides EntityAvatarIdentifierInterface::setEntity
EntityAvatarIdentifier::token protected function Get Drupal placeholder/token replacement system.
EntityAvatarIdentifier::tokenReplace protected function Generate a pre-hashed string for an entity.
EntityAvatarIdentifierProxy::$original protected property An avatar identifier object.
EntityAvatarIdentifierProxy::getHashed public function
EntityAvatarIdentifierProxy::getRaw public function
EntityAvatarIdentifierProxy::setHashed public function
EntityAvatarIdentifierProxy::setHasher public function
EntityAvatarIdentifierProxy::setRaw public function
EntityAvatarIdentifierProxy::__construct public function Creates a new EntityAvatarIdentifierProxy object.