You are here

protected function FeedsExJmesPath::loadLibrary in Feeds extensible parsers 7.2

Same name and namespace in other branches
  1. 7 src/FeedsExJmesPath.inc \FeedsExJmesPath::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/FeedsExJmesPath.inc, line 125
Contains FeedsExJmesPath.

Class

FeedsExJmesPath
Parses JSON documents with JMESPath.

Code

protected function loadLibrary() {
  if (!($path = feeds_ex_library_path('jmespath.php', 'vendor/autoload.php'))) {
    throw new RuntimeException(t('The JMESPath library is not installed.'));
  }
  require_once DRUPAL_ROOT . '/' . $path;
}