class HtmlEncoder in Feeds extensible parsers 8
Converts the encoding of an HTML document to UTF-8.
Hierarchy
- class \Drupal\feeds_ex\Encoder\TextEncoder implements EncoderInterface
- class \Drupal\feeds_ex\Encoder\XmlEncoder
- class \Drupal\feeds_ex\Encoder\HtmlEncoder
- class \Drupal\feeds_ex\Encoder\XmlEncoder
Expanded class hierarchy of HtmlEncoder
File
- src/
Encoder/ HtmlEncoder.php, line 8
Namespace
Drupal\feeds_ex\EncoderView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HtmlEncoder:: |
protected | property |
The regex used to find the encoding. Overrides XmlEncoder:: |
|
HtmlEncoder:: |
protected | property |
The replacement pattern. Overrides XmlEncoder:: |
|
HtmlEncoder:: |
protected | property |
The regex used to replace the encoding. Overrides XmlEncoder:: |
|
TextEncoder:: |
protected | property | The list of encodings to search for. | |
TextEncoder:: |
protected | property | Whether the current system handles mb_* functions. | |
TextEncoder:: |
protected static | property | The set of encodings compatible with UTF-8. | |
TextEncoder:: |
public | function |
Returns the configuration form to select encodings. Overrides EncoderInterface:: |
|
TextEncoder:: |
public | function |
Validates the encoding configuration form. Overrides EncoderInterface:: |
|
TextEncoder:: |
protected | function | Detects the encoding of a string. | |
TextEncoder:: |
protected | function | Performs the actual encoding conversion. | |
TextEncoder:: |
public | function |
Constructs a EncoderInterface object. Overrides EncoderInterface:: |
|
XmlEncoder:: |
public | function |
Converts a string to UTF-8. Overrides TextEncoder:: |