rjmcb
rjmcb

Reputation: 3745

Zend Framework $this->_forward to send POST/GET parameters

Is it possible to send POST/GET parameters to in a controller using

$this->_forward("/url/here");

Upvotes: 0

Views: 6268

Answers (1)

mpm
mpm

Reputation: 20155

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'));
}

according to the manual , you can send parameters with an array , should be the last argument.

Upvotes: 2

Related Questions