|
libasynql
3.2.0
Asynchronous MySQL access library for PocketMine plugins.
|
Public Member Functions | |
| __construct (string $host, string $username, string $password, string $schema, int $port=3306, string $socket="") | |
| newMysqli () | |
| __toString () | |
| __debugInfo () | |
| jsonSerialize () | |
Static Public Member Functions | |
| static | fromArray (array $array, ?string $defaultSchema=null) |
Definition at line 31 of file MysqlCredentials.php.
| __construct | ( | string | $host, |
| string | $username, | ||
| string | $password, | ||
| string | $schema, | ||
| int | $port = 3306, |
||
| string | $socket = "" |
||
| ) |
Constructs a new MysqlCredentials by passing parameters directly.
| string | $host | |
| string | $username | |
| string | $password | |
| string | $schema | |
| int | $port | |
| string | $socket |
Definition at line 79 of file MysqlCredentials.php.
| __debugInfo | ( | ) |
Prepares value to be var_dump()'ed without leaking password
Definition at line 117 of file MysqlCredentials.php.
| __toString | ( | ) |
Produces a human-readable output without leaking password
Definition at line 108 of file MysqlCredentials.php.
|
static |
Creates a new MysqlCredentials instance from an array (e.g. from Config), with the following defaults:
host: 127.0.0.1
username: root
password: ""
schema: {$defaultSchema}
port: 3306
socket: ""
| array | $array | |
| string | null | $defaultSchema | default null |
| ConfigException | If schema is missing and $defaultSchema is null/not passed |
Definition at line 61 of file MysqlCredentials.php.
| jsonSerialize | ( | ) |
Definition at line 128 of file MysqlCredentials.php.
| newMysqli | ( | ) |
Creates a new mysqli instance
| SqlError |
Definition at line 95 of file MysqlCredentials.php.