mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
28 lines
529 B
PHP
28 lines
529 B
PHP
<?php
|
|
|
|
namespace PhpXmlRpc\Traits;
|
|
|
|
use PhpXmlRpc\Helper\Charset;
|
|
|
|
trait CharsetEncoderAware
|
|
{
|
|
protected static $charsetEncoder;
|
|
|
|
public function getCharsetEncoder()
|
|
{
|
|
if (self::$charsetEncoder === null) {
|
|
self::$charsetEncoder = Charset::instance();
|
|
}
|
|
return self::$charsetEncoder;
|
|
}
|
|
|
|
/**
|
|
* @param $charsetEncoder
|
|
* @return void
|
|
*/
|
|
public static function setCharsetEncoder($charsetEncoder)
|
|
{
|
|
self::$charsetEncoder = $charsetEncoder;
|
|
}
|
|
}
|