_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'));}?>
复制代码
总结:dispatcher 是 zf 实现 mvc的重要组成部分,理解dipatcher的功能对我们更好的应用 zf或其它框架有很重要的意义。可以认为分配的作用就类似于,在路由之后执行相应行为的一个过程,然后 返回response 对象。