October\Rain\Database\Behaviors\Purgeable

Extends:

Public properties

There are no public properties in the class.

Show inherited public properties

Inherited public properties

Protected properties

protected array $model

List of attribute names which should not be saved to the database.

public $purgeable = [];

protected static $purgableShownDeprecation

protected array $originalPurgeableValues

List of original attribute values before they were purged.

Show inherited protected properties

Inherited protected properties

Public methods

public void __construct($parent)
Parameters
  • $parent

public $this addPurgeable(array|string|null $attributes=NULL)

Adds an attribute to the purgeable attributes list

Parameters
  • array|string|null $attributes

public void bootPurgeable()

Boot the purgeable trait for a model.

public void getOriginalPurgeValue($attribute)

Returns the original values of any purged attributes.

Parameters
  • $attribute

public void getOriginalPurgeValues()

Returns the original values of any purged attributes.

public void getPurgeableAttributes()

Returns a collection of fields that will be hashed.

public array purgeAttributes($attributes $attributesToPurge=NULL)

Removes purged attributes from the dataset, used before saving.

Parameters
  • $attributes $attributesToPurge - Mixed Attribute(s) to purge, if unspecified, $purgable property is used

public void restorePurgedValues()

Restores the original values of any purged attributes.

Show inherited public methods

Inherited public methods

Protected methods

Show inherited protected methods

Inherited protected methods