Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

In Pyrocms there are Admin views and User views.

Im developing a complex module where my model file is getting to be rather large.

Should I be abstracting logic in my model files to also be User models, and an admin models of my database.

Currently I have a large Model file called products_m.php

Should I split this up in 2 files

  • products_admin_m.php
  • products_user_m.php

or should the admin inherit the user model (using PHP include).

Where products_admin_m extends products_user_m.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.