You are here

interface EncoderInterface in Feeds extensible parsers 8

Coverts text encodings.

Hierarchy

Expanded class hierarchy of EncoderInterface

All classes that implement EncoderInterface

1 file declares its use of EncoderInterface
ParserBase.php in src/Feeds/Parser/ParserBase.php

File

src/Encoder/EncoderInterface.php, line 10

Namespace

Drupal\feeds_ex\Encoder
View source
interface EncoderInterface {

  /**
   * Constructs a EncoderInterface object.
   *
   * @param array $encoding_list
   *   The list of encodings to search through.
   */
  public function __construct(array $encoding_list);

  /**
   * Converts a string to UTF-8.
   *
   * @param string $data
   *   The string to convert.
   *
   * @return string
   *   The encoded string, or the original string if encoding failed.
   */
  public function convertEncoding($data);

  /**
   * Returns the configuration form to select encodings.
   *
   * @param array $form
   *   The current form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   *
   * @return array
   *   The modified form array.
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state);

  /**
   * Validates the encoding configuration form.
   *
   * @param array &$values
   *   The form values.
   */
  public function configFormValidate(array &$values);

}

Members

Namesort descending Modifiers Type Description Overrides
EncoderInterface::buildConfigurationForm public function Returns the configuration form to select encodings. 1
EncoderInterface::configFormValidate public function Validates the encoding configuration form. 1
EncoderInterface::convertEncoding public function Converts a string to UTF-8. 1
EncoderInterface::__construct public function Constructs a EncoderInterface object. 1