Hacker News new | ask | show | jobs
by poops 5789 days ago
They advertise as "fat-free" but i think theres still fat that could be trimmed, that wouldn't be needed in a base framework.

I don't really understand why they call some of these plugins through the F3 class instead of using them separately.

Wouldn't it be better to separate db class, and do Db::query() or Db::sql() instead of F3::sql(), which uses a __callStatic() magic method and loops through all the files in the autoload dir and checking each class to see if it has a sql() method. Just seems like it's doing a lot of extra un-needed work, even if it is caching it

1 comments

I believe you already can, using F3:: for everything is just a fallback if you've forgotten what class the method belongs to. I had a thought to plug in an ACL check inside the __callStatic() and autoLoad() methods, since it's already searching for the class and method, would be a simple thing to run that through an ACL table to see if the user has access to the class/method. Just a thought.