Projet

Général

Profil

Paste
Télécharger (4,78 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / feeds / feeds.plugins.inc @ ed9a13f1

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

    
172
  return $info;
173
}