You are here

protected function FeedsExJsonPath::loadLibrary in Feeds extensible parsers 7.2

Same name and namespace in other branches
  1. 7 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 93
Contains FeedsExJsonPath.

Class

FeedsExJsonPath
Parses JSON via JSONPath.

Code

protected function loadLibrary() {
  if (!($path = feeds_ex_jsonpath_library_path())) {
    throw new RuntimeException(t('The JSONPath library is not installed.'));
  }
  require_once DRUPAL_ROOT . '/' . $path;
}