weierophinney/zf-quickstart — Issue #11: Create a view script used wrong variable
Author: jensklose
Created: 2011-11-24 14:40:15+00:00
State: open

zf2 docu at http://packages.zendframework.com/docs/latest/manual/en/zend.mvc.quick-start.html

9.2.5. Create a view script

Greetings!

You said "$foo".

but the Controller returned only a variable named 'message'

class HelloController extends ActionController
{
public function worldAction()
{
$message = $this->getRequest()->query()->get('message', 'foo');
return array('message' => $message);
}
}