Documentation

DeferredBinding

Table of Contents

$sessionKey  : string
bindDeferred()  : mixed
Bind a deferred relationship to the supplied record.
cancelDeferred()  : mixed
Cancel all deferred bindings to this model.
commitDeferred()  : mixed
Commit all deferred bindings to this model.
isDeferrable()  : mixed
Returns true if a relation exists and can be deferred.
unbindDeferred()  : mixed
Unbind a deferred relationship to the supplied record.
commitDeferredAfter()  : mixed
Internally used method to commit all deferred bindings after saving.
commitDeferredBefore()  : mixed
Internally used method to commit all deferred bindings before saving.
commitDeferredOfType()  : mixed
Internal method for committing deferred relations.
getDeferrableRelationTypes()  : array<string|int, mixed>
Returns all possible relation types that can be deferred.
getDeferredBindingRecords()  : Collection
Returns any outstanding binding records for this model.

Properties

$sessionKey

public string $sessionKey

A unique session key used for deferred binding.

Methods

bindDeferred()

Bind a deferred relationship to the supplied record.

public bindDeferred(mixed $relation, mixed $record, mixed $sessionKey) : mixed
Parameters
$relation : mixed
$record : mixed
$sessionKey : mixed
Return values
mixed

cancelDeferred()

Cancel all deferred bindings to this model.

public cancelDeferred(mixed $sessionKey) : mixed
Parameters
$sessionKey : mixed
Return values
mixed

commitDeferred()

Commit all deferred bindings to this model.

public commitDeferred(mixed $sessionKey) : mixed
Parameters
$sessionKey : mixed
Return values
mixed

isDeferrable()

Returns true if a relation exists and can be deferred.

public isDeferrable(mixed $relationName) : mixed
Parameters
$relationName : mixed
Return values
mixed

unbindDeferred()

Unbind a deferred relationship to the supplied record.

public unbindDeferred(mixed $relation, mixed $record, mixed $sessionKey) : mixed
Parameters
$relation : mixed
$record : mixed
$sessionKey : mixed
Return values
mixed

commitDeferredAfter()

Internally used method to commit all deferred bindings after saving.

protected commitDeferredAfter(mixed $sessionKey) : mixed
Parameters
$sessionKey : mixed
Return values
mixed

commitDeferredBefore()

Internally used method to commit all deferred bindings before saving.

protected commitDeferredBefore(mixed $sessionKey) : mixed

It is a rare need to have to call this, since it only applies to the "belongs to" relationship which generally does not need deferring.

Parameters
$sessionKey : mixed
Return values
mixed

commitDeferredOfType()

Internal method for committing deferred relations.

protected commitDeferredOfType(mixed $sessionKey[, mixed $include = null ][, mixed $exclude = null ]) : mixed
Parameters
$sessionKey : mixed
$include : mixed = null
$exclude : mixed = null
Return values
mixed

getDeferrableRelationTypes()

Returns all possible relation types that can be deferred.

protected getDeferrableRelationTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDeferredBindingRecords()

Returns any outstanding binding records for this model.

protected getDeferredBindingRecords(mixed $sessionKey) : Collection
Parameters
$sessionKey : mixed
Return values
Collection

Search results