public function forward($forward, $params = [])
{
$parts = explode('/', $forward);
switch (count($parts)) {
case 1:
$this->_previousActionName = $this->_actionName;
$this->_actionName = lcfirst(Text::camelize($parts[0]));
break;
case 2:
$this->_previousControllerName = $this->_controllerName;
$this->_controllerName = Text::camelize($parts[0]);
$this->_previousActionName = $this->_actionName;
$this->_actionName = lcfirst(Text::camelize($parts[1]));
break;
default:
throw new DispatcherException('`:forward` forward format is invalid', ['forward' => $forward]);
}
$this->_params = array_merge($this->_params, $params);
$this->_finished = false;
$this->_forwarded = true;
}