class ForeignKeyDefinition extends Fluent (View source)

Properties

protected $attributes from  Fluent

Methods

void
__construct(TValue> $attributes = [])

Create a new fluent instance.

from  Fluent
get($key, $default = null)

No description

from  Fluent
getAttributes()

No description

from  Fluent
toArray()

No description

from  Fluent
array
jsonSerialize()

No description

from  Fluent
string
toJson(int $options = 0)

Convert the fluent instance to JSON.

from  Fluent
bool
offsetExists(TKey $offset)

Determine if the given offset exists.

from  Fluent
mixed
offsetGet(TKey $offset)

Get the value for a given offset.

from  Fluent
void
offsetSet(TKey $offset, TValue $value)

Set the value at the given offset.

from  Fluent
void
offsetUnset(TKey $offset)

Unset the value at the given offset.

from  Fluent
$this
__call(TKey $method, $parameters)

Handle dynamic calls to the fluent instance to set attributes.

from  Fluent
TValue|null
__get(TKey $key)

Dynamically retrieve the value of an attribute.

from  Fluent
void
__set(TKey $key, TValue $value)

Dynamically set the value of an attribute.

from  Fluent
bool
__isset(TKey $key)

Dynamically check if an attribute is set.

from  Fluent
void
__unset(TKey $key)

Dynamically unset an attribute.

from  Fluent
$this
cascadeOnUpdate()

Indicate that updates should cascade.

$this
restrictOnUpdate()

Indicate that updates should be restricted.

$this
cascadeOnDelete()

Indicate that deletes should cascade.

$this
restrictOnDelete()

Indicate that deletes should be restricted.

$this
nullOnDelete()

Indicate that deletes should set the foreign key value to null.

deferrable(bool $value = true) Set the foreign key as deferrable (PostgreSQL)

No description

initiallyImmediate(bool $value = true) Set the default time to check the constraint (PostgreSQL)

No description

on(string $table)

Specify the referenced table

onDelete(string $action)

Add an ON DELETE action

onUpdate(string $action)

Add an ON UPDATE action

references(string|array $columns) Specify the referenced column(s)

No description

Details

void __construct(TValue> $attributes = [])

Create a new fluent instance.

Parameters

TValue> $attributes

Return Value

void

get($key, $default = null)

No description

Parameters

$key
$default

getAttributes()

No description

toArray()

No description

array jsonSerialize()

No description

Return Value

array

string toJson(int $options = 0)

Convert the fluent instance to JSON.

Parameters

int $options

Return Value

string

bool offsetExists(TKey $offset)

Determine if the given offset exists.

Parameters

TKey $offset

Return Value

bool

mixed offsetGet(TKey $offset)

Get the value for a given offset.

Parameters

TKey $offset

Return Value

mixed

void offsetSet(TKey $offset, TValue $value)

Set the value at the given offset.

Parameters

TKey $offset
TValue $value

Return Value

void

void offsetUnset(TKey $offset)

Unset the value at the given offset.

Parameters

TKey $offset

Return Value

void

$this __call(TKey $method, $parameters)

Handle dynamic calls to the fluent instance to set attributes.

Parameters

TKey $method
$parameters

Return Value

$this

TValue|null __get(TKey $key)

Dynamically retrieve the value of an attribute.

Parameters

TKey $key

Return Value

TValue|null

void __set(TKey $key, TValue $value)

Dynamically set the value of an attribute.

Parameters

TKey $key
TValue $value

Return Value

void

bool __isset(TKey $key)

Dynamically check if an attribute is set.

Parameters

TKey $key

Return Value

bool

void __unset(TKey $key)

Dynamically unset an attribute.

Parameters

TKey $key

Return Value

void

$this cascadeOnUpdate()

Indicate that updates should cascade.

Return Value

$this

$this restrictOnUpdate()

Indicate that updates should be restricted.

Return Value

$this

$this cascadeOnDelete()

Indicate that deletes should cascade.

Return Value

$this

$this restrictOnDelete()

Indicate that deletes should be restricted.

Return Value

$this

$this nullOnDelete()

Indicate that deletes should set the foreign key value to null.

Return Value

$this

ForeignKeyDefinition deferrable(bool $value = true) Set the foreign key as deferrable (PostgreSQL)

No description

Parameters

bool $value

Return Value

ForeignKeyDefinition

ForeignKeyDefinition initiallyImmediate(bool $value = true) Set the default time to check the constraint (PostgreSQL)

No description

Parameters

bool $value

Return Value

ForeignKeyDefinition

ForeignKeyDefinition on(string $table)

Specify the referenced table

Parameters

string $table

Return Value

ForeignKeyDefinition

ForeignKeyDefinition onDelete(string $action)

Add an ON DELETE action

Parameters

string $action

Return Value

ForeignKeyDefinition

ForeignKeyDefinition onUpdate(string $action)

Add an ON UPDATE action

Parameters

string $action

Return Value

ForeignKeyDefinition

ForeignKeyDefinition references(string|array $columns) Specify the referenced column(s)

No description

Parameters

string|array $columns) Specify the referenced column(s

Return Value

ForeignKeyDefinition