Call parent::__construct so helpers are available.

This commit is contained in:
mark_story 2011-11-22 21:02:22 -05:00
parent 6e1b1df2b2
commit cff980b45d

View file

@ -62,10 +62,8 @@ class JsonView extends View {
* @param Controller $controller
*/
public function __construct($controller) {
parent::__construct($controller);
if (is_object($controller)) {
foreach (array('viewVars', 'viewPath', 'view', 'response') as $var) {
$this->{$var} = $controller->{$var};
}
$this->response->type('json');
}
}