PHP 트레잇 Esensi\Model\Traits\RelatingModelTrait

또한 보기: Esensi\Model\Contracts\RelatingModelInterface
저자: Daniel LaBarge ([email protected])
파일 보기 프로젝트 열기: esensi/model

공개 메소드들

메소드 설명
__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