OOP Class

I've used this in Laravel, I needed an OOP class for this, because it had to be autoloaded.
I hope you'll consider accepting this, as maybe others spent a couple of minutes doing what I've done, and they can avoid that.