33 lines
448 B
PHP
33 lines
448 B
PHP
<?php
|
|
/**
|
|
* Holds a database instance
|
|
*/
|
|
class Database
|
|
{
|
|
private PDO $pdo;
|
|
public function __construct(PDO $pdo)
|
|
{
|
|
$this->pdo = $pdo;
|
|
}
|
|
|
|
/**
|
|
* Get the value of pdo
|
|
*/
|
|
public function getPdo()
|
|
{
|
|
return $this->pdo;
|
|
}
|
|
|
|
/**
|
|
* Set the value of pdo
|
|
*
|
|
* @return self
|
|
*/
|
|
public function setPdo($pdo)
|
|
{
|
|
$this->pdo = $pdo;
|
|
|
|
return $this;
|
|
}
|
|
}
|