mirror of
https://github.com/Intervention/image.git
synced 2025-08-18 03:31:19 +02:00
illuminate config for non-laravel use
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
"require": {
|
||||
"php": ">=5.3.0",
|
||||
"ext-fileinfo": "*",
|
||||
"illuminate/support": "4.1.*"
|
||||
"illuminate/support": "4.1.*",
|
||||
"illuminate/config": "4.1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "3.*",
|
||||
|
@@ -2,6 +2,10 @@
|
||||
|
||||
namespace Intervention\Image;
|
||||
|
||||
use Illuminate\Config\Repository as Config;
|
||||
use Illuminate\Config\FileLoader;
|
||||
use Illuminate\Filesystem\Filesystem;
|
||||
|
||||
class ImageManager
|
||||
{
|
||||
public $config;
|
||||
@@ -15,8 +19,13 @@ class ImageManager
|
||||
|
||||
} else {
|
||||
|
||||
$loader = new FileLoader(new Filesystem, __DIR__.'/../../config');
|
||||
$this->config = new Config($loader, null);
|
||||
$config_path = __DIR__.'/../../config';
|
||||
$env = 'production';
|
||||
|
||||
$file = new Filesystem;
|
||||
$loader = new FileLoader($file, $config_path);
|
||||
$this->config = new Config($loader, $env);
|
||||
$this->config->package('intervention/image', $config_path, 'image');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user