class My_Module_Model_MyModel extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('my_module/mymodel'); } }
class My_Module_Model_MyModel extends Mage_Core_Model_Abstract { protected $_eventPrefix = 'my_module_mymodel'; protected function _construct() { $this->_init('my_module/mymodel'); } }In this example, we define a protected property $_eventPrefix with a value of 'my_module_mymodel' and call the _construct method as in the previous example. These code examples belong to the Mage_Core_Model package library, which is a part of the Magento core.