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