You are here

protected function FeedsJSONPathParser::debug in Feeds JSONPath Parser 7

Same name and namespace in other branches
  1. 6 FeedsJSONPathParser.inc \FeedsJSONPathParser::debug()
2 calls to FeedsJSONPathParser::debug()
FeedsJSONPathParser::parse in ./FeedsJSONPathParser.inc
Implements FeedsParser::parse().
FeedsJSONPathParser::parseSourceElement in ./FeedsJSONPathParser.inc
Parses one item from the context array.

File

./FeedsJSONPathParser.inc, line 443
Contains FeedsJSONPathParser.

Class

FeedsJSONPathParser
Parses JSON using JSONPath.

Code

protected function debug($item, $source) {
  if (in_array($source, $this->debug)) {
    $o = '<ul>';
    foreach ($item as $i) {
      $o .= '<li>' . check_plain(var_export($i, TRUE)) . '</li>';
    }
    $o .= '</ul>';
    drupal_set_message($source . ':' . $o);
  }
}