class AuthenticationKeyValueMalformedException in Apigee Edge 8
Defines an exception for when a key value is malformed.
Hierarchy
- class \Drupal\apigee_edge\Exception\AuthenticationKeyException extends \Apigee\Edge\Exception\ApiException implements ApigeeEdgeExceptionInterface
- class \Drupal\apigee_edge\Exception\AuthenticationKeyValueMalformedException implements ApigeeEdgeExceptionInterface
Expanded class hierarchy of AuthenticationKeyValueMalformedException
1 file declares its use of AuthenticationKeyValueMalformedException
- EdgeKeyTypeBase.php in src/
Plugin/ EdgeKeyTypeBase.php
File
- src/
Exception/ AuthenticationKeyValueMalformedException.php, line 8
Namespace
Drupal\apigee_edge\ExceptionView source
class AuthenticationKeyValueMalformedException extends AuthenticationKeyException implements ApigeeEdgeExceptionInterface {
/**
* The key value field that is malformed.
*
* @var string
*/
protected $problematicField;
/**
* KeyValueMalformedException constructor.
*
* We do not expose the name of problematic field by default in the message.
*
* @param string $problematic_field
* Name of the field that caused the issue.
* @param string $message
* Exception message.
* @param int $code
* Error code.
* @param \Throwable|null $previous
* Previous exception.
*/
public function __construct($problematic_field, $message = 'Apigee Edge API authentication key is malformed or not readable.', $code = 0, \Throwable $previous = NULL) {
$this->problematicField = $problematic_field;
$message = strtr($message, [
'@field' => $problematic_field,
]);
parent::__construct($message, $code, $previous);
}
/**
* Returns the name of the problematic field of a key.
*
* @return string
* Name of the field.
*/
public function getProblematicField() : string {
return $this->problematicField;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AuthenticationKeyValueMalformedException:: |
protected | property | The key value field that is malformed. | |
AuthenticationKeyValueMalformedException:: |
public | function | Returns the name of the problematic field of a key. | |
AuthenticationKeyValueMalformedException:: |
public | function | KeyValueMalformedException constructor. |