You are here

WSDecoderInterface.php in Web Service Data 2.0.x

Same filename and directory in other branches
  1. 8 src/Plugin/WSDecoderInterface.php

File

src/Plugin/WSDecoderInterface.php
View source
<?php

namespace Drupal\wsdata\Plugin;

use Drupal\Component\Plugin\PluginInspectionInterface;

/**
 * Defines an interface for Wsdecoder plugin plugins.
 */
interface WSDecoderInterface extends PluginInspectionInterface {

  /**
   * Returns a list of the data/encoding formats support by this decoder.
   */
  public function accepts();

  /**
   * Returns the error from the last parse the decoder ran.
   */
  public function getError();

  /**
   * Return the data element at the location given.
   */
  public function getData($key = NULL, $lang = NULL);

  /**
   * Add raw data to be parsed.
   */
  public function addData($data, $lang = NULL, $context = []);

}

Interfaces

Namesort descending Description
WSDecoderInterface Defines an interface for Wsdecoder plugin plugins.