_init('aw_hdu3/gateway', 'id'); } /** * @param Mage_Core_Model_Abstract $object * * @return $this|Mage_Core_Model_Resource_Db_Abstract */ protected function _beforeSave(Mage_Core_Model_Abstract $object) { $object->setData('password', Mage::helper('core')->encrypt($object->getData('password'))); return parent::_beforeSave($object); } /** * @param Mage_Core_Model_Abstract $object * * @return $this|Mage_Core_Model_Resource_Db_Abstract */ protected function _afterLoad(Mage_Core_Model_Abstract $object) { $object->setData('password', Mage::helper('core')->decrypt($object->getData('password'))); return parent::_afterLoad($object); } }