何种建议的方法与Zentd Framework中的变量重新定位?
让我们说,我们在控制者中采取这样的行动:
public function newAction()
{
$form = new Form_ApplicationForm();
if($this->_request->isPost()){
$data = $_POST;
if($form->isValid($data)){
$appModel = new Model_Application();
$result = $appModel->createApplication($form->getValue( name ),
$form->getValue( email ),
$form->getValue( comments ));
if($result){
// redirect here
}
}else{
$form->populate($data);
}
}
$this->view->form = $form;
}
如果想转而到卢爱阵,那么我可以表明:
"增 编 for your application, your reference is #123"
如何履行这一方向?
可能的话?
$this->_redirect( /application/confirm/ .$result);
如果是的话,将如何使用<代码>(result var?
http://www.ohchr.org。 OR I 认为这将发挥作用:
$this->_redirect( /application/confirm/?id= .$result);
但是,如果是最佳做法,则不肯定吗?
我看到了一些例子,即人们使用<代码>_forward(<>>/code>,换头盔,但《URL》从未有过变化,会产生多种提交文件的问题等。
我看到有人推荐<代码>gotoSimple(),但我不肯定这一点。 尽管如此,如果这种道歉是显而易见的,但我猜测,这是在《世界人权宣言》的类型制度中具有多重用途的,因此有兴趣知道。
增 编