1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* CTools plugins declarations.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Break out for feeds_feed_plugins().
|
10
|
*/
|
11
|
function _feeds_feeds_plugins() {
|
12
|
$path = drupal_get_path('module', 'feeds') . '/plugins';
|
13
|
|
14
|
$info = array();
|
15
|
$info['FeedsPlugin'] = array(
|
16
|
'hidden' => TRUE,
|
17
|
'handler' => array(
|
18
|
'class' => 'FeedsPlugin',
|
19
|
'file' => 'FeedsPlugin.inc',
|
20
|
'path' => $path,
|
21
|
),
|
22
|
);
|
23
|
$info['FeedsMissingPlugin'] = array(
|
24
|
'hidden' => TRUE,
|
25
|
'handler' => array(
|
26
|
'class' => 'FeedsMissingPlugin',
|
27
|
'file' => 'FeedsPlugin.inc',
|
28
|
'path' => $path,
|
29
|
),
|
30
|
);
|
31
|
$info['FeedsFetcher'] = array(
|
32
|
'hidden' => TRUE,
|
33
|
'handler' => array(
|
34
|
'parent' => 'FeedsPlugin',
|
35
|
'class' => 'FeedsFetcher',
|
36
|
'file' => 'FeedsFetcher.inc',
|
37
|
'path' => $path,
|
38
|
),
|
39
|
);
|
40
|
$info['FeedsParser'] = array(
|
41
|
'hidden' => TRUE,
|
42
|
'handler' => array(
|
43
|
'parent' => 'FeedsPlugin',
|
44
|
'class' => 'FeedsParser',
|
45
|
'file' => 'FeedsParser.inc',
|
46
|
'path' => $path,
|
47
|
),
|
48
|
);
|
49
|
$info['FeedsProcessor'] = array(
|
50
|
'hidden' => TRUE,
|
51
|
'handler' => array(
|
52
|
'parent' => 'FeedsPlugin',
|
53
|
'class' => 'FeedsProcessor',
|
54
|
'file' => 'FeedsProcessor.inc',
|
55
|
'path' => $path,
|
56
|
),
|
57
|
);
|
58
|
$info['FeedsHTTPFetcher'] = array(
|
59
|
'name' => 'HTTP Fetcher',
|
60
|
'description' => 'Download content from a URL.',
|
61
|
'handler' => array(
|
62
|
'parent' => 'FeedsFetcher', // This is the key name, not the class name.
|
63
|
'class' => 'FeedsHTTPFetcher',
|
64
|
'file' => 'FeedsHTTPFetcher.inc',
|
65
|
'path' => $path,
|
66
|
),
|
67
|
);
|
68
|
$info['FeedsFileFetcher'] = array(
|
69
|
'name' => 'File upload',
|
70
|
'description' => 'Upload content from a local file.',
|
71
|
'handler' => array(
|
72
|
'parent' => 'FeedsFetcher',
|
73
|
'class' => 'FeedsFileFetcher',
|
74
|
'file' => 'FeedsFileFetcher.inc',
|
75
|
'path' => $path,
|
76
|
),
|
77
|
);
|
78
|
$info['FeedsCSVParser'] = array(
|
79
|
'name' => 'CSV parser',
|
80
|
'description' => 'Parse data in Comma Separated Value format.',
|
81
|
'handler' => array(
|
82
|
'parent' => 'FeedsParser',
|
83
|
'class' => 'FeedsCSVParser',
|
84
|
'file' => 'FeedsCSVParser.inc',
|
85
|
'path' => $path,
|
86
|
),
|
87
|
);
|
88
|
if (extension_loaded('SimpleXML')) {
|
89
|
$info['FeedsSyndicationParser'] = array(
|
90
|
'name' => 'Common syndication parser',
|
91
|
'description' => 'Parse RSS and Atom feeds.',
|
92
|
'help' => 'Parse XML feeds in RSS 1, RSS 2 and Atom format.',
|
93
|
'handler' => array(
|
94
|
'parent' => 'FeedsParser',
|
95
|
'class' => 'FeedsSyndicationParser',
|
96
|
'file' => 'FeedsSyndicationParser.inc',
|
97
|
'path' => $path,
|
98
|
),
|
99
|
);
|
100
|
}
|
101
|
$info['FeedsOPMLParser'] = array(
|
102
|
'name' => 'OPML parser',
|
103
|
'description' => 'Parse OPML files.',
|
104
|
'handler' => array(
|
105
|
'parent' => 'FeedsParser',
|
106
|
'class' => 'FeedsOPMLParser',
|
107
|
'file' => 'FeedsOPMLParser.inc',
|
108
|
'path' => $path,
|
109
|
),
|
110
|
);
|
111
|
if (feeds_simplepie_exists()) {
|
112
|
$info['FeedsSimplePieParser'] = array(
|
113
|
'name' => 'SimplePie parser',
|
114
|
'description' => 'Parse RSS and Atom feeds.',
|
115
|
'help' => 'Use <a href="http://simplepie.org">SimplePie</a> to parse XML feeds in RSS 1, RSS 2 and Atom format.',
|
116
|
'handler' => array(
|
117
|
'parent' => 'FeedsParser',
|
118
|
'class' => 'FeedsSimplePieParser',
|
119
|
'file' => 'FeedsSimplePieParser.inc',
|
120
|
'path' => $path,
|
121
|
),
|
122
|
);
|
123
|
}
|
124
|
$info['FeedsSitemapParser'] = array(
|
125
|
'name' => 'Sitemap parser',
|
126
|
'description' => 'Parse Sitemap XML format feeds.',
|
127
|
'handler' => array(
|
128
|
'parent' => 'FeedsParser',
|
129
|
'class' => 'FeedsSitemapParser',
|
130
|
'file' => 'FeedsSitemapParser.inc',
|
131
|
'path' => $path,
|
132
|
),
|
133
|
);
|
134
|
$info['FeedsNodeProcessor'] = array(
|
135
|
'name' => 'Node processor',
|
136
|
'description' => 'Create and update nodes.',
|
137
|
'help' => 'Create and update nodes from parsed content.',
|
138
|
'handler' => array(
|
139
|
'parent' => 'FeedsProcessor',
|
140
|
'class' => 'FeedsNodeProcessor',
|
141
|
'file' => 'FeedsNodeProcessor.inc',
|
142
|
'path' => $path,
|
143
|
),
|
144
|
);
|
145
|
$info['FeedsUserProcessor'] = array(
|
146
|
'name' => 'User processor',
|
147
|
'description' => 'Create users.',
|
148
|
'help' => 'Create users from parsed content.',
|
149
|
'handler' => array(
|
150
|
'parent' => 'FeedsProcessor',
|
151
|
'class' => 'FeedsUserProcessor',
|
152
|
'file' => 'FeedsUserProcessor.inc',
|
153
|
'path' => $path,
|
154
|
),
|
155
|
);
|
156
|
if (module_exists('taxonomy')) {
|
157
|
$info['FeedsTermProcessor'] = array(
|
158
|
'name' => 'Taxonomy term processor',
|
159
|
'description' => 'Create taxonomy terms.',
|
160
|
'help' => 'Create taxonomy terms from parsed content.',
|
161
|
'handler' => array(
|
162
|
'parent' => 'FeedsProcessor',
|
163
|
'class' => 'FeedsTermProcessor',
|
164
|
'file' => 'FeedsTermProcessor.inc',
|
165
|
'path' => $path,
|
166
|
),
|
167
|
);
|
168
|
}
|
169
|
return $info;
|
170
|
}
|