protected function FeedsExJsonPath::loadLibrary in Feeds extensible parsers 7
Same name and namespace in other branches
- 7.2 src/FeedsExJsonPath.inc \FeedsExJsonPath::loadLibrary()
 
Loads the necessary library.
Subclasses can override this to load the necessary library. It will be called automatically.
Throws
RuntimeException Thrown if the library does not exist.
Overrides FeedsExBase::loadLibrary
File
- src/
FeedsExJsonPath.inc, line 119  - Contains FeedsExJsonPath.
 
Class
- FeedsExJsonPath
 - Parses JSON via JSONPath.
 
Code
protected function loadLibrary() {
  if (!FeedsExJsonUtility::jsonPathParserInstalled()) {
    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,
    )));
  }
}