Mage_Adminhtml_Model_System_Config_Backend_Encrypted Class Reference

Inheritance diagram for Mage_Adminhtml_Model_System_Config_Backend_Encrypted:

Mage_Core_Model_Config_Data Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 getOldValue ()

Protected Member Functions

 _afterLoad ()
 _beforeSave ()


Detailed Description

Definition at line 34 of file Encrypted.php.


Member Function Documentation

_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

Returns:
string

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:13 2009 for Magento by  doxygen 1.5.8