You are here: To all OOP eggheads out there. I need A bit of design help « PHP Programming Language « IT news, forums, messages
To all OOP eggheads out there. I need A bit of design help

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация