PHP 클래스 Nwidart\Modules\Support\Migrations\SchemaParser

상속: implements Illuminate\Contracts\Support\Arrayable
파일 보기 프로젝트 열기: nwidart/laravel-modules 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$customAttributes array The array of custom attributes.
$relationshipKeys array The relationship keys.
$schema string The migration schema.

공개 메소드들

메소드 설명
__construct ( string | null $schema = null ) Create new instance.
createField ( string $column, array $attributes, $type = 'add' ) : string Create field.
down ( ) : string Render down migration fields.
getAttributes ( string $column, string $schema ) : array Get column attributes.
getColumn ( string $schema ) : string Get column name from schema.
getCustomAttribute ( string $column ) : array Get custom attributes value.
getSchemas ( ) : array Get array of schema.
hasCustomAttribute ( string $column ) : boolean Determine whether the given column is exist in customAttributes array.
parse ( string $schema ) : array Parse a string to array of formatted schema.
render ( ) : string Render the migration to formatted script.
toArray ( ) : array Convert string migration to array.
up ( ) : string Render up migration fields.

보호된 메소드들

메소드 설명
addColumn ( integer $key, string $field, string $column ) : string Format field to script.
addRelationColumn ( integer $key, string $field, string $column ) : string Add relation column.
removeColumn ( integer $key, string $field, string $column ) : string Format field to script.

메소드 상세

__construct() 공개 메소드

Create new instance.
public __construct ( string | null $schema = null )
$schema string | null

addColumn() 보호된 메소드

Format field to script.
protected addColumn ( integer $key, string $field, string $column ) : string
$key integer
$field string
$column string
리턴 string

addRelationColumn() 보호된 메소드

Add relation column.
protected addRelationColumn ( integer $key, string $field, string $column ) : string
$key integer
$field string
$column string
리턴 string

createField() 공개 메소드

Create field.
public createField ( string $column, array $attributes, $type = 'add' ) : string
$column string
$attributes array
리턴 string

down() 공개 메소드

Render down migration fields.
public down ( ) : string
리턴 string

getAttributes() 공개 메소드

Get column attributes.
public getAttributes ( string $column, string $schema ) : array
$column string
$schema string
리턴 array

getColumn() 공개 메소드

Get column name from schema.
public getColumn ( string $schema ) : string
$schema string
리턴 string

getCustomAttribute() 공개 메소드

Get custom attributes value.
public getCustomAttribute ( string $column ) : array
$column string
리턴 array

getSchemas() 공개 메소드

Get array of schema.
public getSchemas ( ) : array
리턴 array

hasCustomAttribute() 공개 메소드

Determine whether the given column is exist in customAttributes array.
public hasCustomAttribute ( string $column ) : boolean
$column string
리턴 boolean

parse() 공개 메소드

Parse a string to array of formatted schema.
public parse ( string $schema ) : array
$schema string
리턴 array

removeColumn() 보호된 메소드

Format field to script.
protected removeColumn ( integer $key, string $field, string $column ) : string
$key integer
$field string
$column string
리턴 string

render() 공개 메소드

Render the migration to formatted script.
public render ( ) : string
리턴 string

toArray() 공개 메소드

Convert string migration to array.
public toArray ( ) : array
리턴 array

up() 공개 메소드

Render up migration fields.
public up ( ) : string
리턴 string

프로퍼티 상세

$customAttributes 보호되어 있는 프로퍼티

The array of custom attributes.
protected array $customAttributes
리턴 array

$relationshipKeys 보호되어 있는 프로퍼티

The relationship keys.
protected array $relationshipKeys
리턴 array

$schema 보호되어 있는 프로퍼티

The migration schema.
protected string $schema
리턴 string