interface ParserInterface in Feeds 8.3
The interface Feeds parser must implement.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface
- interface \Drupal\feeds\Plugin\Type\FeedsPluginInterface
- interface \Drupal\feeds\Plugin\Type\Parser\ParserInterface
- interface \Drupal\feeds\Plugin\Type\FeedsPluginInterface
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
File
- src/
Plugin/ Type/ Parser/ ParserInterface.php, line 13
Namespace
Drupal\feeds\Plugin\Type\ParserView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
FeedsPluginInterface:: |
public | function | Returns default feed configuration. | 1 |
FeedsPluginInterface:: |
public | function | Returns the type of plugin. | 1 |
ParserInterface:: |
public | function | Declare the possible mapping sources that this parser produces. | 5 |
ParserInterface:: |
public | function | Parses content returned by fetcher. | 5 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |