mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 07:45:39 +08:00
Some prerequisites for refactor
This commit is contained in:
@@ -106,6 +106,21 @@ class Config
|
||||
return self::$lib;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws WrongUsageException
|
||||
* @throws FileSystemException
|
||||
*/
|
||||
public static function getExtTarget(string $name): ?array
|
||||
{
|
||||
if (self::$ext === null) {
|
||||
self::$ext = FileSystem::loadConfigArray('ext');
|
||||
}
|
||||
if (!isset(self::$ext[$name])) {
|
||||
throw new WrongUsageException('ext [' . $name . '] is not supported yet');
|
||||
}
|
||||
return self::$ext[$name]['target'] ?? ['static', 'shared'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws FileSystemException
|
||||
* @throws WrongUsageException
|
||||
|
||||
Reference in New Issue
Block a user