Projet

Général

Profil

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

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

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
      'parent' => 'FeedsFetcher', // This is the key name, not the class name.
64
      'class' => 'FeedsHTTPFetcher',
65
      'file' => 'FeedsHTTPFetcher.inc',
66
      'path' => $path,
67
    ),
68
  );
69
  $info['FeedsFileFetcher'] = array(
70
    'name' => 'File upload',
71
    'description' => 'Upload content from a local file.',
72
    'handler' => array(
73
      'parent' => 'FeedsFetcher',
74
      'class' => 'FeedsFileFetcher',
75
      'file' => 'FeedsFileFetcher.inc',
76
      'path' => $path,
77
    ),
78
  );
79
  $info['FeedsCSVParser'] = array(
80
    'name' => 'CSV parser',
81
    'description' => 'Parse data in Comma Separated Value format.',
82
    'handler' => array(
83
      'parent' => 'FeedsParser',
84
      'class' => 'FeedsCSVParser',
85
      'file' => 'FeedsCSVParser.inc',
86
      'path' => $path,
87
    ),
88
  );
89
  if (extension_loaded('SimpleXML')) {
90
    $info['FeedsSyndicationParser'] = array(
91
      'name' => 'Common syndication parser',
92
      'description' => 'Parse RSS and Atom feeds.',
93
      'help' => 'Parse XML feeds in RSS 1, RSS 2 and Atom format.',
94
      'handler' => array(
95
        'parent' => 'FeedsParser',
96
        'class' => 'FeedsSyndicationParser',
97
        'file' => 'FeedsSyndicationParser.inc',
98
        'path' => $path,
99
      ),
100
    );
101
  }
102
  $info['FeedsOPMLParser'] = array(
103
    'name' => 'OPML parser',
104
    'description' => 'Parse OPML files.',
105
    'handler' => array(
106
      'parent' => 'FeedsParser',
107
      'class' => 'FeedsOPMLParser',
108
      'file' => 'FeedsOPMLParser.inc',
109
      'path' => $path,
110
    ),
111
  );
112
  if (feeds_simplepie_exists()) {
113
    $info['FeedsSimplePieParser'] = array(
114
      'name' => 'SimplePie parser',
115
      'description' => 'Parse RSS and Atom feeds.',
116
      'help' => 'Use <a href="http://simplepie.org">SimplePie</a> to parse XML feeds in RSS 1, RSS 2 and Atom format.',
117
      'handler' => array(
118
        'parent' => 'FeedsParser',
119
        'class' => 'FeedsSimplePieParser',
120
        'file' => 'FeedsSimplePieParser.inc',
121
        'path' => $path,
122
      ),
123
    );
124
  }
125
  $info['FeedsSitemapParser'] = array(
126
    'name' => 'Sitemap parser',
127
    'description' => 'Parse Sitemap XML format feeds.',
128
    'handler' => array(
129
      'parent' => 'FeedsParser',
130
      'class' => 'FeedsSitemapParser',
131
      'file' => 'FeedsSitemapParser.inc',
132
      'path' => $path,
133
    ),
134
  );
135
  $info['FeedsNodeProcessor'] = array(
136
    'name' => 'Node processor',
137
    'description' => 'Create and update nodes.',
138
    'help' => 'Create and update nodes from parsed content.',
139
    'handler' => array(
140
      'parent' => 'FeedsProcessor',
141
      'class' => 'FeedsNodeProcessor',
142
      'file' => 'FeedsNodeProcessor.inc',
143
      'path' => $path,
144
    ),
145
  );
146
  $info['FeedsUserProcessor'] = array(
147
    'name' => 'User processor',
148
    'description' => 'Create users.',
149
    'help' => 'Create users from parsed content.',
150
    'handler' => array(
151
      'parent' => 'FeedsProcessor',
152
      'class' => 'FeedsUserProcessor',
153
      'file' => 'FeedsUserProcessor.inc',
154
      'path' => $path,
155
    ),
156
  );
157
  if (module_exists('taxonomy')) {
158
    $info['FeedsTermProcessor'] = array(
159
      'name' => 'Taxonomy term processor',
160
      'description' => 'Create taxonomy terms.',
161
      'help' => 'Create taxonomy terms from parsed content.',
162
      'handler' => array(
163
        'parent' => 'FeedsProcessor',
164
        'class' => 'FeedsTermProcessor',
165
        'file' => 'FeedsTermProcessor.inc',
166
        'path' => $path,
167
      ),
168
    );
169
  }
170

    
171
  return $info;
172
}