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);
 }
Пример #2
0
 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";
 }
Пример #3
0
 function __construct()
 {
     parent::__construct();
 }
Пример #4
0
 public function __construct()
 {
     parent::__construct();
     $this->table = DB_PREFIX . '';
     $this->attributes = "{$this->table}.ID, {$this->table}.Name,";
 }