mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
Database object (and register method)
This commit is contained in:
parent
df0838c321
commit
e1c375f617
@ -10,6 +10,7 @@ class OAuthServerException extends Exception {}
|
|||||||
|
|
||||||
class Server
|
class Server
|
||||||
{
|
{
|
||||||
|
private $db = NULL;
|
||||||
protected $errors = array(
|
protected $errors = array(
|
||||||
'invalid_request' => 'The request is missing a required parameter, includes an invalid parameter value,
|
'invalid_request' => 'The request is missing a required parameter, includes an invalid parameter value,
|
||||||
includes a parameter more than once, or is otherwise malformed.',
|
includes a parameter more than once, or is otherwise malformed.',
|
||||||
@ -25,8 +26,10 @@ class Server
|
|||||||
);
|
);
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
public function registerDbAbstractor(object $db)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function registerDbAbstractor()
|
public function registerDbAbstractor()
|
||||||
|
Loading…
Reference in New Issue
Block a user