PHP 트레잇 Esensi\Model\Traits\EncryptingModelTrait

또한 보기: Esensi\Model\Contracts\EncryptionModelInterface
저자: Daniel LaBarge ([email protected])
파일 보기 프로젝트 열기: esensi/model

보호된 프로퍼티들

프로퍼티 타입 설명
$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