\Pop\Db\Record\RelationshipsHasOneOf

Relationship class for "has one of" relationships

Summary

Methods
Properties
Constants
__construct()
getForeignTable()
getForeignKey()
getEagerRelationships()
getParent()
getChild()
No public properties found
No constants found
No protected methods found
$foreignTable
$foreignKey
$parent
N/A
No private methods found
No private properties found
N/A

Properties

$foreignTable

$foreignTable : string

Foreign table class

Type

string

$foreignKey

$foreignKey : string

Foreign key

Type

string

$parent

$parent : \Pop\Db\Record

Parent record

Type

\Pop\Db\Record

Methods

__construct()

__construct(\Pop\Db\Record  $parent, string  $foreignTable, string  $foreignKey) 

Constructor

Instantiate the relationship object

Parameters

\Pop\Db\Record $parent
string $foreignTable
string $foreignKey

getForeignTable()

getForeignTable() : string

Get foreign table class

Returns

string

getForeignKey()

getForeignKey() : string

Get foreign key

Returns

string

getEagerRelationships()

getEagerRelationships(array  $ids) : array

Get eager relationships

Parameters

array $ids

Throws

\Pop\Db\Record\Relationships\Exception

Returns

array

getParent()

getParent() : \Pop\Db\Record

Get parent record

Returns

\Pop\Db\Record

getChild()

getChild() : \Pop\Db\Record

Get child

Returns

\Pop\Db\Record