本文整理汇总了PHP中Ess_M2ePro_Model_Account::addObjectLock方法的典型用法代码示例。如果您正苦于以下问题:PHP Ess_M2ePro_Model_Account::addObjectLock方法的具体用法?PHP Ess_M2ePro_Model_Account::addObjectLock怎么用?PHP Ess_M2ePro_Model_Account::addObjectLock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ess_M2ePro_Model_Account
的用法示例。
在下文中一共展示了Ess_M2ePro_Model_Account::addObjectLock方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setLocks
public function setLocks($hash)
{
$this->listingProduct->addObjectLock(NULL, $hash);
$this->listingProduct->addObjectLock('in_action', $hash);
$this->listingProduct->addObjectLock('search_action', $hash);
$this->listingProduct->getListing()->addObjectLock(NULL, $hash);
$this->listingProduct->getListing()->addObjectLock('products_in_action', $hash);
$this->listingProduct->getListing()->addObjectLock('products_search_action', $hash);
$this->account->addObjectLock('products_in_action', $hash);
$this->account->addObjectLock('products_search_action', $hash);
$this->marketplace->addObjectLock('products_in_action', $hash);
$this->marketplace->addObjectLock('products_search_action', $hash);
$processingStatus = Ess_M2ePro_Model_Amazon_Listing_Product::GENERAL_ID_SEARCH_STATUS_PROCESSING;
$this->listingProduct->getChildObject()->setData('general_id_search_status', $processingStatus)->save();
}
示例2: setLocks
public function setLocks($hash)
{
/** @var $lockItem Ess_M2ePro_Model_LockItem */
$lockItem = Mage::getModel('M2ePro/LockItem');
$tempNick = Ess_M2ePro_Model_Buy_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX;
$tempNick .= '_' . $this->account->getId() . '_' . $this->marketplace->getId();
$lockItem->setNick($tempNick);
$lockItem->create();
$this->account->addObjectLock(NULL, $hash);
$this->account->addObjectLock('synchronization', $hash);
$this->account->addObjectLock('synchronization_buy', $hash);
$this->account->addObjectLock(Ess_M2ePro_Model_Buy_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
$this->marketplace->addObjectLock(NULL, $hash);
$this->marketplace->addObjectLock('synchronization', $hash);
$this->marketplace->addObjectLock('synchronization_buy', $hash);
$this->marketplace->addObjectLock(Ess_M2ePro_Model_Buy_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
}
示例3: setLocks
public function setLocks($hash)
{
/** @var $lockItem Ess_M2ePro_Model_LockItem */
$lockItem = Mage::getModel('M2ePro/LockItem');
$lockItemPrefix = Ess_M2ePro_Model_Play_Synchronization_Tasks_Orders_Receive::LOCK_ITEM_PREFIX;
$nick = $lockItemPrefix . '_' . $this->account->getId() . '_' . $this->marketplace->getId();
$lockItem->setNick($nick);
$lockItem->create();
$this->account->addObjectLock(NULL, $hash);
$this->account->addObjectLock('synchronization', $hash);
$this->account->addObjectLock('synchronization_play', $hash);
$this->account->addObjectLock($lockItemPrefix, $hash);
$this->marketplace->addObjectLock(NULL, $hash);
$this->marketplace->addObjectLock('synchronization', $hash);
$this->marketplace->addObjectLock('synchronization_play', $hash);
$this->marketplace->addObjectLock($lockItemPrefix, $hash);
}
示例4: setLocks
public function setLocks($hash)
{
/** @var $lockItem Ess_M2ePro_Model_LockItem */
$lockItem = Mage::getModel('M2ePro/LockItem');
$tempNick = Ess_M2ePro_Model_Play_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX;
$tempNick .= '_' . $this->account->getId() . '_' . $this->marketplace->getId();
$lockItem->setNick($tempNick);
$lockItem->create();
$this->account->addObjectLock(NULL, $hash);
$this->account->addObjectLock('synchronization', $hash);
$this->account->addObjectLock('synchronization_play', $hash);
$this->account->addObjectLock(Ess_M2ePro_Model_Play_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
$this->marketplace->addObjectLock(NULL, $hash);
$this->marketplace->addObjectLock('synchronization', $hash);
$this->marketplace->addObjectLock('synchronization_play', $hash);
$this->marketplace->addObjectLock(Ess_M2ePro_Model_Play_Synchronization_Tasks_Defaults_UpdateListingsProducts::LOCK_ITEM_PREFIX, $hash);
/** @var $connWrite Varien_Db_Adapter_Pdo_Mysql */
$connWrite = Mage::getSingleton('core/resource')->getConnection('core_write');
$tempTable = Mage::getSingleton('core/resource')->getTableName('m2epro_play_processed_inventory');
$connWrite->delete($tempTable, array('`hash` = ?' => (string) $hash));
}
示例5: setLocks
public function setLocks($hash)
{
$tempListings = array();
foreach ($this->listingsProducts as $listingProduct) {
/** @var $listingProduct Ess_M2ePro_Model_Listing_Product */
$listingProduct->addObjectLock(NULL, $hash);
$listingProduct->addObjectLock('in_action', $hash);
$listingProduct->addObjectLock('search_action', $hash);
$processingStatus = Ess_M2ePro_Model_Amazon_Listing_Product::GENERAL_ID_SEARCH_STATUS_PROCESSING;
$listingProduct->getChildObject()->setData('general_id_search_status', $processingStatus)->save();
if (isset($tempListings[$listingProduct->getListingId()])) {
continue;
}
$listingProduct->getListing()->addObjectLock(NULL, $hash);
$listingProduct->getListing()->addObjectLock('products_in_action', $hash);
$listingProduct->getListing()->addObjectLock('products_search_action', $hash);
$tempListings[$listingProduct->getListingId()] = true;
}
$this->account->addObjectLock('products_in_action', $hash);
$this->account->addObjectLock('products_search_action', $hash);
$this->marketplace->addObjectLock('products_in_action', $hash);
$this->marketplace->addObjectLock('products_search_action', $hash);
}