mirror of
https://github.com/Intervention/image.git
synced 2025-08-31 17:41:58 +02:00
Improving the fix for support of custom commands with accentuated names
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
"require": {
|
||||
"php": ">=5.4.0",
|
||||
"ext-fileinfo": "*",
|
||||
"ext-mbstring": "*",
|
||||
"guzzlehttp/psr7": "~1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
|
@@ -102,11 +102,11 @@ abstract class AbstractDriver
|
||||
*/
|
||||
private function getCommandClassName($name)
|
||||
{
|
||||
$name = mb_convert_case($name[0], MB_CASE_UPPER, 'utf-8') . mb_substr($name, 1, mb_strlen($name));
|
||||
$name = mb_strtoupper(mb_substr($name, 0, 1)) . mb_substr($name, 1);
|
||||
|
||||
$drivername = $this->getDriverName();
|
||||
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name));
|
||||
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name));
|
||||
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, $name);
|
||||
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', $name);
|
||||
|
||||
if (class_exists($classnameLocal)) {
|
||||
return $classnameLocal;
|
||||
|
Reference in New Issue
Block a user