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))
目的是稍后储存和重播这些工作,而不必更改申请的其余部分。
如何做建议?