Index

MysqlHandler

MMO\pdo · 1 symbol · generated 5 Oct 2026

class

MysqlHandler

MysqlHandler.php:10
class MMO\pdo\MysqlHandler extends MMO\pdo\classes\aHandler
Namespace
MMO\pdo
Extends
aHandler

Properties6

database

protected string $database
Type
string

host

protected string $host
Type
string

password

protected string $password
Type
string

port

protected ?string $port = null
Type
null | string

user

protected string $user
Type
string

utf8

protected bool $utf8 = true
Type
bool

Methods14

CreateDatabase($name, $host, $rootUser, $rootPassword, $port, $dbUser, $dbPassword)

staticMysqlHandler.php:19
static function CreateDatabase( string $name, string $host, string $rootUser, string $rootPassword, ?string $port = null, ?string $dbUser = null, ?string $dbPassword = null ): void
$namestring
$hoststring
$rootUserstring
$rootPasswordstring
$port = nullnull | string
$dbUser = nullnull | string
$dbPassword = nullnull | string
returnsvoid

getHost()

MysqlHandler.php:164

Get the column type as a json type: integer, number, string, null, boolean, array, object, byte, date, date-time, json

function getHost(): string
returnsstring

__construct($host, $database, $user, $password, $port, $utf8)

MysqlHandler.php:42
function __construct( string $host, string $database, string $user, string $password, ?string $port = null, bool $utf8 = true )
$hoststring
$databasestring
$userstring
$passwordstring
$port = nullnull | string
$utf8 = truebool
Inherited members (63)
ConstantsDeclared byDescription
ALERTiLogLevelAlert: Action must be taken immediately.
ALLiLogLevelMask for all
ALL_PLUSiLogLeveldebug everything
BACKTRACEiLogLevel
CRITICALiLogLevelCritical: Critical conditions.
DEBUGiLogLevelDebug: Detailed debug information.
DEEPiLogLeveldebug everything with arguments
EMERGENCYiLogLevelEmergency: System is unusable.
ERRORiLogLevelError: Runtime errors that do not require immediate action but should typically be logged and monitored.
ERROR_PLUSiLogLevelMask for all error
FATALiLogLevelMask for all fatal error
INFOiLogLevelInfo: Interesting events.
INFO_PLUSiLogLevelMask for all errors/warning/notices/info
MEMORYiLogLevelinclude backtrace object
NOTICEiLogLevelNotice: Normal but significant events.
NOTICE_PLUSiLogLevelMask for all errors/warning/notices/info
TRACEiLogLevelinclude backtrace as origins
WARNINGiLogLevelWarning: Exceptional occurrences that are not errors.
WARNING_PLUSiLogLevelMask for all errors and warnings
PropertiesDeclared byDescription
handleaHandlerHandle to sql object
tablePrefixaHandler
tablesaHandler
transCountaHandler
verbosityaHandler
MethodsDeclared byDescription
addTable($table, $name)aHandler
addTableClass($class, $name)aHandler
alert($message, $context)aHandlerAction must be taken immediately.
backtraces($message, $context)aHandlerForce-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it).
commit()aHandlerAlias to \PDO::commit().
createStatement($table, $fields, $primary, $index)aHandler
critical($message, $context)aHandlerCritical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask.
debug($message, $context)aHandlerDetailed debug information.
debugName()aHandlerHuman-readable identifier used as the default {origin} in this instance's log messages.
deleteStatement($table, $filter)aHandler
disconnect()aHandler
do($fn)aHandlerdo a safe transaction on the database if an exception is thrown, it rollbacks the database
dropStatement($table, $ifExists)aHandler
emergency($message, $context)aHandlerSystem is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask.
endTransaction()aHandlerUnwind one level of startTransaction, without committing or rolling anything back.
error($message, $context)aHandlerRuntime errors that do not require immediate action but should typically be logged and monitored.
getHandle()aHandler
getTables()aHandler
getVerbosity()aHandler
hasTable($table)aHandler
info($message, $context)aHandlerInteresting events. No-op if INFO is currently filtered out by the verbosity mask.
insertStatement($table, $values)aHandler
inTransaction()aHandler
isConnected()aHandler
lastId()aHandlerReturn last id in insert.
log($level, $message, $context)aHandlerLogs with an arbitrary level.
notice($message, $context)aHandlerNormal but significant events.
prepare($query)aHandlerPrepare a pdo statement
removeTable($table)aHandler
rollBack()aHandlerAbort the whole transaction, whatever the nesting depth: SQL has no partial rollback without savepoints, so one rollback discards every level at once and resets $transCount to zero.
selectStatement($table, $fields, $filter)aHandler
setVerbosity($verb)aHandlerSet the current verbosity mask, replacing whatever it was before.
startTransaction()aHandlerSafe Alias to \PDO::beginTranscation() if inside another transaction, doesn't throw an exception and ignore call.
statement($template, $content, $opts)aHandler
testVerbosity($level)aHandlerTest whether a given level (or set of levels) is currently enabled by this instance's verbosity mask.
updateStatement($table, $values, $filter)aHandler
warning($message, $context)aHandlerExceptional occurrences that are not errors.
__destruct()aHandler
__wakeup()aHandler