DatabaseCheck implements CheckInterface
Check database configuration status
This class is a hardcoded requirement check for the database server.
The status messages and title must not include HTML, use plain text only. The return values of this class are not bound to HTML and can be used in different scopes (eg. as json array).
The database requirements checks are separated into driver specific and / or more general requirements specific for each DBMS platform.
Example:
The driver pdo_mysql requires a different set of checks, then the mysqli driver (it requires other extensions to be loaded by PHP, configuration of that extension, etc.). Those specific checks could be covered in a driver specific check like follows:
- Create a new class in typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Driver
- It must extend TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Driver\AbstractDriver and implement all methods
- Finally it has to be registered in TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck
If the requirements are more general for the platform (e.g. MySQL, PostgreSQL, etc.), they should be placed in the platform specific checks and fulfill those requirements:
- Create a new class in typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck/Platform
- It must extend TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\AbstractPlatform and implement all methods
- Finally it has to be registered in TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck
This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.
Table of Contents
Interfaces
- CheckInterface
- Check system environment status
Methods
- __construct() : mixed
- checkDatabaseDriverRequirements() : FlashMessageQueue
- checkDatabasePlatformRequirements() : FlashMessageQueue
- Get the status of a specific database platform
- getMessageQueue() : FlashMessageQueue
- getStatus() : FlashMessageQueue
- Get status of each database platform identified to be installed on the system
- identifyInstalledDatabaseDriver() : array<string|int, mixed>
- isMysqli() : bool
- isPdoMysql() : bool
- isPdoPgsql() : bool
- isPdoSqlite() : bool
- isPdoSqlSrv() : bool
- isSqlSrv() : bool
- retrieveDatabaseDriverClassByDriverName() : string
- retrieveDatabasePlatformByDriverName() : string
Methods
__construct()
public
__construct() : mixed
checkDatabaseDriverRequirements()
public
checkDatabaseDriverRequirements(string $databaseDriver) : FlashMessageQueue
Parameters
- $databaseDriver : string
Return values
FlashMessageQueuecheckDatabasePlatformRequirements()
Get the status of a specific database platform
public
checkDatabasePlatformRequirements(string $databaseDriver) : FlashMessageQueue
Parameters
- $databaseDriver : string
Tags
Return values
FlashMessageQueuegetMessageQueue()
public
getMessageQueue() : FlashMessageQueue
Return values
FlashMessageQueuegetStatus()
Get status of each database platform identified to be installed on the system
public
getStatus() : FlashMessageQueue
Return values
FlashMessageQueueidentifyInstalledDatabaseDriver()
public
identifyInstalledDatabaseDriver() : array<string|int, mixed>
Return values
array<string|int, mixed>isMysqli()
public
static isMysqli() : bool
Return values
boolisPdoMysql()
public
static isPdoMysql() : bool
Return values
boolisPdoPgsql()
public
static isPdoPgsql() : bool
Return values
boolisPdoSqlite()
public
static isPdoSqlite() : bool
Return values
boolisPdoSqlSrv()
public
static isPdoSqlSrv() : bool
Return values
boolisSqlSrv()
public
static isSqlSrv() : bool
Return values
boolretrieveDatabaseDriverClassByDriverName()
public
static retrieveDatabaseDriverClassByDriverName(string $driverName) : string
Parameters
- $driverName : string
Tags
Return values
stringretrieveDatabasePlatformByDriverName()
public
static retrieveDatabasePlatformByDriverName(string $databaseDriverName) : string
Parameters
- $databaseDriverName : string