You are here

function composer_manager_lockfile_load in Composer Manager 7

Same name and namespace in other branches
  1. 6.2 composer_manager.admin.inc \composer_manager_lockfile_load()
  2. 6 composer_manager.admin.inc \composer_manager_lockfile_load()
  3. 7.2 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 281
Administrative settings for the Composer Manager module.

Code

function composer_manager_lockfile_load() {
  $json =& drupal_static(__FUNCTION__);
  if ($json === NULL) {
    $dir_uri = composer_manager_file_dir();
    $json = composer_manager_read_composer_file($dir_uri . '/composer.lock');
  }
  return $json;
}