PHP 클래스 LMongo\Eloquent\Relations\Relation

파일 보기 프로젝트 열기: navruzm/lmongo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$parent LMongo\Eloquent\Model The parent model instance.
$query LMongo\Eloquent\Builder The Eloquent query builder instance.
$related LMongo\Eloquent\Model The related model instance.

공개 메소드들

메소드 설명
__call ( string $method, array $parameters ) : mixed Handle dynamic method calls to the relationship.
__construct ( Builder $query, Model $parent ) : void Create a new relation instance.
addConstraints ( ) : void Set the base constraints on the relation query.
addEagerConstraints ( array $models ) : void Set the constraints for an eager load of the relation.
createdAt ( ) : string Get the name of the "created at" column.
getAndResetWheres ( ) : array Remove the original where clause set by the relationship.
getBaseQuery ( ) : Builder Get the base query builder driving the Eloquent builder.
getParent ( ) : Model Get the parent model of the relation.
getQuery ( ) : Builder Get the underlying query for the relation.
getRelated ( ) : Model Get the related model of the relation.
getResults ( ) : mixed Get the results of the relationship.
initRelation ( array $models, string $relation ) : void Initialize the relation on a set of models.
match ( array $models, Collection $results, string $relation ) : array Match the eagerly loaded results to their parents.
rawUpdate ( array $attributes = [] ) : integer Run a raw update against the base query.
relatedUpdatedAt ( ) : string Get the name of the related model's "updated at" column.
restore ( ) : integer Restore all of the soft deleted related models.
touch ( ) : void Touch all of the related models for the relationship.
updatedAt ( ) : string Get the name of the "updated at" column.

보호된 메소드들

메소드 설명
getKeys ( array $models ) : array Get all of the primary keys for an array of models.
removeFirstWhereClause ( ) : void Remove the first where clause from the relationship query.
removeSecondWhereClause ( ) : void Remove the second where clause from the relationship query.

메소드 상세

__call() 공개 메소드

Handle dynamic method calls to the relationship.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__construct() 공개 메소드

Create a new relation instance.
public __construct ( Builder $query, Model $parent ) : void
$query LMongo\Eloquent\Builder
$parent LMongo\Eloquent\Model
리턴 void

addConstraints() 추상적인 공개 메소드

Set the base constraints on the relation query.
abstract public addConstraints ( ) : void
리턴 void

addEagerConstraints() 추상적인 공개 메소드

Set the constraints for an eager load of the relation.
abstract public addEagerConstraints ( array $models ) : void
$models array
리턴 void

createdAt() 공개 메소드

Get the name of the "created at" column.
public createdAt ( ) : string
리턴 string

getAndResetWheres() 공개 메소드

The remaining constraints on the query will be reset and returned.
public getAndResetWheres ( ) : array
리턴 array

getBaseQuery() 공개 메소드

Get the base query builder driving the Eloquent builder.
public getBaseQuery ( ) : Builder
리턴 LMongo\Query\Builder

getKeys() 보호된 메소드

Get all of the primary keys for an array of models.
protected getKeys ( array $models ) : array
$models array
리턴 array

getParent() 공개 메소드

Get the parent model of the relation.
public getParent ( ) : Model
리턴 LMongo\Eloquent\Model

getQuery() 공개 메소드

Get the underlying query for the relation.
public getQuery ( ) : Builder
리턴 LMongo\Eloquent\Builder

getRelated() 공개 메소드

Get the related model of the relation.
public getRelated ( ) : Model
리턴 LMongo\Eloquent\Model

getResults() 추상적인 공개 메소드

Get the results of the relationship.
abstract public getResults ( ) : mixed
리턴 mixed

initRelation() 추상적인 공개 메소드

Initialize the relation on a set of models.
abstract public initRelation ( array $models, string $relation ) : void
$models array
$relation string
리턴 void

match() 추상적인 공개 메소드

Match the eagerly loaded results to their parents.
abstract public match ( array $models, Collection $results, string $relation ) : array
$models array
$results LMongo\Eloquent\Collection
$relation string
리턴 array

rawUpdate() 공개 메소드

Run a raw update against the base query.
public rawUpdate ( array $attributes = [] ) : integer
$attributes array
리턴 integer

relatedUpdatedAt() 공개 메소드

Get the name of the related model's "updated at" column.
public relatedUpdatedAt ( ) : string
리턴 string

removeFirstWhereClause() 보호된 메소드

Remove the first where clause from the relationship query.
protected removeFirstWhereClause ( ) : void
리턴 void

removeSecondWhereClause() 보호된 메소드

Remove the second where clause from the relationship query.
protected removeSecondWhereClause ( ) : void
리턴 void

restore() 공개 메소드

Restore all of the soft deleted related models.
public restore ( ) : integer
리턴 integer

touch() 공개 메소드

Touch all of the related models for the relationship.
public touch ( ) : void
리턴 void

updatedAt() 공개 메소드

Get the name of the "updated at" column.
public updatedAt ( ) : string
리턴 string

프로퍼티 상세

$parent 보호되어 있는 프로퍼티

The parent model instance.
protected Model,LMongo\Eloquent $parent
리턴 LMongo\Eloquent\Model

$query 보호되어 있는 프로퍼티

The Eloquent query builder instance.
protected Builder,LMongo\Eloquent $query
리턴 LMongo\Eloquent\Builder