mirror of
https://github.com/Intervention/image.git
synced 2025-09-01 18:02:45 +02:00
Improving the fix for support of custom commands with accentuated names
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.4.0",
|
"php": ">=5.4.0",
|
||||||
"ext-fileinfo": "*",
|
"ext-fileinfo": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
"guzzlehttp/psr7": "~1.1"
|
"guzzlehttp/psr7": "~1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
@@ -102,11 +102,11 @@ abstract class AbstractDriver
|
|||||||
*/
|
*/
|
||||||
private function getCommandClassName($name)
|
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();
|
$drivername = $this->getDriverName();
|
||||||
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name));
|
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, $name);
|
||||||
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name));
|
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', $name);
|
||||||
|
|
||||||
if (class_exists($classnameLocal)) {
|
if (class_exists($classnameLocal)) {
|
||||||
return $classnameLocal;
|
return $classnameLocal;
|
||||||
|
Reference in New Issue
Block a user