LeKoala\Encrypt\EncryptedDBJson
A simple extension over EncryptedDBText that supports json as a datastructure The data is stored in a text field
If you want to access array stuff, you need to use
$model->dbObject('myField')->toArray() or any other method
This field is a great way to store serialized encrypted data
Synopsis
class EncryptedDBJson
extends EncryptedDBText
{
- // methods
- public HiddenField scaffoldSearchField()
- public HiddenField scaffoldFormField()
- public mixed decode()
- public array decodeArray()
- public array toArray()
- public string pretty()
- public void saveInto()
- public $this addValue()
- public $this setValue()
- public void prepValueForDB()
- public boolean scalarValueOnly()
- // Inherited methods from HasEncryption
- public string prepValueForDB()
- public void setValue()
- // Inherited methods from HasBaseEncryption
- public Exception getEncryptionException()
- public EncryptedField getEncryptedField()
- public string getDecryptedValue()
- protected void setEncryptionAad()
- protected string decryptValue()
Hierarchy
Extends
Members
protected
- $encryptionAad — string
- $encryptionException — Exception
Methods
public
- addValue() — Add a value
- decode()
- decodeArray()
- prepValueForDB()
- pretty()
- saveInto()
- scaffoldFormField() — Json data is not easily displayed
- scaffoldSearchField() — We cannot search on json fields
- scalarValueOnly() — We return false because we can accept array and convert it to string
- setValue() — Internally, the value is always a json string
- toArray()
Inherited from LeKoala\Encrypt\HasEncryption
public
- prepValueForDB() — prepValueForDB gets passed $this->value
- setValue()
Inherited from LeKoala\Encrypt\HasBaseEncryption
protected
- decryptValue() — Decrypt a value using underlying EncryptedField instance
- setEncryptionAad()
public
- getDecryptedValue() — Decrypt current value using underlying EncryptedField instance
- getEncryptedField()
- getEncryptionException()