I think lorenzo-s has given us a simple rule ... if you have a method that end with ForFoo() like getCommentsForPhoto($photo_id) then probably it should be $Photo->getComments($photo_id).lorenzo-s wrote:My question is: where I should put the method getCommentsForPhoto()? In the Photo class or in the Comment class as getCommentsForPhoto($photo_id)? Which is more correct?
[OOP] Simple question, which is better?
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: [OOP] Simple question, which is better?
(#10850)