@@ -61,7 +61,7 @@ public function url($src, $width = null, $height = null, $options = array())
61
61
$ height = null ;
62
62
}
63
63
64
- $ config = $ this ->app ['config ' ];
64
+ $ config = $ this ->container ['config ' ];
65
65
$ url_parameter = isset ($ options ['url_parameter ' ]) ? $ options ['url_parameter ' ]:$ config ['image.url_parameter ' ];
66
66
$ url_parameter_separator = isset ($ options ['url_parameter_separator ' ]) ? $ options ['url_parameter_separator ' ]:$ config ['image.url_parameter_separator ' ];
67
67
unset($ options ['url_parameter ' ],$ options ['url_parameter_separator ' ]);
@@ -110,13 +110,13 @@ public function url($src, $width = null, $height = null, $options = array())
110
110
111
111
// Break the path apart and put back together again
112
112
$ parts = pathinfo ($ src );
113
- $ host = isset ($ options ['host ' ]) ? $ options ['host ' ]:$ this ->app ['config ' ]['image.host ' ];
113
+ $ host = isset ($ options ['host ' ]) ? $ options ['host ' ]:$ this ->container ['config ' ]['image.host ' ];
114
114
$ dir = trim ($ parts ['dirname ' ], '/ ' );
115
115
116
116
$ path = array ();
117
117
$ path [] = rtrim ($ host , '/ ' );
118
118
119
- if ($ prefix = $ this ->app ['config ' ]->get ('image.write_path ' )) {
119
+ if ($ prefix = $ this ->container ['config ' ]->get ('image.write_path ' )) {
120
120
$ path [] = trim ($ prefix , '/ ' );
121
121
}
122
122
@@ -145,7 +145,7 @@ public function url($src, $width = null, $height = null, $options = array())
145
145
public function make ($ path , $ options = array ())
146
146
{
147
147
//Get app config
148
- $ config = $ this ->app ['config ' ];
148
+ $ config = $ this ->container ['config ' ];
149
149
150
150
// See if the referenced file exists and is an image
151
151
if (!($ path = $ this ->getRealPath ($ path ))) {
@@ -227,16 +227,16 @@ public function make($path, $options = array())
227
227
public function serve ($ path , $ config = array ())
228
228
{
229
229
//Use user supplied quality or the config value
230
- $ quality = Arr::get ($ config , 'quality ' , $ this ->app ['config ' ]['image.quality ' ]);
230
+ $ quality = Arr::get ($ config , 'quality ' , $ this ->container ['config ' ]['image.quality ' ]);
231
231
//if nothing works fallback to the hardcoded value
232
232
$ quality = $ quality ?: $ this ->defaultOptions ['quality ' ];
233
233
234
234
//Merge config with defaults
235
235
$ config = array_merge (array (
236
236
'quality ' => $ quality ,
237
- 'custom_filters_only ' => $ this ->app ['config ' ]['image.serve_custom_filters_only ' ],
238
- 'write_image ' => $ this ->app ['config ' ]['image.write_image ' ],
239
- 'write_path ' => $ this ->app ['config ' ]['image.write_path ' ]
237
+ 'custom_filters_only ' => $ this ->container ['config ' ]['image.serve_custom_filters_only ' ],
238
+ 'write_image ' => $ this ->container ['config ' ]['image.write_image ' ],
239
+ 'write_path ' => $ this ->container ['config ' ]['image.write_path ' ]
240
240
), $ config );
241
241
242
242
$ serve = new ImageServe ($ this , $ config );
@@ -255,12 +255,12 @@ public function proxy($path, $config = array())
255
255
{
256
256
//Merge config with defaults
257
257
$ config = array_merge (array (
258
- 'tmp_path ' => $ this ->app ['config ' ]['image.proxy_tmp_path ' ],
259
- 'filesystem ' => $ this ->app ['config ' ]['image.proxy_filesystem ' ],
260
- 'cache ' => $ this ->app ['config ' ]['image.proxy_cache ' ],
261
- 'cache_expiration ' => $ this ->app ['config ' ]['image.proxy_cache_expiration ' ],
262
- 'write_image ' => $ this ->app ['config ' ]['image.proxy_write_image ' ],
263
- 'cache_filesystem ' => $ this ->app ['config ' ]['image.proxy_cache_filesystem ' ]
258
+ 'tmp_path ' => $ this ->container ['config ' ]['image.proxy_tmp_path ' ],
259
+ 'filesystem ' => $ this ->container ['config ' ]['image.proxy_filesystem ' ],
260
+ 'cache ' => $ this ->container ['config ' ]['image.proxy_cache ' ],
261
+ 'cache_expiration ' => $ this ->container ['config ' ]['image.proxy_cache_expiration ' ],
262
+ 'write_image ' => $ this ->container ['config ' ]['image.proxy_write_image ' ],
263
+ 'cache_filesystem ' => $ this ->container ['config ' ]['image.proxy_cache_filesystem ' ]
264
264
), $ config );
265
265
266
266
$ serve = new ImageProxy ($ this , $ config );
@@ -421,7 +421,7 @@ public function deleteManipulated($path)
421
421
public function pattern ($ parameter = null , $ pattern = null )
422
422
{
423
423
//Replace the {options} with the options regular expression
424
- $ config = $ this ->app ['config ' ];
424
+ $ config = $ this ->container ['config ' ];
425
425
$ parameter = !isset ($ parameter ) ? $ config ['image.url_parameter ' ]:$ parameter ;
426
426
$ parameter = preg_replace ('/ \\\{\s*options\s* \\\}/ ' , '([0-9a-zA-Z\(\),\-/._]+?)? ' , preg_quote ($ parameter ));
427
427
@@ -447,7 +447,7 @@ public function parse($path, $config = array())
447
447
$ config = array_merge (array (
448
448
'custom_filters_only ' => false ,
449
449
'url_parameter ' => null ,
450
- 'url_parameter_separator ' => $ this ->app ['config ' ]['image.url_parameter_separator ' ]
450
+ 'url_parameter_separator ' => $ this ->container ['config ' ]['image.url_parameter_separator ' ]
451
451
), $ config );
452
452
453
453
$ parsedOptions = array ();
@@ -479,7 +479,7 @@ protected function parseOptions($option_path, $config = array())
479
479
//Default config
480
480
$ config = array_merge (array (
481
481
'custom_filters_only ' => false ,
482
- 'url_parameter_separator ' => $ this ->app ['config ' ]['image.url_parameter_separator ' ]
482
+ 'url_parameter_separator ' => $ this ->container ['config ' ]['image.url_parameter_separator ' ]
483
483
), $ config );
484
484
485
485
$ options = array ();
@@ -563,9 +563,9 @@ public function getRealPath($path)
563
563
}
564
564
565
565
//Get directories
566
- $ dirs = $ this ->app ['config ' ]['image.src_dirs ' ];
567
- if ($ this ->app ['config ' ]['image.write_path ' ]) {
568
- $ dirs [] = $ this ->app ['config ' ]['image.write_path ' ];
566
+ $ dirs = $ this ->container ['config ' ]['image.src_dirs ' ];
567
+ if ($ this ->container ['config ' ]['image.write_path ' ]) {
568
+ $ dirs [] = $ this ->container ['config ' ]['image.write_path ' ];
569
569
}
570
570
571
571
// Loop through all the directories files may be uploaded to
@@ -615,8 +615,8 @@ protected function getFiles($path, $withOriginal = true)
615
615
$ parts = pathinfo ($ path );
616
616
$ dirs = [$ parts ['dirname ' ]];
617
617
$ dirs = [$ parts ['dirname ' ]];
618
- if ($ this ->app ['config ' ]['image.write_path ' ]) {
619
- $ dirs [] = $ this ->app ['config ' ]['image.write_path ' ];
618
+ if ($ this ->container ['config ' ]['image.write_path ' ]) {
619
+ $ dirs [] = $ this ->container ['config ' ]['image.write_path ' ];
620
620
}
621
621
foreach ($ dirs as $ directory ) {
622
622
$ files = scandir ($ directory );
@@ -838,7 +838,7 @@ protected function createGmagickDriver()
838
838
*/
839
839
public function getDefaultDriver ()
840
840
{
841
- return $ this ->app ['config ' ]['image.driver ' ];
841
+ return $ this ->container ['config ' ]['image.driver ' ];
842
842
}
843
843
844
844
/**
@@ -849,6 +849,6 @@ public function getDefaultDriver()
849
849
*/
850
850
public function setDefaultDriver ($ name )
851
851
{
852
- $ this ->app ['config ' ]['image.driver ' ] = $ name ;
852
+ $ this ->container ['config ' ]['image.driver ' ] = $ name ;
853
853
}
854
854
}
0 commit comments