diff --git a/src/services/TypographyService.php b/src/services/TypographyService.php index 4f49d8b..230c5b5 100644 --- a/src/services/TypographyService.php +++ b/src/services/TypographyService.php @@ -72,7 +72,8 @@ public function getTypographer() if (is_array($settings)) { foreach ($settings as $key => $value) { - $this->_typographySettings->{$key}($value); + $func = "set_{$key}"; + $this->_typographySettings->$func($value); } } @@ -93,7 +94,8 @@ public function getTypographySettings($adhocSettings = []) if (is_array($adhocSettings)) { foreach ($adhocSettings as $key => $value) { - $settings->{$key}($value); + $func = "set_{$key}"; + $settings->$func($value); } }