TableDiff extends TableDiff

Based on the doctrine/dbal implementation restoring direct property access and adding further helper methods.

Internal

not part of public core API.

Table of Contents

Properties

$addedColumns  : array<string|int, mixed>
$addedForeignKeys  : array<string|int, mixed>
$addedIndexes  : array<string|int, mixed>
$changedColumns  : array<string|int, mixed>
$droppedColumns  : array<string|int, mixed>
$droppedForeignKeys  : array<string|int, mixed>
$droppedIndexes  : array<string|int, mixed>
$modifiedForeignKeys  : array<string|int, mixed>
$modifiedIndexes  : array<string|int, mixed>
$newName  : string|null
$newTableName is a TYPO3 internal addition to handle renames at a later point.
$oldTable  : Table
$renamedIndexes  : array<string|int, mixed>
$tableOptions  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructs a TableDiff object.
ensure()  : self
getAddedColumns()  : array<string, Column>
getAddedForeignKeys()  : array<string|int, ForeignKeyConstraint>
getAddedIndexes()  : array<string, Index>
getChangedColumns()  : array<string, ColumnDiff>
getDroppedColumns()  : array<string, Column>
getDroppedForeignKeys()  : array<string|int, ForeignKeyConstraint>
getDroppedIndexes()  : array<string, Index>
getModifiedForeignKeys()  : array<string|int, ForeignKeyConstraint>
getModifiedIndexes()  : array<string, Index>
getNewName()  : string|null
getOldTable()  : Table
getRenamedIndexes()  : array<string, Index>
getTableOption()  : string
getTableOptions()  : array<int|string, mixed>
Getter for table options.
hasTableOption()  : bool
Check if a table options has been set.
isEmpty()  : bool
setTableOptions()  : self
Setter for table options
unsetAddedIndex()  : void
unsetDroppedIndex()  : void

Properties

$addedColumns

public array<string|int, mixed> $addedColumns = []

$addedForeignKeys

public array<string|int, mixed> $addedForeignKeys = []

$addedIndexes

public array<string|int, mixed> $addedIndexes = []

$changedColumns

public array<string|int, mixed> $changedColumns = []

$droppedColumns

public array<string|int, mixed> $droppedColumns = []

$droppedForeignKeys

public array<string|int, mixed> $droppedForeignKeys = []

$droppedIndexes

public array<string|int, mixed> $droppedIndexes = []

$modifiedForeignKeys

public array<string|int, mixed> $modifiedForeignKeys = []

$modifiedIndexes

public array<string|int, mixed> $modifiedIndexes = []

$newName

$newTableName is a TYPO3 internal addition to handle renames at a later point.

public string|null $newName = null

$renamedIndexes

public array<string|int, mixed> $renamedIndexes = []

$tableOptions

public array<string|int, mixed> $tableOptions = []

Methods

__construct()

Constructs a TableDiff object.

public __construct(Table $oldTable[, array<string, Column$addedColumns = [] ][, array<string, ColumnDiff$changedColumns = [] ][, array<string, Column$droppedColumns = [] ][, array<string, Index$addedIndexes = [] ][, array<string, Index$modifiedIndexes = [] ][, array<string, Index$droppedIndexes = [] ][, array<string, Index$renamedIndexes = [] ][, array<string|int, ForeignKeyConstraint$addedForeignKeys = [] ][, array<string|int, ForeignKeyConstraint$modifiedForeignKeys = [] ][, array<string|int, ForeignKeyConstraint$droppedForeignKeys = [] ][, array<int|string, mixed> $tableOptions = [] ]) : mixed
Parameters
$oldTable : Table
$addedColumns : array<string, Column> = []
$changedColumns : array<string, ColumnDiff> = []
$droppedColumns : array<string, Column> = []
$addedIndexes : array<string, Index> = []
$modifiedIndexes : array<string, Index> = []
$droppedIndexes : array<string, Index> = []
$renamedIndexes : array<string, Index> = []
$addedForeignKeys : array<string|int, ForeignKeyConstraint> = []
$modifiedForeignKeys : array<string|int, ForeignKeyConstraint> = []
$droppedForeignKeys : array<string|int, ForeignKeyConstraint> = []
$tableOptions : array<int|string, mixed> = []
Internal

The diff can be only instantiated by a Comparator.

Tags
todo

Consider to change from array to typed collections with array access support.

getAddedColumns()

public getAddedColumns() : array<string, Column>
Return values
array<string, Column>

getAddedForeignKeys()

public getAddedForeignKeys() : array<string|int, ForeignKeyConstraint>
Return values
array<string|int, ForeignKeyConstraint>

getAddedIndexes()

public getAddedIndexes() : array<string, Index>
Return values
array<string, Index>

getDroppedColumns()

public getDroppedColumns() : array<string, Column>
Return values
array<string, Column>

getDroppedForeignKeys()

public getDroppedForeignKeys() : array<string|int, ForeignKeyConstraint>
Return values
array<string|int, ForeignKeyConstraint>

getDroppedIndexes()

public getDroppedIndexes() : array<string, Index>
Return values
array<string, Index>

getModifiedForeignKeys()

public getModifiedForeignKeys() : array<string|int, ForeignKeyConstraint>
Return values
array<string|int, ForeignKeyConstraint>

getModifiedIndexes()

public getModifiedIndexes() : array<string, Index>
Return values
array<string, Index>

getNewName()

public getNewName() : string|null
Return values
string|null

getOldTable()

public getOldTable() : Table
Return values
Table

getRenamedIndexes()

public getRenamedIndexes() : array<string, Index>
Return values
array<string, Index>

getTableOption()

public getTableOption(string $optionName) : string
Parameters
$optionName : string
Return values
string

getTableOptions()

Getter for table options.

public getTableOptions() : array<int|string, mixed>
Return values
array<int|string, mixed>

hasTableOption()

Check if a table options has been set.

public hasTableOption(string $optionName) : bool
Parameters
$optionName : string
Return values
bool

isEmpty()

public isEmpty() : bool
Return values
bool

setTableOptions()

Setter for table options

public setTableOptions(array<int|string, mixed> $tableOptions) : self
Parameters
$tableOptions : array<int|string, mixed>
Return values
self

unsetAddedIndex()

public unsetAddedIndex(Index $index) : void
Parameters
$index : Index
Internal

This method exists only for compatibility with the current implementation of schema managers that modify the diff while processing it.

unsetDroppedIndex()

public unsetDroppedIndex(Index $index) : void
Parameters
$index : Index
Internal

This method exists only for compatibility with the current implementation of schema managers that modify the diff while processing it.


        
On this page

Search results