function composer_manager_installed_packages_load in Composer Manager 6
Same name and namespace in other branches
- 6.2 composer_manager.admin.inc \composer_manager_installed_packages_load()
- 7.2 composer_manager.admin.inc \composer_manager_installed_packages_load()
- 7 composer_manager.admin.inc \composer_manager_installed_packages_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
2 calls to composer_manager_installed_packages_load()
- composer_manager_installed_packages in ./
composer_manager.admin.inc - Reads installed package versions from the composer.lock file.
- composer_manager_package_dependents in ./
composer_manager.admin.inc - Returns each installed packages dependents.
File
- ./
composer_manager.admin.inc, line 289 - Administrative settings for the Composer Manager module.
Code
function composer_manager_installed_packages_load() {
$json =& composer_manager_static(__FUNCTION__);
if ($json === NULL) {
$file_uri = composer_manager_vendor_dir() . '/composer/installed.json';
$json = composer_manager_read_composer_file($file_uri);
}
return $json;
}