Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function load($id, $field=null)
- {
- $this->_beforeLoad($id, $field);
- $this->_getResource()->load($this, $id, $field);
- $this->_afterLoad();
- $this->setOrigData();
- $this->_hasDataChanges = false;
- return $this;
- }
- public function load($object, $entityId, $attributes = array())
- {
- Varien_Profiler::start('__EAV_LOAD_MODEL__');
- /**
- * Load object base row data
- */
- $select = $this->_getLoadRowSelect($object, $entityId);
- $row = $this->_getReadAdapter()->fetchRow($select);
- ...
- if (empty($attributes)) {
- $this->loadAllAttributes($object);
- } else {
- foreach ($attributes as $attrCode) {
- $this->getAttribute($attrCode);
- }
- }
- $this->_loadModelAttributes($object);
- ...
- }
- $this->_getResource()->load($this, $id, $field); in Mage_Core_Model_Abstract
- public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
- {
- if (is_null($field)) {
- $field = $this->getIdFieldName();
- }
- $read = $this->_getReadAdapter();
- if ($read && !is_null($value)) {
- $select = $this->_getLoadSelect($field, $value, $object);
- $data = $read->fetchRow($select);
- if ($data) {
- $object->setData($data);
- }
- }
- $this->unserializeFields($object);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement