Esensi\Model\Contracts\HashingModelInterface::getHashing PHP Method

getHashing() public method

Returns whether or not the model will hash attributes before saving.
public getHashing ( ) : boolean
return boolean
    public function getHashing();

Usage Example

Example #1
0
 /**
  * Check if hashing is enabled and then hash the attributes
  * that need hashing.
  *
  * @param Esensi\Model\Contracts\HashingModelInterface $model
  * @param string                                       $event name
  */
 protected function performHashing(HashingModelInterface $model, $event)
 {
     if ($model->getHashing()) {
         $model->hashAttributes();
     }
 }