Added new Beacon handling code

This commit is contained in:
James Brooks
2016-08-03 17:44:21 +01:00
parent dd2e77d479
commit 778664b20a
14 changed files with 446 additions and 0 deletions
@@ -11,10 +11,12 @@
namespace CachetHQ\Cachet\Foundation\Providers;
use CachetHQ\Cachet\Integrations\Contracts\Beacon as BeaconContract;
use CachetHQ\Cachet\Integrations\Contracts\Credits as CreditsContract;
use CachetHQ\Cachet\Integrations\Contracts\Feed as FeedContract;
use CachetHQ\Cachet\Integrations\Contracts\Releases as ReleasesContract;
use CachetHQ\Cachet\Integrations\Contracts\System as SystemContract;
use CachetHQ\Cachet\Integrations\Core\Beacon;
use CachetHQ\Cachet\Integrations\Core\Credits;
use CachetHQ\Cachet\Integrations\Core\Feed;
use CachetHQ\Cachet\Integrations\Core\System;
@@ -36,6 +38,7 @@ class IntegrationServiceProvider extends ServiceProvider
*/
public function register()
{
$this->registerBeacon();
$this->registerCredits();
$this->registerFeed();
$this->registerSystem();
@@ -43,6 +46,20 @@ class IntegrationServiceProvider extends ServiceProvider
$this->registerReleases();
}
/**
* Register the beacon class.
*
* @return void
*/
protected function registerBeacon()
{
$this->app->singleton(BeaconContract::class, function ($app) {
$config = $app['config'];
return new Beacon($config);
});
}
/**
* Register the credits class.
*