public function index() { // data from db or else where. // the model is an abstract example of how a model can be created. // this one is set to function together with PHPSql\DB class. $data = Model::load()->read(); // render view inside this controllers action $this->View->render(array('views/index'), $data); }
public function __construct() { parent::__construct(); $this->table = DB_PREFIX . 'Posts'; $this->attributes = "{$this->table}.ID, {$this->table}.Title, {$this->table}.Name, {$this->table}.Created, {$this->table}.Updated, {$this->table}.Start, {$this->table}.End, {$this->table}.Content, {$this->table}.Excerpt, {$this->table}.Lang, {$this->table}.Status_ID, {$this->table}.Type, {$this->table}.User_ID"; }
function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $this->table = DB_PREFIX . ''; $this->attributes = "{$this->table}.ID, {$this->table}.Name,"; }