MediaWiki
REL1_35
DoctrineSchemaBuilderFactory.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Wikimedia\Rdbms
;
4
5
use Doctrine\DBAL\Platforms\MySQLPlatform;
6
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
7
use Doctrine\DBAL\Platforms\SqlitePlatform;
8
use InvalidArgumentException;
9
14
class
DoctrineSchemaBuilderFactory
{
15
20
public
function
getSchemaBuilder
( $platform ) {
21
if
( $platform ===
'mysql'
) {
22
$platformObject =
new
MySQLPlatform();
23
} elseif ( $platform ===
'postgres'
) {
24
$platformObject =
new
PostgreSQL94Platform();
25
} elseif ( $platform ===
'sqlite'
) {
26
$platformObject =
new
SqlitePlatform();
27
}
else
{
28
throw
new
InvalidArgumentException(
'Unknown platform: '
. $platform );
29
}
30
31
return
new
DoctrineSchemaBuilder
( $platformObject );
32
}
33
}
Wikimedia\Rdbms\DoctrineSchemaBuilderFactory
@experimental @unstable
Definition
DoctrineSchemaBuilderFactory.php:14
Wikimedia\Rdbms\DoctrineSchemaBuilderFactory\getSchemaBuilder
getSchemaBuilder( $platform)
Definition
DoctrineSchemaBuilderFactory.php:20
Wikimedia\Rdbms\DoctrineSchemaBuilder
@experimental @unstable
Definition
DoctrineSchemaBuilder.php:12
Wikimedia\Rdbms
Definition
ChronologyProtector.php:24
includes
libs
rdbms
database
DoctrineSchemaBuilderFactory.php
Generated on Sat Apr 6 2024 00:07:26 for MediaWiki by
1.9.8