I thought I could use Zend_Db_Table as a class to be extended so I could use
them as a Model in MVC
here is some part of my code:
class BizMS_Model_Page extends Zend_Db_Table {
protected $_name = 'bizms_page';
protected static $_tableName = 'bizms_page';
public function __construct($id = NULL){
parent::__construct();
if ($id && is_int($id) && $id > 0) {
$this->_data = $this->find($id)->toArray();
}
}
// [...]
}
I thought I could Just do something like:
$page = new BizMS_Model_Page();
$data = array ('title' => 'My title', 'content' => $content);
$page->insert($page);
wich I can.. and it seems like it is a Model from MVC
So the next thing I would like to do is to create a new Page:
$page = new BizMS_Model_Page($id);
To do this, I had to overload my "model" with the code above, but then I
can't call
$page->title
Is there a how-to create Models from MVC with ZF?
Thanks
--
Stuardo -StR- Rodríguez
.-[Just me and the world I created]-.
email: [EMAIL PROTECTED]
www: http://strgt.cjb.net
phpgt: http://php.develsystems.com