public function getEncoding() { // sanity check if (!$this->hasEncoding()) { throw new EncodingNotSetException("The encoding needs to be set before calling L4gettext::getEncoding()"); } // return encoding return $this->encoding; }