You are here

class HtmlEncoder in Feeds extensible parsers 8

Converts the encoding of an HTML document to UTF-8.

Hierarchy

Expanded class hierarchy of HtmlEncoder

File

src/Encoder/HtmlEncoder.php, line 8

Namespace

Drupal\feeds_ex\Encoder
View source
class HtmlEncoder extends XmlEncoder {

  /**
   * {@inheritdoc}
   */
  protected $findRegex = '/(<meta[^>]+charset\\s*=\\s*["\']?)([\\w-]+)\\b/i';

  /**
   * {@inheritdoc}
   */
  protected $replaceRegex = '/(<meta[^>]+charset\\s*=\\s*["\']?)([\\w-]+)\\b/i';

  /**
   * {@inheritdoc}
   */
  protected $replacePattern = '$1UTF-8';

}

Members

Namesort descending Modifiers Type Description Overrides
HtmlEncoder::$findRegex protected property The regex used to find the encoding. Overrides XmlEncoder::$findRegex
HtmlEncoder::$replacePattern protected property The replacement pattern. Overrides XmlEncoder::$replacePattern
HtmlEncoder::$replaceRegex protected property The regex used to replace the encoding. Overrides XmlEncoder::$replaceRegex
TextEncoder::$encodingList protected property The list of encodings to search for.
TextEncoder::$isMultibyte protected property Whether the current system handles mb_* functions.
TextEncoder::$utf8Compatible protected static property The set of encodings compatible with UTF-8.
TextEncoder::buildConfigurationForm public function Returns the configuration form to select encodings. Overrides EncoderInterface::buildConfigurationForm
TextEncoder::configFormValidate public function Validates the encoding configuration form. Overrides EncoderInterface::configFormValidate
TextEncoder::detectEncoding protected function Detects the encoding of a string.
TextEncoder::doConvert protected function Performs the actual encoding conversion.
TextEncoder::__construct public function Constructs a EncoderInterface object. Overrides EncoderInterface::__construct
XmlEncoder::convertEncoding public function Converts a string to UTF-8. Overrides TextEncoder::convertEncoding