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 | $info['FeedsSyndicationParser'] = array( |
---|
89 | 'name' => 'Common syndication parser', |
---|
90 | 'description' => 'Parse RSS and Atom feeds.', |
---|
91 | 'help' => 'Parse XML feeds in RSS 1, RSS 2 and Atom format.', |
---|
92 | 'handler' => array( |
---|
93 | 'parent' => 'FeedsParser', |
---|
94 | 'class' => 'FeedsSyndicationParser', |
---|
95 | 'file' => 'FeedsSyndicationParser.inc', |
---|
96 | 'path' => $path, |
---|
97 | ), |
---|
98 | ); |
---|
99 | $info['FeedsOPMLParser'] = array( |
---|
100 | 'name' => 'OPML parser', |
---|
101 | 'description' => 'Parse OPML files.', |
---|
102 | 'handler' => array( |
---|
103 | 'parent' => 'FeedsParser', |
---|
104 | 'class' => 'FeedsOPMLParser', |
---|
105 | 'file' => 'FeedsOPMLParser.inc', |
---|
106 | 'path' => $path, |
---|
107 | ), |
---|
108 | ); |
---|
109 | if (feeds_library_exists('simplepie.inc', 'simplepie')) { |
---|
110 | $info['FeedsSimplePieParser'] = array( |
---|
111 | 'name' => 'SimplePie parser', |
---|
112 | 'description' => 'Parse RSS and Atom feeds.', |
---|
113 | 'help' => 'Use <a href="http://simplepie.org">SimplePie</a> to parse XML feeds in RSS 1, RSS 2 and Atom format.', |
---|
114 | 'handler' => array( |
---|
115 | 'parent' => 'FeedsParser', |
---|
116 | 'class' => 'FeedsSimplePieParser', |
---|
117 | 'file' => 'FeedsSimplePieParser.inc', |
---|
118 | 'path' => $path, |
---|
119 | ), |
---|
120 | ); |
---|
121 | } |
---|
122 | $info['FeedsSitemapParser'] = array( |
---|
123 | 'name' => 'Sitemap parser', |
---|
124 | 'description' => 'Parse Sitemap XML format feeds.', |
---|
125 | 'handler' => array( |
---|
126 | 'parent' => 'FeedsParser', |
---|
127 | 'class' => 'FeedsSitemapParser', |
---|
128 | 'file' => 'FeedsSitemapParser.inc', |
---|
129 | 'path' => $path, |
---|
130 | ), |
---|
131 | ); |
---|
132 | $info['FeedsNodeProcessor'] = array( |
---|
133 | 'name' => 'Node processor', |
---|
134 | 'description' => 'Create and update nodes.', |
---|
135 | 'help' => 'Create and update nodes from parsed content.', |
---|
136 | 'handler' => array( |
---|
137 | 'parent' => 'FeedsProcessor', |
---|
138 | 'class' => 'FeedsNodeProcessor', |
---|
139 | 'file' => 'FeedsNodeProcessor.inc', |
---|
140 | 'path' => $path, |
---|
141 | ), |
---|
142 | ); |
---|
143 | $info['FeedsFeedNodeProcessor'] = array( |
---|
144 | 'name' => 'Feed Node processor', |
---|
145 | 'description' => 'Create <em>Feed nodes</em>.', |
---|
146 | 'help' => 'Create <em>Feed nodes</em> from parsed content. Feed nodes are nodes that can import feeds themselves. This can be useful for instance when importing OPML feeds.', |
---|
147 | 'handler' => array( |
---|
148 | 'parent' => 'FeedsProcessor', |
---|
149 | 'class' => 'FeedsFeedNodeProcessor', |
---|
150 | 'file' => 'FeedsFeedNodeProcessor.inc', |
---|
151 | 'path' => $path, |
---|
152 | ), |
---|
153 | ); |
---|
154 | $info['FeedsUserProcessor'] = array( |
---|
155 | 'name' => 'User processor', |
---|
156 | 'description' => 'Create users.', |
---|
157 | 'help' => 'Create users from parsed content.', |
---|
158 | 'handler' => array( |
---|
159 | 'parent' => 'FeedsProcessor', |
---|
160 | 'class' => 'FeedsUserProcessor', |
---|
161 | 'file' => 'FeedsUserProcessor.inc', |
---|
162 | 'path' => $path, |
---|
163 | ), |
---|
164 | ); |
---|
165 | if (module_exists('data')) { |
---|
166 | $info['FeedsDataProcessor'] = array( |
---|
167 | 'name' => 'Data processor', |
---|
168 | 'description' => 'Create data table records.', |
---|
169 | 'help' => 'Create data table records from parsed content.', |
---|
170 | 'handler' => array( |
---|
171 | 'parent' => 'FeedsProcessor', |
---|
172 | 'class' => 'FeedsDataProcessor', |
---|
173 | 'file' => 'FeedsDataProcessor.inc', |
---|
174 | 'path' => $path, |
---|
175 | ), |
---|
176 | ); |
---|
177 | } |
---|
178 | if (module_exists('taxonomy')) { |
---|
179 | $info['FeedsTermProcessor'] = array( |
---|
180 | 'name' => 'Taxonomy term processor', |
---|
181 | 'description' => 'Create taxonomy terms.', |
---|
182 | 'help' => 'Create taxonomy terms from parsed content.', |
---|
183 | 'handler' => array( |
---|
184 | 'parent' => 'FeedsProcessor', |
---|
185 | 'class' => 'FeedsTermProcessor', |
---|
186 | 'file' => 'FeedsTermProcessor.inc', |
---|
187 | 'path' => $path, |
---|
188 | ), |
---|
189 | ); |
---|
190 | } |
---|
191 | return $info; |
---|
192 | } |
---|