Recently I started looking more seriously into classes and OOP in general in PHP. I'm trying to create a simple site while taking advantage of classes as much as possible but there have been some questions that have been stuck in my mind.
More specifically I'd like to know how would a 'proper' site structure look like with classes and methods that deal with users, pages, menus, etc. Currently I'm using this wrapper to get around MySQLi more effectively and I can't seem to decide how should I implement this wrapper with other objects - do I create a new class for users, menus, etc. separately and just pass the database variable through the class every time I create an instance?
$db = new Mysqlidb (DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
$user = new User ($db);
Or do I just extend the SQL class as "models" like the wrapper's author has pointed out here.
Also in general, what should remain a class, what should I handle with only functions? How should I handle things with my MySQL class?
Is it a good practice to handle every single menu item/user/page as an object?
These are just some of the things confusing my mind right now. There are quite a few examples on the web about OOP but I still haven't found a decent one to explain the questions I asked above.