PHP Трейт Esensi\Model\Traits\EncryptingModelTrait

См. также: Esensi\Model\Contracts\EncryptionModelInterface
Автор: Daniel LaBarge ([email protected])
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$encrypter Illuminate\Encryption\Encrypter The Encrypter to use for encryption.
$encrypting boolean Whether the model is encrypting or not.

Открытые методы

Метод Описание
__get ( string $key ) : mixed Dynamically retrieve attributes.
__set ( string $key, mixed $value ) Dynamically set attributes.
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.
getEncryptedAttribute ( string $attribute ) : string Get the decrypted value for an encrypted attribute.
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.
setEncryptingAttribute ( string $attribute, string $value ) Set an encrypted value for an encryptable attribute.

Защищенные методы

Метод Описание
getDynamicEncrypted ( string $attribute ) : mixed Get an encrypted attribute dynamically.
setDynamicEncryptable ( string $attribute, mixed $value ) : boolean Set an encryptable attribute dynamically.

Описание методов

__get() публичный Метод

Dynamically retrieve attributes.
public __get ( string $key ) : mixed
$key string
Результат mixed

__set() публичный Метод

Dynamically set attributes.
public __set ( string $key, mixed $value )
$key string
$value mixed

addEncryptable() публичный Метод

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

decrypt() публичный Метод

Return a decrypted string for the value.
public decrypt ( string $value ) : string
$value string
Результат string

encrypt() публичный Метод

Return an encrypted string for the value.
public encrypt ( string $value ) : string
$value string
Результат string

encryptAttributes() публичный Метод

Encrypt attributes that should be encrypted.
public encryptAttributes ( )

getDynamicEncrypted() защищенный Метод

Get an encrypted attribute dynamically.
protected getDynamicEncrypted ( string $attribute ) : mixed
$attribute string
Результат mixed

getEncryptable() публичный Метод

Get the encryptable attributes.
public getEncryptable ( ) : array
Результат array

getEncryptedAttribute() публичный Метод

Get the decrypted value for an encrypted attribute.
public getEncryptedAttribute ( string $attribute ) : string
$attribute string name
Результат string

getEncrypter() публичный Метод

Set the Encrypter to use for encryption.
public getEncrypter ( ) : Illuminate\Encryption\Encrypter
Результат Illuminate\Encryption\Encrypter

getEncrypting() публичный Метод

Returns whether or not the model will encrypt attributes when setting and decrypt when getting.
public getEncrypting ( ) : boolean
Результат boolean

isDecrypted() публичный Метод

Returns whether the attribute is decrypted.
public isDecrypted ( string $attribute ) : boolean
$attribute string name
Результат boolean

isEncryptable() публичный Метод

Returns whether the attribute is encryptable.
public isEncryptable ( string $attribute ) : boolean
$attribute string name
Результат boolean

isEncrypted() публичный Метод

Returns whether the attribute is encrypted.
public isEncrypted ( string $attribute ) : boolean
$attribute string name
Результат boolean

mergeEncryptable() публичный Метод

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

removeEncryptable() публичный Метод

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

setDynamicEncryptable() защищенный Метод

Set an encryptable attribute dynamically.
protected setDynamicEncryptable ( string $attribute, mixed $value ) : boolean
$attribute string
$value mixed
Результат boolean

setEncryptable() публичный Метод

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

setEncrypter() публичный Метод

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

setEncrypting() публичный Метод

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

setEncryptingAttribute() публичный Метод

Set an encrypted value for an encryptable attribute.
public setEncryptingAttribute ( string $attribute, string $value )
$attribute string name
$value string to encrypt

Описание свойств

$encrypter защищенное свойство

The Encrypter to use for encryption.
protected Encrypter,Illuminate\Encryption $encrypter
Результат Illuminate\Encryption\Encrypter

$encrypting защищенное свойство

Whether the model is encrypting or not.
protected bool $encrypting
Результат boolean