Public Member Functions | |
getOldValue () | |
Protected Member Functions | |
_afterLoad () | |
_beforeSave () |
Definition at line 34 of file Encrypted.php.
_afterLoad | ( | ) | [protected] |
Decrypt value after loading
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 41 of file Encrypted.php.
00042 { 00043 $value = (string)$this->getValue(); 00044 if (!empty($value) && ($decrypted = Mage::helper('core')->decrypt($value))) { 00045 $this->setValue($decrypted); 00046 } 00047 }
_beforeSave | ( | ) | [protected] |
Encrypt value before saving
Reimplemented from Mage_Core_Model_Abstract.
Definition at line 53 of file Encrypted.php.
00054 { 00055 $value = (string)$this->getValue(); 00056 // don't change value, if an obscured value came 00057 if (preg_match('/^\*+$/', $this->getValue())) { 00058 $value = $this->getOldValue(); 00059 } 00060 if (!empty($value) && ($encrypted = Mage::helper('core')->encrypt($value))) { 00061 $this->setValue($encrypted); 00062 } 00063 }
getOldValue | ( | ) |
Get & decrypt old value from configuration
Reimplemented from Mage_Core_Model_Config_Data.
Definition at line 70 of file Encrypted.php.
00071 { 00072 return Mage::helper('core')->decrypt(parent::getOldValue()); 00073 }