English 中文(简体)
请求
原标题:store and setRequest

I have a jobque mechanism in ZF. The jobque simlpy stores the the function call (Class, Method and params) and later executes it as CLI daemon. The daemon works, however at places the application looks for information from the request object, and when called from the CLI these places fail, or get no info.

我想将原始请求对象与工作一起存储, 当工作被处理后, 将请求对象设置为原请求完成的工作, 类似以下假代码的线条 :

$ser_request = serialize(Zend_Controller_Front::getInstance ()->getRequest ());
-->save to db

-->retrive from db
$ZCF= new Zend_Controller_Front;
$ZCF::getInstance ()->setRequest (unserialize($ser_request))

目的是稍后储存和重播这些工作,而不必更改申请的其余部分。

如何做建议?

问题回答

我不知道这是否有效, 但这里有一个想法。 尝试执行 < a href=" http:// www. php. net/ manual/ en/ language.oop5. magic.php#object. slipt. slipt" rel= “ nofollow" @ em > sleep 和 < a href=" http://www.php. net/ manual/ en/ language. opgic.php#bobject. wakeeup" rel=" no follow"\nakeup < / a] magic 方法 请求对象。 Haven t tried it out, 但也许至少是一个开始的解决办法 。





相关问题
Zend 邮件问题,涉及外国char子+ com子

泽斯德邮局在名称被定为具有外国性质(如“保”)和 com(”)的物品时,就放弃了一种例外(因为邮局(邮局)退回假)。 重新提出以下守则。

PHP Framework: Ebay Like Site

I am going to be builiding a site like ebay - with all the features of ebay. Please note my payment method is limited to paypal. What would be the best PHP framework to use to build this quickly, ...

Link to a specific step in onepage checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...

Tagging with Zend Framework

I m trying to create the same solutions as below, but using a simple MySQL query (instead of the static version used below where the words/tags are implemented in the code). The name of the MySQL ...

dynamicaly adding textboxes to zend_form

I hope that this is a quick question to answer. I am developing a form using Zend_Form, I have a number of Zend_Dojo_Form_Element_Textboxs to add to this form dynamically. These are added from rows ...

热门标签