You are here

protected function JmesPathParser::loadLibrary in Feeds extensible parsers 8

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 ParserBase::loadLibrary

File

src/Feeds/Parser/JmesPathParser.php, line 235

Class

JmesPathParser
Defines a JSON parser using JMESPath.

Namespace

Drupal\feeds_ex\Feeds\Parser

Code

protected function loadLibrary() {
  if (!class_exists('JmesPath\\AstRuntime')) {
    throw new \RuntimeException($this
      ->t('The JMESPath library is not installed.'));
  }
}