Models
De ZanPHP
Revisión a fecha de 07:21 21 ago 2011; CZantany (Discusión | contribuciones)
Models are a fundamental part of an application, since they are in charge of interacting with the database, model, classify and to organize data.
Like the controllers, models have a basic structure that must be met to work correctly with ZanPHP:
class MyApplication_Model extends ZP_Model { public function __construct() { $this->Db = $this->db(); $this->helpers(); $this->table = "mytable"; } }
This is the basic structure that any controller should have and fulfill for the proper functioning of the framework.