PHP Класс Sleimanx2\Plastic\Map\Blueprint

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$commands array The commands that should be run for the type.
$fields array The fields that should be mapped.
$type string The type the blueprint describes.

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

Метод Описание
__construct ( $type, Closure $callback = null, null $index = null ) Blueprint constructor.
addField ( string $type, string $name, array $attributes = [] ) : Illuminate\Support\Fluent Add a new field to the blueprint.
binary ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a binary field to the map.
boolean ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a boolean field to the map.
build ( Connection $connection, Grammar $grammar ) : array Execute the blueprint against the database.
byte ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a byte numeric field to the map.
completion ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a completion field to the map.
create ( ) : Illuminate\Support\Fluent Indicate that the table needs to be created.
date ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a date field to the map.
double ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a double field to the map.
float ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a float field to the map.
getCommands ( ) : array Get the command fields.
getFields ( ) : array Get the registered fields.
integer ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add an integer field to the map.
ip ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add an IPv4 field to the map.
long ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a long numeric field to the map.
nested ( $field, Closure $callback ) : Illuminate\Support\Fluent Add a nested map.
object ( $field, Closure $callback ) : Illuminate\Support\Fluent Add a object map.
point ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a geo point field to the map.
shape ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a geo shape field to the map.
short ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a short numeric field to the map.
string ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a string field to the map.
toDSL ( Grammar $grammar ) : array Get the raw DSL statements for the blueprint.
tokenCount ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent Add a completion field to the map.

Защищенные методы

Метод Описание
addCommand ( string $name, array $parameters = [] ) : Illuminate\Support\Fluent Add a new command to the blueprint.
createCommand ( string $name, array $parameters = [] ) : Illuminate\Support\Fluent Create a new Fluent command.

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

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

Blueprint constructor.
public __construct ( $type, Closure $callback = null, null $index = null )
$type
$callback Closure
$index null

addCommand() защищенный Метод

Add a new command to the blueprint.
protected addCommand ( string $name, array $parameters = [] ) : Illuminate\Support\Fluent
$name string
$parameters array
Результат Illuminate\Support\Fluent

addField() публичный Метод

Add a new field to the blueprint.
public addField ( string $type, string $name, array $attributes = [] ) : Illuminate\Support\Fluent
$type string
$name string
$attributes array
Результат Illuminate\Support\Fluent

binary() публичный Метод

Add a binary field to the map.
public binary ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

boolean() публичный Метод

Add a boolean field to the map.
public boolean ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

build() публичный Метод

Execute the blueprint against the database.
public build ( Connection $connection, Grammar $grammar ) : array
$connection Sleimanx2\Plastic\Connection
$grammar Grammar
Результат array

byte() публичный Метод

Add a byte numeric field to the map.
public byte ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

completion() публичный Метод

Add a completion field to the map.
public completion ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

create() публичный Метод

Indicate that the table needs to be created.
public create ( ) : Illuminate\Support\Fluent
Результат Illuminate\Support\Fluent

createCommand() защищенный Метод

Create a new Fluent command.
protected createCommand ( string $name, array $parameters = [] ) : Illuminate\Support\Fluent
$name string
$parameters array
Результат Illuminate\Support\Fluent

date() публичный Метод

Add a date field to the map.
public date ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

double() публичный Метод

Add a double field to the map.
public double ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

float() публичный Метод

Add a float field to the map.
public float ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

getCommands() публичный Метод

Get the command fields.
public getCommands ( ) : array
Результат array

getFields() публичный Метод

Get the registered fields.
public getFields ( ) : array
Результат array

integer() публичный Метод

Add an integer field to the map.
public integer ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

ip() публичный Метод

Add an IPv4 field to the map.
public ip ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

long() публичный Метод

Add a long numeric field to the map.
public long ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

nested() публичный Метод

Add a nested map.
public nested ( $field, Closure $callback ) : Illuminate\Support\Fluent
$field
$callback Closure
Результат Illuminate\Support\Fluent

object() публичный Метод

Add a object map.
public object ( $field, Closure $callback ) : Illuminate\Support\Fluent
$field
$callback Closure
Результат Illuminate\Support\Fluent

point() публичный Метод

Add a geo point field to the map.
public point ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

shape() публичный Метод

Add a geo shape field to the map.
public shape ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

short() публичный Метод

Add a short numeric field to the map.
public short ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

string() публичный Метод

Add a string field to the map.
public string ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

toDSL() публичный Метод

Get the raw DSL statements for the blueprint.
public toDSL ( Grammar $grammar ) : array
$grammar Grammar
Результат array

tokenCount() публичный Метод

Add a completion field to the map.
public tokenCount ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Результат Illuminate\Support\Fluent

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

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

The commands that should be run for the type.
protected array $commands
Результат array

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

The fields that should be mapped.
protected array $fields
Результат array

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

The type the blueprint describes.
protected string $type
Результат string