TableBuilder

Converts a CreateTableStatement syntax node into a Doctrine Table object that represents the table defined in the original SQL statement.

Table of Contents

Properties

$platform  : AbstractPlatform
$table  : Table

Methods

__construct()  : mixed
TableBuilder constructor.
create()  : Table
Create a Doctrine Table object based on the parsed MySQL SQL command.
addColumn()  : Column
addForeignKey()  : mixed
Prepare an explicit foreign key definition item to be added to the table being built.
addForeignKeyConstraint()  : mixed
Add a foreign key constraint to the table being built.
addIndex()  : Index
buildTableOptions()  : array<string|int, mixed>
Build the table specific options as far as they are supported by Doctrine.
getDoctrineColumnTypeName()  : string

Properties

$platform

protected AbstractPlatform $platform

Methods

__construct()

TableBuilder constructor.

public __construct([AbstractPlatform|null $platform = null ]) : mixed
Parameters
$platform : AbstractPlatform|null = null
Tags
throws
InvalidArgumentException
throws
Exception

create()

Create a Doctrine Table object based on the parsed MySQL SQL command.

public create(CreateTableStatement $tableStatement) : Table
Parameters
$tableStatement : CreateTableStatement
Tags
throws
SchemaException
throws
RuntimeException
throws
InvalidArgumentException
Return values
Table

addForeignKeyConstraint()

Add a foreign key constraint to the table being built.

protected addForeignKeyConstraint(array<string|int, string> $localColumnNames, ReferenceDefinition $referenceDefinition[, string|null $indexName = null ]) : mixed
Parameters
$localColumnNames : array<string|int, string>
$referenceDefinition : ReferenceDefinition
$indexName : string|null = null

buildTableOptions()

Build the table specific options as far as they are supported by Doctrine.

protected buildTableOptions(array<string|int, mixed> $tableOptions) : array<string|int, mixed>
Parameters
$tableOptions : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results