You are here

protected function FeedsJSONPathParser::loadLibrary in Feeds JSONPath Parser 7

Loads the necessary library.

Throws

RuntimeException Thrown if the library does not exist.

1 call to FeedsJSONPathParser::loadLibrary()
FeedsJSONPathParser::parse in ./FeedsJSONPathParser.inc
Implements FeedsParser::parse().

File

./FeedsJSONPathParser.inc, line 35
Contains FeedsJSONPathParser.

Class

FeedsJSONPathParser
Parses JSON using JSONPath.

Code

protected function loadLibrary() {
  if (!feeds_jsonpath_parser_load_library()) {
    if (user_access('administer site configuration')) {
      $link = l(t('status report'), 'admin/reports/status');
    }
    else {
      $link = t('status report');
    }
    throw new RuntimeException(t('The JSONPath library is not installed. Check the !status_report_link for more info.', array(
      '!status_report_link' => $link,
    )));
  }
}