make database connection access protected

This commit is contained in:
yggverse 2024-08-02 22:20:12 +03:00
parent 298f25dc3c
commit 8c6627cfb8
7 changed files with 49 additions and 51 deletions

View file

@ -8,16 +8,16 @@ use \Pdo;
class Auth
{
public Pdo $connection;
protected Pdo $_connection;
public function __construct(
Pdo $connection
) {
// Init parent connection
$this->connection = $connection;
$this->_connection = $connection;
// Init database structure
$this->connection->query('
$this->_connection->query('
CREATE TABLE IF NOT EXISTS `auth`
(
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,