I have some questions about the MVC posts.
Comments there are closed and redirect here.
In the view, this code looks wrong:
private $model;
public function __construct($model) {
$this->controller = $controller;
$this->model = $model;
}
There is no controller variable and no controller passed in.
In the page, this code looks wrong:
if (isset($model)) {
$m = new $model();
$c = new $controller($model);
$v = new $view($model);
echo $v->output();
}
Should it be passing the newly created model and controller into the view?
Otherwise, looks like a very helpful article.
Thanks,
Brad.