PHP 클래스 lazyrecord\schema\DeclareColumn

상속: extends SQLBuilder\Universal\Syntax\Column, implements LazyRecord\Schema\ColumnAccessorInterface, implements IteratorAggregat\IteratorAggregate
파일 보기 프로젝트 열기: corneltek/lazyrecord 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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