PHP 트레잇 Eloquence\Behaviours\Cacheable

파일 보기 프로젝트 열기: kirkbushell/eloquence

공개 메소드들

메소드 설명
rebuildCacheRecord ( array $config, Model $model, $command, null $aggregateField = null ) : mixed Rebuilds the cache for the records in question.
updateCacheRecord ( array $config, string $operation, integer | float | double $amount, string $foreignKey ) Updates a table's record based on the query information provided in the $config variable.

보호된 메소드들

메소드 설명
field ( string $model, string $field ) : string Creates the key based on model properties and rules.
getModelTable ( string | Model $model ) : mixed Returns the table for a given model. Model can be an Eloquent model object, or a full namespaced class string.
key ( string $field ) : mixed Returns the true key for a given field.
processConfig ( array $config ) : array Process configuration parameters to check key names, fix snake casing, etc.

메소드 상세

field() 보호된 메소드

Creates the key based on model properties and rules.
protected field ( string $model, string $field ) : string
$model string
$field string
리턴 string

getModelTable() 보호된 메소드

Returns the table for a given model. Model can be an Eloquent model object, or a full namespaced class string.
protected getModelTable ( string | Model $model ) : mixed
$model string | Illuminate\Database\Eloquent\Model
리턴 mixed

key() 보호된 메소드

Returns the true key for a given field.
protected key ( string $field ) : mixed
$field string
리턴 mixed

processConfig() 보호된 메소드

.
protected processConfig ( array $config ) : array
$config array
리턴 array

rebuildCacheRecord() 공개 메소드

Rebuilds the cache for the records in question.
public rebuildCacheRecord ( array $config, Model $model, $command, null $aggregateField = null ) : mixed
$config array
$model Illuminate\Database\Eloquent\Model
$command
$aggregateField null
리턴 mixed

updateCacheRecord() 공개 메소드

Updates a table's record based on the query information provided in the $config variable.
public updateCacheRecord ( array $config, string $operation, integer | float | double $amount, string $foreignKey )
$config array
$operation string Whether to increase or decrease a value. Valid values: +/-
$amount integer | float | double
$foreignKey string