File indexing completed on 2025-01-26 05:29:15

0001 <?php
0002 
0003 namespace Intervention\Image;
0004 
0005 use Illuminate\Support\ServiceProvider;
0006 
0007 class ImageServiceProviderLumen extends ServiceProvider
0008 {
0009     /**
0010      * Register the service provider.
0011      *
0012      * @return void
0013      */
0014     public function register()
0015     {
0016         $app = $this->app;
0017 
0018         // merge default config
0019         $this->mergeConfigFrom(
0020           __DIR__.'/../../config/config.php',
0021           'image'
0022         );
0023 
0024         // set configuration
0025         $app->configure('image');
0026 
0027         // create image
0028         $app->singleton('image',function ($app) {
0029             return new ImageManager($app['config']->get('image'));
0030         });
0031 
0032         $app->alias('image', 'Intervention\Image\ImageManager');
0033     }
0034 }