mirror of
https://github.com/Intervention/image.git
synced 2025-08-21 05:01:20 +02:00
illuminate config for non-laravel use
This commit is contained in:
@@ -14,7 +14,8 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"ext-fileinfo": "*",
|
"ext-fileinfo": "*",
|
||||||
"illuminate/support": "4.1.*"
|
"illuminate/support": "4.1.*",
|
||||||
|
"illuminate/config": "4.1.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "3.*",
|
"phpunit/phpunit": "3.*",
|
||||||
|
@@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
namespace Intervention\Image;
|
namespace Intervention\Image;
|
||||||
|
|
||||||
|
use Illuminate\Config\Repository as Config;
|
||||||
|
use Illuminate\Config\FileLoader;
|
||||||
|
use Illuminate\Filesystem\Filesystem;
|
||||||
|
|
||||||
class ImageManager
|
class ImageManager
|
||||||
{
|
{
|
||||||
public $config;
|
public $config;
|
||||||
@@ -15,8 +19,13 @@ class ImageManager
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$loader = new FileLoader(new Filesystem, __DIR__.'/../../config');
|
$config_path = __DIR__.'/../../config';
|
||||||
$this->config = new Config($loader, null);
|
$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