private function setDefaultTextCharset(string $charset) { if (empty($charset)) { throw new \InvalidArgumentException('Default charset expects a non-empty string'); } $this->defaultCharset = $charset; }