本文整理汇总了PHP中Mage_Core_Model_Mysql4_Abstract::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Core_Model_Mysql4_Abstract::load方法的具体用法?PHP Mage_Core_Model_Mysql4_Abstract::load怎么用?PHP Mage_Core_Model_Mysql4_Abstract::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Core_Model_Mysql4_Abstract
的用法示例。
在下文中一共展示了Mage_Core_Model_Mysql4_Abstract::load方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (!intval($value) && is_string($value)) {
$field = 'identifier';
}
return parent::load($object, $value, $field);
}
示例2: load
/**
* Load an object
*
* @param Mage_Eav_Model_Form_Type $object
* @param mixed $value
* @param string $field field to load by (defaults to model id)
* @return Mage_Eav_Model_Mysql4_Form_Type
*/
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (is_null($field) && !is_numeric($value)) {
$field = 'code';
}
return parent::load($object, $value, $field);
}
示例3: load
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (strcmp($value, (int) $value) !== 0) {
$field = 'post_id';
}
return parent::load($object, $value, $field);
}
示例4: load
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (is_numeric($value)) {
return parent::load($object, $value);
}
return parent::load($object, $value, 'query_text');
}
示例5: load
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (is_string($value)) {
$field = 'string';
}
return parent::load($object, $value, $field);
}
示例6: load
public function load(Mage_Core_Model_Abstract $user, $value, $field = null)
{
if (!intval($value) && is_string($value)) {
$field = 'user_id';
}
return parent::load($user, $value, $field);
}
示例7: load
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (is_numeric($value)) {
return parent::load($object, $value);
} else {
$this->loadByQuery($object, $value);
}
return $this;
}
示例8: load
public function load(Mage_Core_Model_Abstract $object, $value, $field = null)
{
if (is_string($value)) {
$select = $this->_getReadAdapter()->select()->from($this->getMainTable())->where($this->getMainTable() . '.string=:tr_string');
$result = $this->_getReadAdapter()->fetchRow($select, array('tr_string' => $value));
$object->setData($result);
$this->_afterLoad($object);
return $result;
} else {
return parent::load($object, $value, $field);
}
}
示例9: load
public function load(Mage_Core_Model_Abstract $user, $value, $field = null)
{
return parent::load($user, $value, $field);
}