PHP Class sspmod_saml_Error, simplesamlphp

Inheritance: extends SimpleSAML_Error_Exception
Mostrar archivo Open project: simplesamlphp/simplesamlphp Class Usage Examples

Public Methods

Method Description
__construct ( string $status, string | null $subStatus = NULL, string | null $statusMessage = NULL, Exception $cause = NULL ) Create a SAML 2 error.
fromException ( Exception $exception ) : sspmod_saml_Error Create a SAML2 error from an exception.
getStatus ( ) : string Get the top-level status code.
getStatusMessage ( ) : string | null Get the status message.
getSubStatus ( ) : string | null Get the second-level status code.
toException ( ) : SimpleSAML_Error_Exception Create a normal exception from a SAML2 error.

Private Methods

Method Description
shortStatus ( string $status ) : string Create a short version of the status code.

Method Details

__construct() public method

Create a SAML 2 error.
public __construct ( string $status, string | null $subStatus = NULL, string | null $statusMessage = NULL, Exception $cause = NULL )
$status string The top-level status code.
$subStatus string | null The second-level status code. Can be NULL, in which case there is no second-level status code.
$statusMessage string | null The status message. Can be NULL, in which case there is no status message.
$cause Exception The cause of this exception. Can be NULL.

fromException() public static method

This function attempts to create a SAML2 error with the appropriate status codes from an arbitrary exception.
public static fromException ( Exception $exception ) : sspmod_saml_Error
$exception Exception The original exception.
return sspmod_saml_Error The new exception.

getStatus() public method

Get the top-level status code.
public getStatus ( ) : string
return string The top-level status code.

getStatusMessage() public method

Get the status message.
public getStatusMessage ( ) : string | null
return string | null The status message or NULL if no status message is present.

getSubStatus() public method

Get the second-level status code.
public getSubStatus ( ) : string | null
return string | null The second-level status code or NULL if no second-level status code is present.

toException() public method

This function attempts to reverse the operation of the fromException() function. If it is unable to create a more specific exception, it will return the current object.
See also: sspmod_saml_Error::fromException()
public toException ( ) : SimpleSAML_Error_Exception
return SimpleSAML_Error_Exception An exception representing this error.