PHP Interface Esensi\Model\Contracts\PurgingModelInterface

Author: Daniel LaBarge ([email protected])
Show file Open project: esensi/model Interface Usage Examples

Public Methods

Method Description
addPurgeable ( string $attribute ) Add an attribute to the purgeable array.
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.

Method Details

addPurgeable() public method

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

getPurgeable() public method

Get the purgeable attributes.
public getPurgeable ( ) : array
return array

getPurging() public method

Returns whether or not the model will purge attributes before saving.
public getPurging ( ) : boolean
return boolean

isPurgeable() public method

Returns whether the attribute is purgeable.
public isPurgeable ( string $attribute ) : boolean
$attribute string name
return boolean

mergePurgeable() public method

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

purgeAttributes() public method

Unset attributes that should be purged.
public purgeAttributes ( )

removePurgeable() public method

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

saveWithPurging() public method

Save with purging even if purging is disabled.
public saveWithPurging ( ) : boolean
return boolean

saveWithoutPurging() public method

Save without purging even if purging is enabled.
public saveWithoutPurging ( ) : boolean
return boolean

setPurgeable() public method

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

setPurging() public method

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