class FeedsOPMLParser in Feeds 7
Same name and namespace in other branches
- 8.2 lib/Drupal/feeds/Plugin/feeds/parser/FeedsOPMLParser.php \FeedsOPMLParser
- 6 plugins/FeedsOPMLParser.inc \FeedsOPMLParser
- 7.2 plugins/FeedsOPMLParser.inc \FeedsOPMLParser
Feeds parser plugin that parses OPML feeds.
Hierarchy
- class \FeedsConfigurable
- class \FeedsPlugin implements FeedsSourceInterface
- class \FeedsParser
- class \FeedsOPMLParser
- class \FeedsParser
- class \FeedsPlugin implements FeedsSourceInterface
Expanded class hierarchy of FeedsOPMLParser
2 string references to 'FeedsOPMLParser'
- feeds_news_feeds_importer_default in feeds_news/
feeds_news.feeds_importer_default.inc - Implementation of hook_feeds_importer_default().
- _feeds_feeds_plugins in ./
feeds.plugins.inc - Break out for feeds_feed_plugins().
File
- plugins/
FeedsOPMLParser.inc, line 11 - OPML Parser plugin.
View source
class FeedsOPMLParser extends FeedsParser {
/**
* Implements FeedsParser::parse().
*/
public function parse(FeedsImportBatch $batch, FeedsSource $source) {
feeds_include_library('opml_parser.inc', 'opml_parser');
$result = opml_parser_parse($batch
->getRaw());
$batch
->setTitle($result['title']);
$batch
->setItems($result['items']);
}
/**
* Return mapping sources.
*/
public function getMappingSources() {
return array(
'title' => array(
'name' => t('Feed title'),
'description' => t('Title of the feed.'),
),
'xmlurl' => array(
'name' => t('Feed URL'),
'description' => t('URL of the feed.'),
),
) + parent::getMappingSources();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsConfigurable:: |
protected | property | ||
FeedsConfigurable:: |
protected | property | CTools export enabled status of this object. | |
FeedsConfigurable:: |
protected | property | ||
FeedsConfigurable:: |
protected | property | ||
FeedsConfigurable:: |
public | function | Similar to setConfig but adds to existing configuration. | |
FeedsConfigurable:: |
public | function | Return default configuration. | 6 |
FeedsConfigurable:: |
public | function | Return configuration form for this object. The keys of the configuration form must match the keys of the array returned by configDefaults(). | 9 |
FeedsConfigurable:: |
public | function | Submission handler for configForm(). | 2 |
FeedsConfigurable:: |
public | function | Validation handler for configForm(). | 3 |
FeedsConfigurable:: |
public | function | Copy a configuration. | 1 |
FeedsConfigurable:: |
public | function | Determine whether this object is persistent and enabled. I. e. it is defined either in code or in the database and it is enabled. | 1 |
FeedsConfigurable:: |
public | function | Implements getConfig(). | 1 |
FeedsConfigurable:: |
public static | function | Instantiate a FeedsConfigurable object. | 1 |
FeedsConfigurable:: |
public | function | Set configuration. | |
FeedsConfigurable:: |
public | function | Override magic method __get(). Make sure that $this->config goes through getConfig() | |
FeedsOPMLParser:: |
public | function |
Return mapping sources. Overrides FeedsParser:: |
|
FeedsOPMLParser:: |
public | function |
Implements FeedsParser::parse(). Overrides FeedsParser:: |
|
FeedsParser:: |
public | function | Clear all caches for results for given source. | |
FeedsParser:: |
public | function | Get an element identified by $element_key of the given item. The element key corresponds to the values in the array returned by FeedsParser::getMappingSources(). | 1 |
FeedsPlugin:: |
public static | function | Get all available plugins. | |
FeedsPlugin:: |
public static | function | Gets all available plugins of a particular type. | |
FeedsPlugin:: |
public static | function | Determines whether given plugin is derived from given base plugin. | |
FeedsPlugin:: |
public | function |
Returns TRUE if $this->sourceForm() returns a form. Overrides FeedsSourceInterface:: |
|
FeedsPlugin:: |
protected static | function | Loads on-behalf implementations from mappers/ directory. | |
FeedsPlugin:: |
public | function |
Save changes to the configuration of this object.
Delegate saving to parent (= Feed) which will collect
information from this object by way of getConfig() and store it. Overrides FeedsConfigurable:: |
|
FeedsPlugin:: |
public | function |
Implements FeedsSourceInterface::sourceDefaults(). Overrides FeedsSourceInterface:: |
1 |
FeedsPlugin:: |
public | function |
A source is being deleted. Overrides FeedsSourceInterface:: |
2 |
FeedsPlugin:: |
public | function |
Callback methods, exposes source form. Overrides FeedsSourceInterface:: |
3 |
FeedsPlugin:: |
public | function |
Validation handler for sourceForm. Overrides FeedsSourceInterface:: |
2 |
FeedsPlugin:: |
public | function |
A source is being saved. Overrides FeedsSourceInterface:: |
2 |
FeedsPlugin:: |
public static | function | Determines the type of a plugin. | |
FeedsPlugin:: |
protected | function |
Constructor. Overrides FeedsConfigurable:: |