Skip to main content
11 events
when toggle format what by license comment
Jun 20, 2016 at 19:40 vote accept PIDZB
Jun 20, 2016 at 14:23 comment added Jörg W Mittag @Ixrec: Finally got around to it.
Jun 20, 2016 at 14:22 answer added Jörg W Mittag timeline score: 1
Jun 3, 2016 at 3:04 review First posts
Jun 22, 2016 at 18:57
May 25, 2016 at 10:59 comment added PIDZB Indeed, if you post it like an answer, maybe with a little example(?), I will accept it :D
May 25, 2016 at 10:51 comment added Ixrec @JörgWMittag That sounds like an answer to me.
May 24, 2016 at 13:26 review Close votes
Jun 9, 2016 at 3:01
May 23, 2016 at 22:27 comment added Jörg W Mittag No, you should have Css objects, Meta objects, HeaderJs objects, BodyJs objects, PhpInclude objects, etc. and those should implement a common interface (say, PageElement) with a render method and should know how to render themselves. Then you simply call render and don't care what kind of object it is, because it takes care of the rendering itself and there is no switch needed at all.
May 23, 2016 at 22:13 comment added PIDZB So you create a stdClass object and then fill it like option 2? I feel that in PHP there arent much differences between an assoc array and an stdClass object.
May 23, 2016 at 19:14 comment added Jörg W Mittag Personally, I would go for option 3: objects. PHP is an object-oriented language, not an arrays-of-arrays-of-strings-oriented language. (Well, sort of. It's not a particularly good object-oriented language, but it is one.)
May 23, 2016 at 18:54 history asked PIDZB CC BY-SA 3.0