You are here

class UserDoesNotExistWithEmail in Apigee Edge 8

Thrown when user does not exist with an email.

Hierarchy

Expanded class hierarchy of UserDoesNotExistWithEmail

1 file declares its use of UserDoesNotExistWithEmail
DeveloperCreateUpdate.php in src/Job/DeveloperCreateUpdate.php

File

src/Exception/UserDoesNotExistWithEmail.php, line 26

Namespace

Drupal\apigee_edge\Exception
View source
class UserDoesNotExistWithEmail extends \RuntimeException implements ApigeeEdgeExceptionInterface {

  /**
   * Email address of the developer that is supposed to exist.
   *
   * @var string
   */
  protected $email;

  /**
   * UserDoesNotExistWithEmail constructor.
   *
   * @param string $email
   *   Developer email.
   * @param string $message
   *   Exception message.
   * @param int $code
   *   Error code.
   * @param \Throwable|null $previous
   *   Previous exception.
   */
  public function __construct(string $email, string $message = 'User with @email email address not found.', int $code = 0, \Throwable $previous = NULL) {
    $this->email = $email;
    $message = strtr($message, [
      '@email' => $email,
    ]);
    parent::__construct($message, $code, $previous);
  }

  /**
   * Email address of the user.
   *
   * @return string
   *   Email address.
   */
  public function getEmail() : string {
    return $this->email;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UserDoesNotExistWithEmail::$email protected property Email address of the developer that is supposed to exist.
UserDoesNotExistWithEmail::getEmail public function Email address of the user.
UserDoesNotExistWithEmail::__construct public function UserDoesNotExistWithEmail constructor.