‪TYPO3CMS  10.4
TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv Class Reference
Inheritance diagram for TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv:
TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\AbstractPlatform TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\PlatformCheckInterface TYPO3\CMS\Install\SystemEnvironment\CheckInterface

Public Member Functions

FlashMessageQueue getStatus ()
 
 checkDefaultDatabaseCharset (Connection $connection)
 
 checkDefaultDatabaseServerCharset (Connection $connection)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\AbstractPlatform
 __construct ()
 
 getMessageQueue ()
 

Static Public Member Functions

static bool isValidDatabaseName (string $databaseName)
 

Protected Member Functions

 checkDatabaseName (Connection $connection)
 

Protected Attributes

const SCHEMA_NAME_MAX_LENGTH = 128
 
array $databaseCharsetToCheck
 
array $databaseServerCharsetToCheck
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\AbstractPlatform
FlashMessageQueue $messageQueue
 
const SCHEMA_NAME_MAX_LENGTH = 64
 

Detailed Description

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Definition at line 29 of file SqlSrv.php.

Member Function Documentation

◆ checkDatabaseName()

TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::checkDatabaseName ( Connection  $connection)
protected

◆ checkDefaultDatabaseCharset()

TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::checkDefaultDatabaseCharset ( Connection  $connection)

Checks the character set of the database and reports an error if it is not utf-8.

Parameters
Connection$connection‪to the database to be checked

Implements TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\PlatformCheckInterface.

Definition at line 89 of file SqlSrv.php.

References TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv\$databaseCharsetToCheck, and TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR.

Referenced by TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv\getStatus().

◆ checkDefaultDatabaseServerCharset()

TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::checkDefaultDatabaseServerCharset ( Connection  $connection)

Checks the character set of the database server and reports an info if it is not utf-8.

Parameters
Connection$connection‪to the database to be checked

Implements TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\PlatformCheckInterface.

Definition at line 123 of file SqlSrv.php.

References TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv\$databaseServerCharsetToCheck, and TYPO3\CMS\Core\Messaging\AbstractMessage\INFO.

Referenced by TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv\getStatus().

◆ getStatus()

◆ isValidDatabaseName()

static bool TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::isValidDatabaseName ( string  $databaseName)
static

Validate the database name https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-identifiers

Examples:

valid:

_foo @foo #foo _floo1äea @foo111111111kemcie_l#@

not valid:

@thisShouldNotBeValid

Parameters
string$databaseName
Returns
‪bool

Reimplemented from TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\AbstractPlatform.

Definition at line 169 of file SqlSrv.php.

Member Data Documentation

◆ $databaseCharsetToCheck

array TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::$databaseCharsetToCheck
protected
Initial value:
= array(
'_UTF8',
)

SQL Server has a more complex naming schema for the collation. For more information visit: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support

Thus we need to check, whether the charset set here is part of the collation.

Definition at line 46 of file SqlSrv.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv\checkDefaultDatabaseCharset().

◆ $databaseServerCharsetToCheck

array TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::$databaseServerCharsetToCheck
protected
Initial value:
= array(
'_UTF8'
)

SQL Server has a more complex naming schema for the collation. For more information visit: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support

Thus we need to check, whether the charset set here is part of the collation.

Definition at line 58 of file SqlSrv.php.

Referenced by TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv\checkDefaultDatabaseServerCharset().

◆ SCHEMA_NAME_MAX_LENGTH

const TYPO3\CMS\Install\SystemEnvironment\DatabaseCheck\Platform\SqlSrv::SCHEMA_NAME_MAX_LENGTH = 128
protected

Definition at line 36 of file SqlSrv.php.