PHP Class Sleimanx2\Plastic\Map\Blueprint

Afficher le fichier Open project: sleimanx2/plastic Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
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.

Method Details

__construct() public méthode

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

addCommand() protected méthode

Add a new command to the blueprint.
protected addCommand ( string $name, array $parameters = [] ) : Illuminate\Support\Fluent
$name string
$parameters array
Résultat Illuminate\Support\Fluent

addField() public méthode

Add a new field to the blueprint.
public addField ( string $type, string $name, array $attributes = [] ) : Illuminate\Support\Fluent
$type string
$name string
$attributes array
Résultat Illuminate\Support\Fluent

binary() public méthode

Add a binary field to the map.
public binary ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

boolean() public méthode

Add a boolean field to the map.
public boolean ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

build() public méthode

Execute the blueprint against the database.
public build ( Connection $connection, Grammar $grammar ) : array
$connection Sleimanx2\Plastic\Connection
$grammar Grammar
Résultat array

byte() public méthode

Add a byte numeric field to the map.
public byte ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

completion() public méthode

Add a completion field to the map.
public completion ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

create() public méthode

Indicate that the table needs to be created.
public create ( ) : Illuminate\Support\Fluent
Résultat Illuminate\Support\Fluent

createCommand() protected méthode

Create a new Fluent command.
protected createCommand ( string $name, array $parameters = [] ) : Illuminate\Support\Fluent
$name string
$parameters array
Résultat Illuminate\Support\Fluent

date() public méthode

Add a date field to the map.
public date ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

double() public méthode

Add a double field to the map.
public double ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

float() public méthode

Add a float field to the map.
public float ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

getCommands() public méthode

Get the command fields.
public getCommands ( ) : array
Résultat array

getFields() public méthode

Get the registered fields.
public getFields ( ) : array
Résultat array

integer() public méthode

Add an integer field to the map.
public integer ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

ip() public méthode

Add an IPv4 field to the map.
public ip ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

long() public méthode

Add a long numeric field to the map.
public long ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

nested() public méthode

Add a nested map.
public nested ( $field, Closure $callback ) : Illuminate\Support\Fluent
$field
$callback Closure
Résultat Illuminate\Support\Fluent

object() public méthode

Add a object map.
public object ( $field, Closure $callback ) : Illuminate\Support\Fluent
$field
$callback Closure
Résultat Illuminate\Support\Fluent

point() public méthode

Add a geo point field to the map.
public point ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

shape() public méthode

Add a geo shape field to the map.
public shape ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

short() public méthode

Add a short numeric field to the map.
public short ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

string() public méthode

Add a string field to the map.
public string ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

toDSL() public méthode

Get the raw DSL statements for the blueprint.
public toDSL ( Grammar $grammar ) : array
$grammar Grammar
Résultat array

tokenCount() public méthode

Add a completion field to the map.
public tokenCount ( string $field, array $attributes = [] ) : Illuminate\Support\Fluent
$field string
$attributes array
Résultat Illuminate\Support\Fluent

Property Details

$commands protected_oe property

The commands that should be run for the type.
protected array $commands
Résultat array

$fields protected_oe property

The fields that should be mapped.
protected array $fields
Résultat array

$type protected_oe property

The type the blueprint describes.
protected string $type
Résultat string