protected function deferPurgedSaveAttributes($model, $attributesToPurge)
    {
        if (!is_array($attributesToPurge)) {
            return;
        }

        /*
         * Compatibility with Purgeable trait:
         * This will give the ability to restore purged attributes
         * and make them available again if necessary.
         */
        if (method_exists($model, 'getPurgeableAttributes')) {
            $model->addPurgeable($attributesToPurge);
        }
        else {
            $model->bindEventOnce('model.saveInternal', function () use ($model, $attributesToPurge) {
                foreach ($attributesToPurge as $attribute) {
                    unset($model->attributes[$attribute]);
                }
            });
        }
    }
protected function deferPurgedSaveAttributes($model, $attributesToPurge)
    {
        if (!is_array($attributesToPurge)) {
            return;
        }

        /*
         * Compatibility with Purgeable trait:
         * This will give the ability to restore purged attributes
         * and make them available again if necessary.
         */
        if (method_exists($model, 'getPurgeableAttributes')) {
            $model->addPurgeable($attributesToPurge);
        }
        else {
            $model->bindEventOnce('model.saveInternal', function () use ($model, $attributesToPurge) {
                foreach ($attributesToPurge as $attribute) {
                    unset($model->attributes[$attribute]);
                }
            });
        }
    }
protected function deferPurgedSaveAttributes ( $ model , $ attributesToPurge ) { if ( ! is_array ( $ attributesToPurge ) ) { return ; } /*
         * Compatibility with Purgeable trait:
         * This will give the ability to restore purged attributes
         * and make them available again if necessary.
         */ if ( method_exists ( $ model , 'getPurgeableAttributes' ) ) { $ model -> addPurgeable ( $ attributesToPurge ) ; } else { $ model -> bindEventOnce ( 'model.saveInternal' , function ( ) use ( $ model , $ attributesToPurge ) { foreach ( $ attributesToPurge as $ attribute ) { unset ( $ model -> attributes [ $ attribute ] ) ; } } ) ; } }
Removes an array of attributes from the model. If the model implements
the Purgeable trait, this is preferred over the internal logic.

@param \October\Rain\Database\Model $model Model to adjust.
@param array $attributesToPurge Attribute values to remove from the model.
@return void
Removes an array of attributes from the model . If the model implements the Purgeable trait this is preferred over the internal logic .