You are here

class FeedsExJsonPathParserFlow in Feeds extensible parsers 7

Wraps the Flow JSONPath implementation.

Hierarchy

Expanded class hierarchy of FeedsExJsonPathParserFlow

File

src/FeedsExJsonPath.inc, line 178
Contains FeedsExJsonPath.

View source
class FeedsExJsonPathParserFlow implements FeedsExJsonPathParserInterface {

  /**
   * {@inheritdoc}
   */
  public function search(array $data, $expression) {

    // Use class string so that PHP 5.2 doesn't complain.
    $class = 'Flow\\JSONPath\\JSONPath';
    $json_path = new $class($data);
    return $json_path
      ->find($expression)
      ->data();
  }

}

Members