<?php
namespace Modules;
use PDO;
class MySqlDatabase
{
protected $_db;
public $last_query;
//Connection to DB
public function __construct(\PDO $pdo)
{
$this->_db = $pdo;
}
<?php
namespace Modules;
use Modules\MySqlDatabase;
class User
{
public $id;
public $username;
public $password;
public $first_name;
public $last_name;
private $db;
public function __construct(MySqlDatabase $db){
$this->db = $db;
}