You are here

class AuthenticationKeyNotFoundException in Apigee Edge 8

Thrown when authentication key not found with the id.

Hierarchy

Expanded class hierarchy of AuthenticationKeyNotFoundException

1 file declares its use of AuthenticationKeyNotFoundException
SDKConnector.php in src/SDKConnector.php

File

src/Exception/AuthenticationKeyNotFoundException.php, line 26

Namespace

Drupal\apigee_edge\Exception
View source
class AuthenticationKeyNotFoundException extends AuthenticationKeyException {

  /**
   * Id of the authentication key.
   *
   * @var string
   */
  protected $keyId;

  /**
   * AuthenticationKeyNotFoundException constructor.
   *
   * @param string $key_id
   *   Id of the authentication key.
   * @param string $message
   *   Exception message.
   * @param int $code
   *   Error code.
   * @param \Throwable|null $previous
   *   Previous exception.
   */
  public function __construct(string $key_id, string $message = 'Authentication key not found with "@id" id.', int $code = 0, \Throwable $previous = NULL) {
    $this->keyId = $key_id;
    $message = strtr($message, [
      '@id' => $key_id,
    ]);
    parent::__construct($message, $code, $previous);
  }

  /**
   * Returns the id of the authentication key that does not belongs to a Key.
   *
   * @return string
   *   Id of the authentication key.
   */
  public function getKeyId() : string {
    return $this->keyId;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AuthenticationKeyNotFoundException::$keyId protected property Id of the authentication key.
AuthenticationKeyNotFoundException::getKeyId public function Returns the id of the authentication key that does not belongs to a Key.
AuthenticationKeyNotFoundException::__construct public function AuthenticationKeyNotFoundException constructor.