airportmarc Posted August 23, 2010 Share Posted August 23, 2010 Hello all, So I have created an internal messaging system for our users, and while it works, I wanted to grow my OOP knowledge. So I have 2 objects, message, and messageControl. What I wanted to know was what should do what? For example, should the message be able to send itself, or is that the job for messageControl? Also, in the message class I have a method that displays itself, is that ok or should that be handled somewhere else (I can see this looking like MVC). On the site I have other objects where I run into the same problem of what should handle what. On the site an admin can approve or deny a users request. I have an object request and requestControl. What object should handle the approve/Deny process? While not new to PHP, my OOP design knowledge is lacking. Thanks for your help, Marc Quote Link to comment https://forums.phpfreaks.com/topic/211516-help-with-designing-objects/ Share on other sites More sharing options...
ignace Posted August 27, 2010 Share Posted August 27, 2010 Something to get you started $postOffice = new PostOffice(); $message = new Message($_POST, $sender); $postOffice->distr($message, $receivers); Quote Link to comment https://forums.phpfreaks.com/topic/211516-help-with-designing-objects/#findComment-1104449 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.