feeds_jsonpath_parser.module 713 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /**
  3. * Implements hook_feeds_plugins().
  4. */
  5. function feeds_jsonpath_parser_feeds_plugins() {
  6. $path = drupal_get_path('module', 'feeds_jsonpath_parser');
  7. $info = array();
  8. $info['FeedsJSONPathParser'] = array(
  9. 'name' => t('JSONPath parser'),
  10. 'description' => t('Parse JSON using JSONPath.'),
  11. 'handler' => array(
  12. 'parent' => 'FeedsParser',
  13. 'class' => 'FeedsJSONPathParser',
  14. 'file' => 'FeedsJSONPathParser.inc',
  15. 'path' => $path,
  16. ),
  17. );
  18. return $info;
  19. }
  20. /**
  21. * Implements hook_enable().
  22. *
  23. * Clear Feed's plugin cache so that this plugin shows up.
  24. */
  25. function feeds_jsonpath_parser_enable() {
  26. cache_clear_all('plugins:feeds:plugins', 'cache');
  27. }