5 use Doctrine\DBAL\Platforms\AbstractPlatform;
6 use Doctrine\DBAL\Platforms\SqlitePlatform;
7 use Doctrine\DBAL\Types\Type;
8 use InvalidArgumentException;
36 private function getPlatform(
string $platform ) {
37 switch ( $platform ) {
48 throw new InvalidArgumentException(
'Unknown platform: ' . $platform );
57 foreach ( $customTypes as $type => [ $class, $name ] ) {
58 if ( !Type::hasType( $name ) ) {
59 Type::addType( $name, $class );
61 $platformObject->registerDoctrineTypeMapping( $type, $name );
64 return $platformObject;