1
0
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:
maxsenft
2018-03-20 15:38:35 +01:00
committed by Marco
parent 58e69fdd0e
commit ec6afdad48

View File

@ -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);
} }