public function register()
{
$this->app->singleton('fluxbb.server.core', function ($app) {
$server = new Server(new ActionFactory($app));
$this->registerActions($server);
return $server;
});
$this->app->singleton('FluxBB\\Server\\ServerInterface', function ($app) {
return $app->make('fluxbb.server.core');
});
$this->app->extend('FluxBB\\Server\\ServerInterface', function ($server, $app) {
$validator = new RequestValidator($app, $server);
$this->registerValidators($validator);
return $validator;
});
$this->app->extend('FluxBB\\Server\\ServerInterface', function ($server, $app) {
$authorization = new AuthorizationServer($app, $server);
$this->registerAuthorizers($authorization);
return $authorization;
});
}