Back to Document class

Method setCharset

public \Joomla\CMS\Document\Document
setCharset
(mixed $type = 'utf-8')
Sets the document charset
Parameters
  • string $type Charset encoding string
Returns
  • \Joomla\CMS\Document\Document instance of $this to allow chaining
Since
  • 1.7.0
Class: Document
Project: Joomla

Method setCharset - Source code

/**
 * Sets the document charset
 *
 * @param   string  $type  Charset encoding string
 *
 * @return  Document instance of $this to allow chaining
 *
 * @since   1.7.0
 */
public function setCharset($type = 'utf-8')
{
    $this->_charset = $type;
    return $this;
}