mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
make database connection access protected
This commit is contained in:
parent
298f25dc3c
commit
8c6627cfb8
7 changed files with 49 additions and 51 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue