-
-
public function fooAction() - {
- // forward to another action in the current controller and module:
- $this->_forward('bar', null, null, array('baz' => 'bogus'));
- }
public function barAction()
- {
- // forward to an action in another controller, FooController::bazAction (),
- // in the current module:
- $this->_forward('baz', 'foo', null, array('baz' => 'bogus'));
- }
public function bazAction()
- {
- // forward to an action in another controller in another module,
- // Foo_BarController::bazAction():
- $this->_forward('baz', 'bar ', 'foo', array('baz' => 'bogus'));
- }
- ?>
-
Copy code
Summary: Dispatcher is an important component of ZF's implementation of MVC Partly, understanding the functions of Dipatcher is very important for us to better apply ZF or other frameworks.
You can think of allocation as a process that performs the corresponding behavior after routing, and then returns the response object.
|