PHP Interface Esensi\Model\Contracts\EncryptingModelInterface

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

Public Methods

Method Description
addEncryptable ( string $attribute ) Add an attribute to the encryptable array.
decrypt ( string $value ) : string Return a decrypted string for the value.
encrypt ( string $value ) : string Return an encrypted string for the value.
encryptAttributes ( ) Encrypt attributes that should be encrypted.
getEncryptable ( ) : array Get the encryptable attributes.
getEncrypter ( ) : Illuminate\Encryption\Encrypter Set the Encrypter to use for encryption.
getEncrypting ( ) : boolean Returns whether or not the model will encrypt attributes when setting and decrypt when getting.
isDecrypted ( string $attribute ) : boolean Returns whether the attribute is decrypted.
isEncryptable ( string $attribute ) : boolean Returns whether the attribute is encryptable.
isEncrypted ( string $attribute ) : boolean Returns whether the attribute is encrypted.
mergeEncryptable ( array $attributes ) Merge an array of attributes with the encryptable array.
removeEncryptable ( string $attribute ) Remove an attribute from the encryptable array.
setEncryptable ( array $attributes ) Set the encryptable attributes.
setEncrypter ( Illuminate\Encryption\Encrypter $encrypter ) Set the Encrypter to use for encryption.
setEncrypting ( $value ) Set whether or not the model will encrypt attributes when setting and decrypt when getting.

Method Details

addEncryptable() public method

Add an attribute to the encryptable array.
public addEncryptable ( string $attribute )
$attribute string to encrypt

decrypt() public method

Return a decrypted string for the value.
public decrypt ( string $value ) : string
$value string
return string

encrypt() public method

Return an encrypted string for the value.
public encrypt ( string $value ) : string
$value string
return string

encryptAttributes() public method

Encrypt attributes that should be encrypted.
public encryptAttributes ( )

getEncryptable() public method

Get the encryptable attributes.
public getEncryptable ( ) : array
return array

getEncrypter() public method

Set the Encrypter to use for encryption.
public getEncrypter ( ) : Illuminate\Encryption\Encrypter
return Illuminate\Encryption\Encrypter $encrypter

getEncrypting() public method

Returns whether or not the model will encrypt attributes when setting and decrypt when getting.
public getEncrypting ( ) : boolean
return boolean

isDecrypted() public method

Returns whether the attribute is decrypted.
public isDecrypted ( string $attribute ) : boolean
$attribute string name
return boolean

isEncryptable() public method

Returns whether the attribute is encryptable.
public isEncryptable ( string $attribute ) : boolean
$attribute string name
return boolean

isEncrypted() public method

Returns whether the attribute is encrypted.
public isEncrypted ( string $attribute ) : boolean
$attribute string name
return boolean

mergeEncryptable() public method

Merge an array of attributes with the encryptable array.
public mergeEncryptable ( array $attributes )
$attributes array to encrypt

removeEncryptable() public method

Remove an attribute from the encryptable array.
public removeEncryptable ( string $attribute )
$attribute string to encrypt

setEncryptable() public method

Set the encryptable attributes.
public setEncryptable ( array $attributes )
$attributes array to encrypt

setEncrypter() public method

Set the Encrypter to use for encryption.
public setEncrypter ( Illuminate\Encryption\Encrypter $encrypter )
$encrypter Illuminate\Encryption\Encrypter

setEncrypting() public method

Set whether or not the model will encrypt attributes when setting and decrypt when getting.
public setEncrypting ( $value )