public function convertToPHPValue($locale, AbstractPlatform $platform) { if (APPLICATION === 'frontend') { return FrontendLocale::fromString($locale); } return BackendLocale::fromString($locale); }