You are here

interface ParserInterface in Feeds 8.3

The interface Feeds parser must implement.

Hierarchy

Expanded class hierarchy of ParserInterface

All classes that implement ParserInterface

7 files declare their use of ParserInterface
FeedTest.php in tests/src/Kernel/Entity/FeedTest.php
FeedTypeTest.php in tests/src/Unit/Entity/FeedTypeTest.php
OpmlParser.php in src/Feeds/Parser/OpmlParser.php
ParserBase.php in src/Feeds/Parser/ParserBase.php
ParserWithMappingForm.php in tests/modules/feeds_test_plugin/src/Feeds/Parser/ParserWithMappingForm.php

... See full list

File

src/Plugin/Type/Parser/ParserInterface.php, line 13

Namespace

Drupal\feeds\Plugin\Type\Parser
View source
interface ParserInterface extends FeedsPluginInterface {

  /**
   * Parses content returned by fetcher.
   *
   * @param \Drupal\feeds\FeedInterface $feed
   *   The feed we are parsing for.
   * @param \Drupal\feeds\Result\FetcherResultInterface $fetcher_result
   *   The result returned by the fetcher.
   * @param \Drupal\feeds\StateInterface $state
   *   The state object.
   *
   * @return \Drupal\feeds\Result\ParserResultInterface
   *   The parser result object.
   *
   * @todo This needs more documentation.
   */
  public function parse(FeedInterface $feed, FetcherResultInterface $fetcher_result, StateInterface $state);

  /**
   * Declare the possible mapping sources that this parser produces.
   *
   * @return array|false
   *   An array of mapping sources, or false if the sources can be defined by
   *   typing a value in a text field.
   *
   * @todo Get rid of the false return here and create a configurable source
   *   solution for parsers.
   * @todo Add type data here for automatic mappings.
   * @todo Provide code example.
   */
  public function getMappingSources();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
FeedsPluginInterface::defaultFeedConfiguration public function Returns default feed configuration. 1
FeedsPluginInterface::pluginType public function Returns the type of plugin. 1
ParserInterface::getMappingSources public function Declare the possible mapping sources that this parser produces. 5
ParserInterface::parse public function Parses content returned by fetcher. 5
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2