Class Relation
Representation of a relation.
- ICanBoogie\ActiveRecord\Relation uses ICanBoogie\Accessor\AccessorTrait (not available)
Direct known subclasses
ICanBoogie\ActiveRecord\BelongsToRelation
,
ICanBoogie\ActiveRecord\HasManyRelation
Methods summary
protected
|
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
public
|
#
__construct(
|
abstract public
|
|
protected
|
#
alter_prototype( ICanBoogie\Prototype $prototype, string $property )
Add a getter for the relation to the prototype. |
protected
string
|
#
resolve_activerecord_class(
Resolve the active record class name from the specified model. |
protected
string
|
#
resolve_property_name(
Resolve the property name from the related model. |
protected
|
Properties summary
protected
|
$parent
The parent model of the relation. |
|
protected
|
$related
The related model of the relation. |
|
protected
string
|
$as
The name of the relation. |
|
protected
string
|
$local_key
Local key. Default: The parent model's primary key. |
|
protected
string
|
$foreign_key
Foreign key. Default: The parent model's primary key. |
Magic properties
public read-only
|
$parent
The parent model of the relation. |
public read-only
|
$related
The related model of the relation. |
public read-only
string
|
$as
The name of the relation. |
public read-only
string
|
$local_key
The local key. |
public read-only
string
|
$foreign_key
The foreign key. |