Jump to content

[SOLVED] How much should be class-ed


buddymoore

Recommended Posts

Hi there.

 

I've recently discovered the joys of OOP and have been writing classes a-plenty.

 

I'm just looking for some advice as to how far I should go in some scenarios, by means of a current example.

 

So I've programmed an events system.

 

So an event is an object.

 

It has a Title, a Date, a Picture, and then Detailed information.

 

But in my mind, that event, should be part of a larger object, the 'events system'.

 

So I can call functions to list all events etc.

 

But I can't see what an event could inherit from the events system.

 

So should I just have functions that apply to all events as functions, not tied to a particular class.

 

Hope this makes sense. Would be grateful for any advice.

Link to comment
https://forums.phpfreaks.com/topic/73116-solved-how-much-should-be-class-ed/
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.