Skip to content
Snippets Groups Projects
Commit 3fa50248 authored by Alex Barth's avatar Alex Barth
Browse files

Fix comments.

parent 4fb825e9
No related branches found
No related tags found
No related merge requests found
......@@ -385,7 +385,9 @@ function feeds_scheduler_work($feed_info) {
/**
* Load all importers.
*
* @
* @param $load_disabled
* Pass TRUE to load all importers, enabled or disabled, pass FALSE to only
* retrieve enabled importers.
*
* @return
* An array of all feed configurations available.
......
......@@ -69,27 +69,13 @@ abstract class FeedsResult {
* plugin. It further contains the configuration for itself and each of the
* three plugins.
*
* Its most important responsibilities are configuration management, importing
* and purging.
* Its most important responsibilities are configuration management and expiring
* of all items produced by this importer.
*
* When a FeedsImporter is instantiated, it loads its configuration. Then it
* instantiates one fetcher, one parser and one processor plugin depending on
* the configuration information. After instantiating them, it sets them to
* the configuration information it holds for them.
*
* @see __construct()
*
* When importing or purging, a FeedsSource object is passed into import() and
* the fetcher, the parser and the processor are subsequently executed. It is
* important to note that at no time a FeedsImporter object holds a pointer to a
* FeedsSource object, while a FeedsSource object always holds a pointer to a
* FeedsImporter object. The reason is that there is only one FeedsImporter
* instance per configuration, while there is a FeedsSource object per source to
* be imported. Sources can be tied to feed nodes, thus there can be potentially
* many sources per feeds configuration.
*
* @see import()
* @see clear()
*/
class FeedsImporter extends FeedsConfigurable {
......
......@@ -42,11 +42,14 @@ interface FeedsSourceInterface {
}
/**
* This class encapsulates a source of a feed. While a FeedsImporter object
* contains a feed import configuration, a FeedsSource object is what passes
* through such an import configuration, holds information about the feed's
* source (e. g. the URL) and provides all the information for necessary for
* fetching, parsing and processing of a feed source.
* This class encapsulates a source of a feed. It stores where the feed can be
* found and how to import it.
*
* Information on how to import a feed is encapsulated in a FeedsImporter object
* which is identified by the common id of the FeedsSource and the
* FeedsImporter. More than one FeedsSource can use the same FeedsImporter
* therefore a FeedsImporter never holds a pointer to a FeedsSource object, nor
* does it hold any other information for a particular FeedsSource object.
*
* FeedsPlugins that implement FeedsSourceInterface and return TRUE on
* hasSourceConfig() can define default values and forms that allow for
......@@ -58,8 +61,9 @@ interface FeedsSourceInterface {
* FeedsPlugin class only exists once per FeedsImporter configuration, while an
* instance of a FeedsSource class exists once per feed_nid to be imported.
*
* As with Feed, the idea with FeedsSource is that it can be used without
* actually saving the object to the database.
* As with FeedsImporter, the idea with FeedsSource is that it can be used
* without actually saving the object to the database (@todo: needs to be
* tested).
*/
class FeedsSource extends FeedsConfigurable {
......@@ -97,11 +101,9 @@ class FeedsSource extends FeedsConfigurable {
/**
* Import a feed: execute, fetching, parsing and processing stage.
*
* @throws Exception
* If a problem with fetching, parsing or processing occured.
* @todo: Iron out and document potential Exceptions.
* @todo: Support batching.
* @todo: catch exceptions outside of import(), clear() and expire().
* @todo: Iron out and document potential Exceptions.
* @todo: Support batching.
* @todo: catch exceptions outside of import(), clear() and expire().
*/
public function import() {
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment