Files
zhamao-framework/src/ZM/Utils/ZMUtil.php

17 lines
307 B
PHP
Raw Normal View History

2020-03-02 16:14:20 +08:00
<?php
declare(strict_types=1);
2020-03-02 16:14:20 +08:00
namespace ZM\Utils;
class ZMUtil
{
2022-08-13 17:00:29 +08:00
/**
* 获取 composer.json 并转为数组进行读取使用
*/
public static function getComposerMetadata(): ?array
{
return json_decode(file_get_contents(SOURCE_ROOT_DIR . '/composer.json'), true);
}
}