开发者

Inhert model in zend framework

开发者 https://www.devze.com 2023-04-12 13:36 出处:网络
I have to开发者_运维技巧 models that are practically the same, just diferent table in db and a new field,

I have to开发者_运维技巧 models that are practically the same, just diferent table in db and a new field, So is there a way in zend framework so I can inhert from the first class? and just change these two things?

The same for the controlles and view.


You can extends those classes like any other php class by using the "extend" call.

class Application_Model_Foo extends Application_Model_Bar

the same goes for controllers, but not views, as those are not classes, just php files, but You could use render method inside one view to render another view.

0

精彩评论

暂无评论...
验证码 换一张
取 消