|
Posted by Angelos on 10/27/15 11:33
First of all I need to thank you in advance...
Now I 'll try to show you what I want do and if you can, tell me how My
class should be composed.
I have a CMS. I add content and that Content can be Published
Unpublished and Backuped. Now the content has Several Types like...
pages,news,products.
I am trying to write a class Content that will cover the common bits
that Several Content Types have and the rest will be inherited.
But I don't know how I am going to create different Contents based on
the fact they are Published Unpublished and Backuped. Those three in the
database are different tables.. Published and Unpublished is exactly tha
same table. has a backup_id as a primary key and thats the only
difference from the other two tables... (No I don't want to have
published and unpublished as a boolean)
I was thinking if it is possible to add arguments on the constructor...
so I will have
class Content {
function Content(category='unpub') {
}
}
do you have any Ideas... ? Can someone give me a rough idea of how my
class should look like (constructor, the important functions that will
interact with the 3 DB tables)
Thanks A lot...
Navigation:
[Reply to this message]
|