Major update, add renew command, rename register to setup

This commit is contained in:
Niklas Keller
2015-12-09 20:10:21 +01:00
parent b1e3839323
commit 7f0869150f
15 changed files with 517 additions and 231 deletions

16
src/functions.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace Kelunik\AcmeClient;
function commandToClass(string $command): string {
return __NAMESPACE__ . "\\Commands\\" . ucfirst($command);
}
function getServer(Configuration $config = null) {
if ($config === null) {
$path = dirname(__DIR__) . "/data";
$config = new Configuration($path . "/account/config.json");
}
return $config->get("server");
}