PHP Класс lazyrecord\schema\DeclareColumn

Наследование: extends SQLBuilder\Universal\Syntax\Column, implements LazyRecord\Schema\ColumnAccessorInterface, implements IteratorAggregat\IteratorAggregate
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$attributes array The default attributes for a column. Variables stores in attributes should be serializable.
$locales string[]
$schema the parent schema object.

Открытые методы

Метод Описание
__construct ( DeclareSchema $schema, $name = null, $type = null ) column name (id)
__get ( $name )
__isset ( $name )
__set ( $name, $value )
applyType ( DeclareColumn $column ) : DeclareColumn Apply column type on a column object for setting foreign key.
asRuntimeColumn ( ) : RuntimeColumn Rebless the data into RuntimeColumn object.
compareType ( DeclareColumn $column )
dump ( )
export ( ) : array Export column attributes to an array.
get ( string $name ) Which should be something like getAttribute($name).
getDefaultValue ( $record = null, $args = null )
getIterator ( ) Return an array iterator of extended attributes.
getLabel ( )
getName ( )
getValidValues ( $record = null, $args = null ) For an existing record, we might need the record data to return specified valid values.
index ( $indexName = null, $using = null )
json ( )
localize ( array $locales ) provide localized columns.
name ( $name )
refer ( $schemaClass ) Use referenece from existing relationship.
renderAs ( $renderAs, array $widgetAttributes = [] )
required ( $notNull = true ) When enabled required(), notNull should also be set.
serial ( ) serial type.
toArray ( ) : array Combine column object properties and extended attributes.
validator ( )

Описание методов

__construct() публичный метод

column name (id)
public __construct ( DeclareSchema $schema, $name = null, $type = null )
$schema DeclareSchema

__get() публичный метод

public __get ( $name )

__isset() публичный метод

public __isset ( $name )

__set() публичный метод

public __set ( $name, $value )

applyType() публичный метод

Apply column type on a column object for setting foreign key.
public applyType ( DeclareColumn $column ) : DeclareColumn
$column DeclareColumn
Результат DeclareColumn

asRuntimeColumn() публичный метод

Rebless the data into RuntimeColumn object.
public asRuntimeColumn ( ) : RuntimeColumn
Результат RuntimeColumn

compareType() публичный метод

public compareType ( DeclareColumn $column )
$column DeclareColumn

dump() публичный метод

public dump ( )

export() публичный метод

Export column attributes to an array.
public export ( ) : array
Результат array

get() публичный метод

Which should be something like getAttribute($name).
public get ( string $name )
$name string attribute name

getDefaultValue() публичный метод

public getDefaultValue ( $record = null, $args = null )

getIterator() публичный метод

TODO: consider using export() method to combine the column properties.
public getIterator ( )

getLabel() публичный метод

public getLabel ( )

getName() публичный метод

public getName ( )

getValidValues() публичный метод

For an existing record, we might need the record data to return specified valid values.
public getValidValues ( $record = null, $args = null )

index() публичный метод

public index ( $indexName = null, $using = null )

json() публичный метод

public json ( )

localize() публичный метод

provide localized columns.
public localize ( array $locales )
$locales array

name() публичный метод

public name ( $name )

refer() публичный метод

Once the column is refered, the attribute will be changed, unless user override the attribute after this call.
public refer ( $schemaClass )

renderAs() публичный метод

public renderAs ( $renderAs, array $widgetAttributes = [] )
$widgetAttributes array

required() публичный метод

required() method enabled software validation.
public required ( $notNull = true )

serial() публичный метод

for postgresql-only
public serial ( )

toArray() публичный метод

Combine column object properties and extended attributes.
public toArray ( ) : array
Результат array

validator() публичный метод

public validator ( )

Описание свойств

$attributes защищенное свойство

The default attributes for a column. Variables stores in attributes should be serializable.
protected array $attributes
Результат array

$locales защищенное свойство

protected string[] $locales
Результат string[]

$schema защищенное свойство

the parent schema object.
protected $schema