2008年12月6日星期六

[fw-db] Using a zend framework model question

I would like to use models which i never used before.
Usualy i am doing all DB related things inside my controller.
But i was thinking in my sleeples last night that using a model would be
much better :)
Is it possible to do something like this?
class someController extendes Zend_Controller {

indexActio(){
}
viewAction(){
there i would like to grab some method from my model...
}
editAction(){
there i would like to grab another method from model...
}
}

Model
******
class someModle extends Zend_db...{
protected $_name = 'news';
public function viewNews ($newsID){
return news
}
public function editNews($newsID){
edit news
}
.......

Thank you,
V
--
View this message in context: http://www.nabble.com/Using-a-zend-framework-model-question-tp20868626p20868626.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: