Skip to content

Commit d95a251

Browse files
authored
Create encoder: MbConvertEncodingEncoder
1 parent e818e35 commit d95a251

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace XBase\DataConverter\Encoder;
4+
5+
class MbConvertEncodingEncoder implements EncoderInterface
6+
{
7+
public function encode(string $string, string $fromEncoding, string $toEncoding): string
8+
{
9+
return mb_convert_encoding($string, $toEncoding, $fromEncoding);
10+
}
11+
}

0 commit comments

Comments
 (0)