1
0
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:
vlakoff
2018-09-09 04:59:45 +02:00
parent e82d274f78
commit e661de60b1
2 changed files with 4 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
"require": {
"php": ">=5.4.0",
"ext-fileinfo": "*",
"ext-mbstring": "*",
"guzzlehttp/psr7": "~1.1"
},
"require-dev": {

View File

@@ -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;