Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
$Item = new ContentItem(1); // Item with ID 1
Content::Item($Item);
$Set = new ContentSet(0, 10); // 10 items
Content::Items($Set);
Thanks everyone for help, I see now that MVC is really better and more useful
You created a controller & models. There is no view that I can see, which makes it 2 tier and not MVC. I'm presuming that you separated display & business logic at the method level instead of the class level.
I never said there's anything wrong with your code, just that its not MVC.
josh wrote:You created a controller & models. There is no view that I can see, which makes it 2 tier and not MVC. I'm presuming that you separated display & business logic at the method level instead of the class level.
The sense I get is that the Content class (called statically) is the View class and then example shown is the Controller ... but Technical would have to verify that.
Ah, well in that case there is a problem with his code. It is MVC but its using bad naming. It should be called View, not Content (especially since it coincides with a model name)
Good software engineers deliver. Bad software engineers deliver excuses. Try to avoid working with people that aren't as passionate or capable with a project as yourself.