File indexing completed on 2025-01-26 05:29:15
0001 <?php 0002 0003 namespace Intervention\Image; 0004 0005 use League\Container\ServiceProvider\AbstractServiceProvider; 0006 0007 class ImageServiceProviderLeague extends AbstractServiceProvider 0008 { 0009 /** 0010 * @var array $config 0011 */ 0012 protected $config; 0013 0014 /** 0015 * @var array $provides 0016 */ 0017 protected $provides = [ 0018 'Intervention\Image\ImageManager' 0019 ]; 0020 0021 /** 0022 * Constructor. 0023 * 0024 * @param array $config 0025 */ 0026 public function __construct($config = []) 0027 { 0028 $this->config = $config; 0029 } 0030 0031 /** 0032 * Register the server provider. 0033 * 0034 * @return void 0035 */ 0036 public function register() 0037 { 0038 $this->getContainer()->share('Intervention\Image\ImageManager', function () { 0039 return new ImageManager($this->config); 0040 }); 0041 } 0042 }