feeds.plugins.inc 4.6 KB

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