Mark Dain
Finally got round to learning slimframework.com, it's really nice, I like it
Martijn
I am using that for my latest project as well. Took a bit to get my head around Middleware but I like it.
Mark Dain
Yeah, middleware rocks. I wrote a handler for the Authorization HTTP header which is surprisingly quite long (almost 100 lines). It's so nice every endpoint that needs protecting can do so via a group. How awesome is that! I also like the container system, so my DB connection is something like $this->get('db') rather than pulling something in via global.
Mark Dain
I'm not an expert but I think you need adapter classes for that. For me, 'db' returns an instance of MySQLi, so I'd need to shim that or switch to PDO? I didn't do anything wit sessions but I found you can pass data back via an attribute so after I parse the Authorization header, I set a user ID so the controller can use that value; slimframework.com/... (scroll to bottom "Passing variables"). A quick search I found this github.com/akrabat... which seems idiomatic?