public static function FeedsExJsonUtility::jsonPathParserInstalled in Feeds extensible parsers 7
Determines if a JSONPath parser is installed.
Return value
bool True if a parser is installed, false if not.
4 calls to FeedsExJsonUtility::jsonPathParserInstalled()
- FeedsExJsonPath::loadLibrary in src/
FeedsExJsonPath.inc - Loads the necessary library.
- feeds_ex_feeds_plugins in ./
feeds_ex.feeds.inc - Implements hook_feeds_plugins().
- feeds_ex_requirements in ./
feeds_ex.install - Implements hook_requirements().
- feeds_ex_update_7102 in ./
feeds_ex.install - Checks if for any importers libraries got missing.
File
- src/
Json/ Utility.php, line 151 - Contains FeedsExJsonUtility.
Class
- FeedsExJsonUtility
- Various helpers for handling JSON.
Code
public static function jsonPathParserInstalled() {
// Check first if the class is already loaded.
if (class_exists('\\Flow\\JSONPath\\JSONPath', TRUE)) {
// We're good!
return TRUE;
}
// Try loading the library using libraries module.
if (static::loadJsonPathUsingLibraries()) {
return TRUE;
}
// Try loading the library by checking common paths.
if (static::loadJsonPathUsingPath()) {
return TRUE;
}
// In all other cases, loading the library failed.
return FALSE;
}