diff --git a/example/config.json b/example/config.json index dcd5571..0ea4401 100644 --- a/example/config.json +++ b/example/config.json @@ -1,5 +1,13 @@ { - "index": + "kevacoin": + { + "protocol":"http", + "host":"127.0.0.1", + "port":9992, + "username":"", + "password":"" + }, + "manticore": { "name":"kvazar", "host":"127.0.0.1", diff --git a/src/index.php b/src/index.php index 69483ca..4fd1ad1 100644 --- a/src/index.php +++ b/src/index.php @@ -1,9 +1,28 @@ index->name, - (array) $config->index->meta, - (string) $config->index->host, - (int) $config->index->port -); \ No newline at end of file +try +{ + $index = new \Kvazar\Index\Manticore( + (string) $config->manticore->name, + (array) $config->manticore->meta, + (string) $config->manticore->host, + (int) $config->manticore->port + ); +} + +catch (Exception $exception) +{ + exit( + print_r( + $exception, + true + ) + ); +} + +// Init kevacoin +try +{ + $kevacoin = new \Kevachat\Kevacoin\Client( + (string) $config->kevacoin->protocol, + (string) $config->kevacoin->host, + (int) $config->kevacoin->port, + (string) $config->kevacoin->username, + (string) $config->kevacoin->password + ); +} + +catch (Exception $exception) +{ + exit( + print_r( + $exception, + true + ) + ); +}