Here is what i did:
<?php
class HomeController extends Controller {
function __construct() {
$model = new Home();
}
function index($id = null,$name = null) {
$this->set('title',$name.' - First Test page');
//$this->set('todo',$this->Item->select($id));
$model->printText('123');
}
}
Here is what it tells me only when i add __construct:
controller.class.php
<?php
class Controller {
protected $_model;
protected $_controller;
protected $_action;
protected $_template;
function __construct($model, $controller, $action) {
$this->_controller = $controller;
$this->_action = $action;
$this->_model = $model;
$this->$model =& new $model;
$this->_template =& new Template($controller,$action);
}
function set($name,$value) {
#this line# $this->_template->set($name,$value);
}
function __destruct() {
$this->_template->render();
}
}