Documentation

DatabaseTableSchemaCreator extends BaseModel
in package

Creates Doctrine table schema basing on the column information array.

The class is used by DatabaseTableModel class.

Tags
author

Alexey Bobkov, Samuel Georges

Table of Contents

$exists  : bool
$fillable  : mixed
$pluginCodeObj  : PluginCode
$updatedData  : mixed
$validationMessages  : mixed
$validationRules  : mixed
createTableSchema()  : Table
fill()  : mixed
getModelPluginName()  : mixed
getPluginCodeObj()  : mixed
isNewModel()  : mixed
setPluginCode()  : mixed
Sets a string code of a plugin the model is associated with
setPluginCodeObj()  : mixed
Sets a code object of a plugin the model is associated with
validate()  : mixed
formatOptions()  : mixed
Converts column options to a format supported by Doctrine\DBAL\Schema\Column
validateBeforeCreate()  : mixed

Properties

$exists

public bool $exists = false

This property is used by the system internally.

$fillable

protected static mixed $fillable = []

$pluginCodeObj

protected PluginCode $pluginCodeObj = null

The plugin code object the model is associated with.

$updatedData

protected mixed $updatedData = []

$validationMessages

protected mixed $validationMessages = []

$validationRules

protected mixed $validationRules = []

Methods

createTableSchema()

public createTableSchema(string $name, array<string|int, mixed> $columns) : Table
Parameters
$name : string

Specifies the table name.

$columns : array<string|int, mixed>

A list of the table columns.

Return values
Table

Returns the table schema.

fill()

public fill(array<string|int, mixed> $attributes) : mixed
Parameters
$attributes : array<string|int, mixed>
Return values
mixed

getModelPluginName()

public getModelPluginName() : mixed
Return values
mixed

getPluginCodeObj()

public getPluginCodeObj() : mixed
Return values
mixed

isNewModel()

public isNewModel() : mixed
Return values
mixed

setPluginCode()

Sets a string code of a plugin the model is associated with

public setPluginCode(string $code) : mixed
Parameters
$code : string

Specifies the plugin code

Return values
mixed

setPluginCodeObj()

Sets a code object of a plugin the model is associated with

public setPluginCodeObj(PluginCode $obj) : mixed
Parameters
$obj : PluginCode

Specifies the plugin code object

Return values
mixed

validate()

public validate() : mixed
Return values
mixed

formatOptions()

Converts column options to a format supported by Doctrine\DBAL\Schema\Column

protected formatOptions(mixed $type, mixed $options) : mixed
Parameters
$type : mixed
$options : mixed
Return values
mixed

validateBeforeCreate()

protected validateBeforeCreate() : mixed
Return values
mixed

Search results