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

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

Защищенные свойства (Protected)

Свойство Тип Описание
$purging boolean Whether the model is purging or not.

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

Метод Описание
addPurgeable ( string $attribute ) Add an attribute to the purgeable array.
bootPurgingModelTrait ( ) Boot the trait's observers.
getPurgeable ( ) : array Get the purgeable attributes.
getPurging ( ) : boolean Returns whether or not the model will purge attributes before saving.
isPurgeable ( string $attribute ) : boolean Returns whether the attribute is purgeable.
mergePurgeable ( array $attributes ) Merge an array of attributes with the purgeable array.
purgeAttributes ( ) Unset attributes that should be purged.
removePurgeable ( string $attribute ) Remove an attribute from the purgeable array.
saveWithPurging ( ) : boolean Save with purging even if purging is disabled.
saveWithoutPurging ( ) : boolean Save without purging even if purging is enabled.
setPurgeable ( array $attributes ) Set the purgeable attributes.
setPurging ( $value ) Set whether or not the model will purge attributes before saving.

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

Метод Описание
setPurgingAndSave ( boolean $purge ) : boolean Set purging state and then save and then reset it.

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

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

Add an attribute to the purgeable array.
public addPurgeable ( string $attribute )
$attribute string to purge

bootPurgingModelTrait() публичный статический Метод

Boot the trait's observers.
public static bootPurgingModelTrait ( )

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

Get the purgeable attributes.
public getPurgeable ( ) : array
Результат array

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

Returns whether or not the model will purge attributes before saving.
public getPurging ( ) : boolean
Результат boolean

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

Returns whether the attribute is purgeable.
public isPurgeable ( string $attribute ) : boolean
$attribute string name
Результат boolean

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

Merge an array of attributes with the purgeable array.
public mergePurgeable ( array $attributes )
$attributes array to purge

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

Unset attributes that should be purged.
public purgeAttributes ( )

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

Remove an attribute from the purgeable array.
public removePurgeable ( string $attribute )
$attribute string to purge

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

Save with purging even if purging is disabled.
public saveWithPurging ( ) : boolean
Результат boolean

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

Save without purging even if purging is enabled.
public saveWithoutPurging ( ) : boolean
Результат boolean

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

Set the purgeable attributes.
public setPurgeable ( array $attributes )
$attributes array to purge

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

Set whether or not the model will purge attributes before saving.
public setPurging ( $value )

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

Set purging state and then save and then reset it.
protected setPurgingAndSave ( boolean $purge ) : boolean
$purge boolean
Результат boolean

Описание свойств

$purging защищенное свойство

Whether the model is purging or not.
protected bool $purging
Результат boolean