Exemple #1
0
 public function __construct(Ess_M2ePro_Model_Processing_Request $processingRequest)
 {
     $this->processingRequest = $processingRequest;
     $this->hash = $this->processingRequest->getHash();
     $this->processingHash = $this->processingRequest->getProcessingHash();
     $this->params = $this->processingRequest->getDecodedResponserParams();
     $this->requestData = $this->processingRequest->getDecodedRequestBody();
     $this->performType = $this->processingRequest->getPerformType();
 }
 private function makeShutdownFunction()
 {
     if (is_null($this->processingRequest)) {
         return;
     }
     $hash = (string) $this->processingRequest->getHash();
     $processingRequestId = (int) $this->processingRequest->getId();
     $table = Mage::getResourceModel('M2ePro/LockedObject')->getMainTable();
     $functionCode = "Mage::getSingleton('core/resource')->getConnection('core_write')\n                            ->delete('" . $table . "',array('`related_hash` = ?'=>'" . $hash . "'));\n                         Mage::getSingleton('core/resource')->getConnection('core_write')\n                            ->delete('" . $table . "',array('`id` = ?'=>" . $processingRequestId . "));";
     $shutdownDeleteFunction = create_function('', $functionCode);
     register_shutdown_function($shutdownDeleteFunction);
 }