function composer_manager_lockfile_load in Composer Manager 6
Same name and namespace in other branches
- 6.2 composer_manager.admin.inc \composer_manager_lockfile_load()
- 7.2 composer_manager.admin.inc \composer_manager_lockfile_load()
- 7 composer_manager.admin.inc \composer_manager_lockfile_load()
Loads the composer.lock file if it exists.
Return value
array The parsed JSON, and empty array if the file doesn't exist.
Throws
\RuntimeException
File
- ./
composer_manager.admin.inc, line 272 - Administrative settings for the Composer Manager module.
Code
function composer_manager_lockfile_load() {
$json =& composer_manager_static(__FUNCTION__);
if ($json === NULL) {
$dir_uri = variable_get('composer_manager_file_dir', file_directory_path() . '/composer');
$json = composer_manager_read_composer_file($dir_uri . '/composer.lock');
}
return $json;
}