PdoMysqlErrorAnalyzer
extends PdoErrorAnalyzer
in package
Table of Contents
Constants
- CODE_UNKNOWN_DATABASE = 'unknownDatabase'
Properties
- $code : int
- $codes : array<string|int, mixed>
- $exception : PDOException
- $message : string
- $state : string
Methods
- from() : static
- fromDriver() : static
- getCode() : int
- getCodeReference() : string|null
- getException() : PDOException
- getMessage() : string
- __construct() : mixed
- PdoErrorAnalyzer constructor
- parse() : void
Constants
CODE_UNKNOWN_DATABASE
public
mixed
CODE_UNKNOWN_DATABASE
= 'unknownDatabase'
Properties
$code
protected
int
$code
$codes
protected
static array<string|int, mixed>
$codes
= [
// See https://dev.mysql.com/doc/refman/8.0/en/server-error-reference.html
1049 => self::CODE_UNKNOWN_DATABASE,
]
$exception
protected
PDOException
$exception
$message
protected
string
$message
$state
protected
string
$state
Methods
from()
public
static from(Exception $exception) : static
Parameters
- $exception : Exception
Return values
staticfromDriver()
public
static fromDriver(Exception $exception[, string|null $driver = null ]) : static
Parameters
- $exception : Exception
- $driver : string|null = null
Return values
staticgetCode()
public
getCode() : int
Return values
intgetCodeReference()
public
getCodeReference() : string|null
Return values
string|nullgetException()
public
getException() : PDOException
Return values
PDOExceptiongetMessage()
public
getMessage() : string
Return values
string__construct()
PdoErrorAnalyzer constructor
protected
__construct(PDOException $exception) : mixed
Parameters
- $exception : PDOException
parse()
protected
parse(PDOException $exception) : void
Parameters
- $exception : PDOException