I have a class Company
, this class has some methods to search, list, etc and is used for the visitors of my website. But I have a different class adminCompany
, which works only, when there is an admin user logged in. This class has the other methods: update_info_company()
, delete_company()
, and whatever an admin can do
My questions are:
- Should I have a single class (Company) to do everything and just restrict access to some methods?
- Is this against the principles of OOP?.
PD: it`s just to keep cleaner and shorter classes.