AbstractRelationship
in package
implements
RelationshipInterface
Relationship class for "has one" relationships
Tags
Interfaces, Classes, Traits and Enums
- RelationshipInterface
- Relationship class for "has one" relationships
Table of Contents
- $children : string
- Relationship children
- $foreignKey : string
- Foreign key
- $foreignTable : string
- Foreign table class
- $options : array<string|int, mixed>
- Relationship options
- __construct() : mixed
- Constructor
- getChildRelationships() : string
- Get child relationships
- getEagerRelationships() : array<string|int, mixed>
- Get eager relationships
- getForeignKey() : string
- Get foreign key
- getForeignTable() : string
- Get foreign table class
- getOptions() : array<string|int, mixed>
- Get options
- setChildRelationships() : static
- Set children child relationships
Properties
$children
Relationship children
protected
string
$children
= null
$foreignKey
Foreign key
protected
string
$foreignKey
= null
$foreignTable
Foreign table class
protected
string
$foreignTable
= null
$options
Relationship options
protected
array<string|int, mixed>
$options
= null
Methods
__construct()
Constructor
public
__construct(string $foreignTable, string $foreignKey[, array<string|int, mixed> $options = null ]) : mixed
Instantiate the relationship object
Parameters
- $foreignTable : string
- $foreignKey : string
- $options : array<string|int, mixed> = null
Return values
mixed —getChildRelationships()
Get child relationships
public
getChildRelationships() : string
Return values
string —getEagerRelationships()
Get eager relationships
public
abstract getEagerRelationships(array<string|int, mixed> $ids) : array<string|int, mixed>
Parameters
- $ids : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getForeignKey()
Get foreign key
public
getForeignKey() : string
Return values
string —getForeignTable()
Get foreign table class
public
getForeignTable() : string
Return values
string —getOptions()
Get options
public
getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —setChildRelationships()
Set children child relationships
public
setChildRelationships(string $children) : static
Parameters
- $children : string