1. <tfoot id='KrzJo'></tfoot>

          <bdo id='KrzJo'></bdo><ul id='KrzJo'></ul>

        <small id='KrzJo'></small><noframes id='KrzJo'>

      1. <legend id='KrzJo'><style id='KrzJo'><dir id='KrzJo'><q id='KrzJo'></q></dir></style></legend>

        <i id='KrzJo'><tr id='KrzJo'><dt id='KrzJo'><q id='KrzJo'><span id='KrzJo'><b id='KrzJo'><form id='KrzJo'><ins id='KrzJo'></ins><ul id='KrzJo'></ul><sub id='KrzJo'></sub></form><legend id='KrzJo'></legend><bdo id='KrzJo'><pre id='KrzJo'><center id='KrzJo'></center></pre></bdo></b><th id='KrzJo'></th></span></q></dt></tr></i><div id='KrzJo'><tfoot id='KrzJo'></tfoot><dl id='KrzJo'><fieldset id='KrzJo'></fieldset></dl></div>
      2. Zend 框架,$this->_forward 在做什么

        时间:2023-10-02
            <bdo id='ABBKS'></bdo><ul id='ABBKS'></ul>

            <small id='ABBKS'></small><noframes id='ABBKS'>

          • <i id='ABBKS'><tr id='ABBKS'><dt id='ABBKS'><q id='ABBKS'><span id='ABBKS'><b id='ABBKS'><form id='ABBKS'><ins id='ABBKS'></ins><ul id='ABBKS'></ul><sub id='ABBKS'></sub></form><legend id='ABBKS'></legend><bdo id='ABBKS'><pre id='ABBKS'><center id='ABBKS'></center></pre></bdo></b><th id='ABBKS'></th></span></q></dt></tr></i><div id='ABBKS'><tfoot id='ABBKS'></tfoot><dl id='ABBKS'><fieldset id='ABBKS'></fieldset></dl></div>

                  <tbody id='ABBKS'></tbody>

                  <tfoot id='ABBKS'></tfoot>

                1. <legend id='ABBKS'><style id='ABBKS'><dir id='ABBKS'><q id='ABBKS'></q></dir></style></legend>
                2. 本文介绍了Zend 框架,$this->_forward 在做什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我希望有人向我解释 _forward 到底在做什么,我看不到 _forward 是否也在将附加视图渲染到操作或只是执行操作.

                  I would like someone to explain me what _forward is exactly doing, I cannot see if _forward is also rendering the attached view to the action or just executing the action.

                  还可以在视图脚本中将参数传递给 $this->action 吗?

                  Also is it possible to pass argument to $this->action in a view script ?

                  更一般地说,我的问题是如何编写确认页面,假设用户输入了一些东西并且您想向他显示确认,对于这种情况是向前的吗?

                  More generally my problem is how to code a confirmation page, let's say the user input some stuff and you want to show him confirmation, is forward is mean for that case ?

                  推荐答案

                  _forward 是内部重定向._redirect 发送的标头告诉客户端的浏览器转到某个其他 URL,而 _forward 则告诉 Dispatcher 在内部将请求重定向到其他地方.

                  _forward is an internal redirect. Where as _redirect sends a header that tells the client's browser to go to some other URL, _forward tells the Dispatcher to internally redirect the request somewhere else.

                  如果考虑正常的发货顺序:

                  If you consider the normal dispatch order of:

                   preDispatch()
                   someAction()
                   postDispatch()
                  

                  在该进程中的任何一点调用 _forward 都会导致以下步骤无法执行.因此,如果您在 preDispatch() 中调用 _forward,则不会调用 someAction() 等等.如果您在 someAction() 中使用 _forward() 并且您正在使用 viewRenderer 操作助手来呈现您的视图(您让框架选择要呈现的视图脚本),那么在 someAction() 中将不会呈现任何视图脚本.

                  Calling _forward at any point in that progression will cause the following steps to not be executed. So if you call _forward in preDispatch(), someAction() will not be called and so on. If you _forward() in someAction() and you are using the viewRenderer action helper to render your views (you are letting the framework choose what view script to render), then no view script will be rendered in someAction().

                  当请求被转发到新的控制器/模块时,整个调度过程将在那里重复.

                  When the request is forwarded to the new Controller / Module the entire dispatch process will be repeated there.

                  您可以使用以下方法找出正在调度的操作:

                  You can find out what action is being dispatched by using:

                   $action = $this->getRequest()->getParam('action');
                  

                  $action 将是动作的 url 形式,因此如果方法名称为someKindOfAction",则 $action 将包含some-kind-of".您也可以对控制器和模块执行此操作.

                  $action will be the url form of the action so if the method is name 'someKindOfAction', $action will contain 'some-kind-of'. You can do this as well for controllers and modules.

                  这篇关于Zend 框架,$this->_forward 在做什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何设置分层 Zend 休息路线? 下一篇:使用 Zend 框架 1.7.4 上传文件

                  相关文章

                  最新文章

                3. <tfoot id='9Ncy9'></tfoot>
                4. <i id='9Ncy9'><tr id='9Ncy9'><dt id='9Ncy9'><q id='9Ncy9'><span id='9Ncy9'><b id='9Ncy9'><form id='9Ncy9'><ins id='9Ncy9'></ins><ul id='9Ncy9'></ul><sub id='9Ncy9'></sub></form><legend id='9Ncy9'></legend><bdo id='9Ncy9'><pre id='9Ncy9'><center id='9Ncy9'></center></pre></bdo></b><th id='9Ncy9'></th></span></q></dt></tr></i><div id='9Ncy9'><tfoot id='9Ncy9'></tfoot><dl id='9Ncy9'><fieldset id='9Ncy9'></fieldset></dl></div>

                  <small id='9Ncy9'></small><noframes id='9Ncy9'>

                      <legend id='9Ncy9'><style id='9Ncy9'><dir id='9Ncy9'><q id='9Ncy9'></q></dir></style></legend>

                      • <bdo id='9Ncy9'></bdo><ul id='9Ncy9'></ul>