2015-08-16 17:59:23 +00:00
|
|
|
<?php
|
|
|
|
|
2015-09-10 18:31:09 +00:00
|
|
|
namespace BookStack\Providers;
|
2015-08-16 17:59:23 +00:00
|
|
|
|
2015-12-09 19:50:17 +00:00
|
|
|
use BookStack\Services\ImageService;
|
2015-11-21 17:22:14 +00:00
|
|
|
use BookStack\Services\ViewService;
|
2015-08-16 17:59:23 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2015-09-10 18:31:09 +00:00
|
|
|
use BookStack\Services\ActivityService;
|
|
|
|
use BookStack\Services\SettingService;
|
2015-08-16 17:59:23 +00:00
|
|
|
|
|
|
|
class CustomFacadeProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
$this->app->bind('activity', function() {
|
2016-02-28 19:03:04 +00:00
|
|
|
return new ActivityService(
|
|
|
|
$this->app->make('BookStack\Activity'),
|
|
|
|
$this->app->make('BookStack\Services\RestrictionService')
|
|
|
|
);
|
2015-08-16 17:59:23 +00:00
|
|
|
});
|
2015-08-30 14:31:16 +00:00
|
|
|
|
2015-11-21 17:22:14 +00:00
|
|
|
$this->app->bind('views', function() {
|
2016-02-28 19:03:04 +00:00
|
|
|
return new ViewService(
|
|
|
|
$this->app->make('BookStack\View'),
|
|
|
|
$this->app->make('BookStack\Services\RestrictionService')
|
|
|
|
);
|
2015-11-21 17:22:14 +00:00
|
|
|
});
|
|
|
|
|
2015-08-30 14:31:16 +00:00
|
|
|
$this->app->bind('setting', function() {
|
2015-09-06 14:26:31 +00:00
|
|
|
return new SettingService(
|
2015-09-10 18:31:09 +00:00
|
|
|
$this->app->make('BookStack\Setting'),
|
2015-09-06 14:26:31 +00:00
|
|
|
$this->app->make('Illuminate\Contracts\Cache\Repository')
|
|
|
|
);
|
2015-08-30 14:31:16 +00:00
|
|
|
});
|
2016-02-28 19:03:04 +00:00
|
|
|
|
2015-12-09 19:50:17 +00:00
|
|
|
$this->app->bind('images', function() {
|
|
|
|
return new ImageService(
|
|
|
|
$this->app->make('Intervention\Image\ImageManager'),
|
|
|
|
$this->app->make('Illuminate\Contracts\Filesystem\Factory'),
|
|
|
|
$this->app->make('Illuminate\Contracts\Cache\Repository')
|
|
|
|
);
|
|
|
|
});
|
2015-08-16 17:59:23 +00:00
|
|
|
}
|
|
|
|
}
|