Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
3fa50248
Commit
3fa50248
authored
15 years ago
by
Alex Barth
Browse files
Options
Downloads
Patches
Plain Diff
Fix comments.
parent
4fb825e9
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
feeds.module
+3
-1
3 additions, 1 deletion
feeds.module
includes/FeedsImporter.inc
+2
-16
2 additions, 16 deletions
includes/FeedsImporter.inc
includes/FeedsSource.inc
+14
-12
14 additions, 12 deletions
includes/FeedsSource.inc
with
19 additions
and
29 deletions
feeds.module
+
3
−
1
View file @
3fa50248
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
includes/FeedsImporter.inc
+
2
−
16
View file @
3fa50248
...
...
@@ -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
, import
ing
*
and purging
.
* Its most important responsibilities are configuration management
and expir
ing
*
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
{
...
...
This diff is collapsed.
Click to expand it.
includes/FeedsSource.inc
+
14
−
12
View file @
3fa50248
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment