PlatformInformation
Helper to handle platform specific details
Table of Contents
Properties
- $bindParameterLimits : array<string|int, mixed>
- $charSetMap : array<string|int, string>
- $databaseCreateWithCharsetMap : array<string|int, string>
- $identifierLimits : array<string|int, mixed>
Methods
- getCharset() : string
- Return the encoding of the given platform
- getDatabaseCreateStatementWithCharset() : string
- Return the statement to create a database with the desired encoding for the given platform
- getMaxBindParameters() : int
- Return information about the maximum number of bound parameters supported on this platform
- getMaxIdentifierLength() : int
- Return information about the maximum supported length for a SQL identifier.
- getPlatformIdentifier() : string
- Return the platform shortname to use as a lookup key
Properties
$bindParameterLimits
protected
static array<string|int, mixed>
$bindParameterLimits
= ['mysql' => 65535, 'postgresql' => 34464, 'sqlserver' => 2100, 'sqlite' => 999]
$charSetMap
protected
static array<string|int, string>
$charSetMap
= ['mysql' => 'utf8mb4', 'postgresql' => 'UTF8', 'sqlserver' => 'UTF-8', 'sqlite' => 'utf8']
$databaseCreateWithCharsetMap
protected
static array<string|int, string>
$databaseCreateWithCharsetMap
= ['mysql' => 'CHARACTER SET %s', 'postgresql' => "ENCODING '%s'", 'sqlserver' => '']
$identifierLimits
protected
static array<string|int, mixed>
$identifierLimits
= ['mysql' => 63, 'postgresql' => 63, 'sqlserver' => 128, 'sqlite' => 1024]
Methods
getCharset()
Return the encoding of the given platform
public
static getCharset(AbstractPlatform $platform) : string
Parameters
- $platform : AbstractPlatform
Return values
stringgetDatabaseCreateStatementWithCharset()
Return the statement to create a database with the desired encoding for the given platform
public
static getDatabaseCreateStatementWithCharset(AbstractPlatform $platform, string $databaseName) : string
Parameters
- $platform : AbstractPlatform
- $databaseName : string
Return values
stringgetMaxBindParameters()
Return information about the maximum number of bound parameters supported on this platform
public
static getMaxBindParameters(AbstractPlatform $platform) : int
Parameters
- $platform : AbstractPlatform
Return values
intgetMaxIdentifierLength()
Return information about the maximum supported length for a SQL identifier.
public
static getMaxIdentifierLength(AbstractPlatform $platform) : int
Parameters
- $platform : AbstractPlatform
Return values
intgetPlatformIdentifier()
Return the platform shortname to use as a lookup key
protected
static getPlatformIdentifier(AbstractPlatform $platform) : string
Parameters
- $platform : AbstractPlatform