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
Internal

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

checkDatabasePlatformRequirements()

Get the status of a specific database platform

public checkDatabasePlatformRequirements(string $databaseDriver) : FlashMessageQueue
Parameters
$databaseDriver : string
Tags
throws
Exception
Return values
FlashMessageQueue

identifyInstalledDatabaseDriver()

public identifyInstalledDatabaseDriver() : array<string|int, mixed>
Return values
array<string|int, mixed>

isMysqli()

public static isMysqli() : bool
Return values
bool

isPdoMysql()

public static isPdoMysql() : bool
Return values
bool

isPdoPgsql()

public static isPdoPgsql() : bool
Return values
bool

isPdoSqlite()

public static isPdoSqlite() : bool
Return values
bool

isPdoSqlSrv()

public static isPdoSqlSrv() : bool
Return values
bool

isSqlSrv()

public static isSqlSrv() : bool
Return values
bool

retrieveDatabaseDriverClassByDriverName()

public static retrieveDatabaseDriverClassByDriverName(string $driverName) : string
Parameters
$driverName : string
Tags
throws
Exception
Return values
string

retrieveDatabasePlatformByDriverName()

public static retrieveDatabasePlatformByDriverName(string $databaseDriverName) : string
Parameters
$databaseDriverName : string
Tags
throws
Exception
Return values
string

        
On this page

Search results