1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-30 01:00:06 +02:00

Merge branch 'vlakoff-AbstractDriver'

This commit is contained in:
Oliver Vogel
2021-07-06 15:23:01 +02:00

View File

@@ -104,8 +104,12 @@ 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));
if (extension_loaded('mbstring')) {
$name = mb_strtoupper(mb_substr($name, 0, 1)) . mb_substr($name, 1);
} else {
$name = strtoupper(substr($name, 0, 1)) . substr($name, 1);
}
$drivername = $this->getDriverName();
$classnameLocal = sprintf('\Intervention\Image\%s\Commands\%sCommand', $drivername, ucfirst($name));
$classnameGlobal = sprintf('\Intervention\Image\Commands\%sCommand', ucfirst($name));