mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-11 11:36:24 +02:00
Accept 'PdoDsn' and 'PDO' as well in 'Administration' constructor
This commit is contained in:
@ -9,6 +9,7 @@
|
|||||||
namespace Delight\Auth;
|
namespace Delight\Auth;
|
||||||
|
|
||||||
use Delight\Db\PdoDatabase;
|
use Delight\Db\PdoDatabase;
|
||||||
|
use Delight\Db\PdoDsn;
|
||||||
use Delight\Db\Throwable\Error;
|
use Delight\Db\Throwable\Error;
|
||||||
|
|
||||||
require_once __DIR__ . '/Exceptions.php';
|
require_once __DIR__ . '/Exceptions.php';
|
||||||
@ -19,10 +20,10 @@ final class Administration extends UserManager {
|
|||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*
|
*
|
||||||
* @param PdoDatabase $databaseConnection the database connection to operate on
|
* @param PdoDatabase|PdoDsn|\PDO $databaseConnection the database connection to operate on
|
||||||
* @param string|null $dbTablePrefix (optional) the prefix for the names of all database tables used by this component
|
* @param string|null $dbTablePrefix (optional) the prefix for the names of all database tables used by this component
|
||||||
*/
|
*/
|
||||||
public function __construct(PdoDatabase $databaseConnection, $dbTablePrefix = null) {
|
public function __construct($databaseConnection, $dbTablePrefix = null) {
|
||||||
parent::__construct($databaseConnection, $dbTablePrefix);
|
parent::__construct($databaseConnection, $dbTablePrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user