Config options

This commit is contained in:
Alex Bilbie 2012-07-06 17:43:55 +01:00
parent e1c375f617
commit 9eacbdc77e

View File

@ -11,6 +11,14 @@ class OAuthServerException extends Exception {}
class Server class Server
{ {
private $db = NULL; private $db = NULL;
private $config = array(
'response_types' => array(
'code'
),
'scope_delimeter' => ','
);
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.',
@ -26,6 +34,11 @@ class Server
); );
public function __construct() public function __construct()
public function __construct(array $options)
{
$this->options = array_merge($this->config, $options);
}
public function registerDbAbstractor(object $db) public function registerDbAbstractor(object $db)
{ {