PHP Трейт Esensi\Model\Traits\RelatingModelTrait

См. также: Esensi\Model\Contracts\RelatingModelInterface
Автор: Daniel LaBarge ([email protected])
Показать файл Открыть проект

Открытые методы

Метод Описание
__call ( string $method, array $parameters ) : mixed Dynamically call methods.
__get ( string $key ) : mixed Dynamically retrieve attributes.
belongsTo ( string $related, string $foreignKey = null, string $otherKey = null, string $relation = null ) : BelongsTo Define an inverse one-to-one or many relationship.
getPivotAttributes ( string $name ) : array Return the relationship configurations.
getRelationship ( string $name ) : array Return the relationship configurations.
getRelationships ( ) : array Get the relationships.
hasPivotAttributes ( string $name ) : boolean Return whether the relationshpi has pivot attributes or not.
isRelationship ( string $name ) : boolean Return whether the name is a relationship or not.
morphTo ( string $name = null, string $type = null, string $id = null ) : Illuminate\Database\Eloquent\Relations\MorphTo Define an polymorphic, inverse one-to-one or many relationship.
scopeWithout ( Illuminate\Database\Query\Builder $query, mixed $relations ) Set the relationships that should not be eager loaded.

Защищенные методы

Метод Описание
callDynamicRelationship ( string $name ) : mixed Call a dynamically resolved relationship.
callRelationship ( string $name ) : mixed Proxy call a relationship method using the configuration arguments of the relationship.
getDynamicRelationship ( string $name ) : mixed Get a dynamically resolved relationship.

Описание методов

__call() публичный Метод

Dynamically call methods.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
Результат mixed

__get() публичный Метод

Dynamically retrieve attributes.
public __get ( string $key ) : mixed
$key string
Результат mixed

belongsTo() публичный Метод

Define an inverse one-to-one or many relationship.
public belongsTo ( string $related, string $foreignKey = null, string $otherKey = null, string $relation = null ) : BelongsTo
$related string
$foreignKey string
$otherKey string
$relation string
Результат Illuminate\Database\Eloquent\Relations\BelongsTo

callDynamicRelationship() защищенный Метод

Call a dynamically resolved relationship.
protected callDynamicRelationship ( string $name ) : mixed
$name string
Результат mixed

callRelationship() защищенный Метод

Proxy call a relationship method using the configuration arguments of the relationship.
protected callRelationship ( string $name ) : mixed
$name string of related model
Результат mixed

getDynamicRelationship() защищенный Метод

Get a dynamically resolved relationship.
protected getDynamicRelationship ( string $name ) : mixed
$name string
Результат mixed

getPivotAttributes() публичный Метод

Return the relationship configurations.
public getPivotAttributes ( string $name ) : array
$name string of related model
Результат array

getRelationship() публичный Метод

Return the relationship configurations.
public getRelationship ( string $name ) : array
$name string of related model
Результат array

getRelationships() публичный Метод

Get the relationships.
public getRelationships ( ) : array
Результат array

hasPivotAttributes() публичный Метод

Return whether the relationshpi has pivot attributes or not.
public hasPivotAttributes ( string $name ) : boolean
$name string of related model
Результат boolean

isRelationship() публичный Метод

Return whether the name is a relationship or not.
public isRelationship ( string $name ) : boolean
$name string of related model
Результат boolean

morphTo() публичный Метод

Define an polymorphic, inverse one-to-one or many relationship.
public morphTo ( string $name = null, string $type = null, string $id = null ) : Illuminate\Database\Eloquent\Relations\MorphTo
$name string
$type string
$id string
Результат Illuminate\Database\Eloquent\Relations\MorphTo

scopeWithout() публичный Метод

Set the relationships that should not be eager loaded.
public scopeWithout ( Illuminate\Database\Query\Builder $query, mixed $relations )
$query Illuminate\Database\Query\Builder
$relations mixed