Methods
__construct()
__construct(\Gems_Project_ProjectSettings $project, $valueMask = true)
Parameters
$project
$valueMask
Use this function for a default application of this type to the model
apply(\MUtil_Model_ModelAbstract $model, string $valueField, $methodField) : \Gems_Model_Type_EncryptedField
Parameters
$model
\MUtil_Model_ModelAbstract
$valueField
stringThe field containing the value to be encrypted
param string $methodField the field storing the method of encryption
$methodField
Returns
\Gems_Model_Type_EncryptedField(continuation pattern)
A ModelAbstract->setOnLoad() function that takes care of transforming a
dateformat read from the database to a \Zend_Date format
loadValue(mixed $value, boolean $isNew = false, string $name = null, array $context = array(), boolean $isPost = false) : \MUtil_Date | \Zend_Db_Expr | string
If empty or \Zend_Db_Expression (after save) it will return just the value
currently there are no checks for a valid date format.
Parameters
$value
mixedThe value being saved
$isNew
booleanTrue when a new item is being saved
$name
stringThe name of the current field
$context
arrayOptional, the other values being saved
$isPost
booleanTrue when passing on post data
Returns
\MUtil_Date\Zend_Db_Exprstring
A ModelAbstract->setOnSave() function that returns the input
date as a valid date.
saveEncryption(mixed $value, boolean $isNew = false, string $name = null, array $context = array()) : \Zend_Date
Parameters
$value
mixedThe value being saved
$isNew
booleanTrue when a new item is being saved
$name
stringThe name of the current field
$context
arrayOptional, the other values being saved
Returns
\Zend_Date
A ModelAbstract->setOnSave() function that returns the input
date as a valid date.
saveValue(mixed $value, boolean $isNew = false, string $name = null, array $context = array()) : \Zend_Date
Parameters
$value
mixedThe value being saved
$isNew
booleanTrue when a new item is being saved
$name
stringThe name of the current field
$context
arrayOptional, the other values being saved
Returns
\Zend_Date
A ModelAbstract->setOnSave() function that returns the input
date as a valid date.
whenEncryption(mixed $value, boolean $isNew = false, string $name = null, array $context = array()) : \Zend_Date
Parameters
$value
mixedThe value being saved
$isNew
booleanTrue when a new item is being saved
$name
stringThe name of the current field
$context
arrayOptional, the other values being saved
Returns
\Zend_Date
Properties
Array encryption value field name => encryption method field name
$findValue : array
$project
$project : \Gems_Project_ProjectSettings
Shoudl the value be masked?
$valueMask : boolean