init kevacoin model

This commit is contained in:
yggverse 2024-05-09 11:46:01 +03:00
parent cf9d255eb5
commit 90a7325623

38
src/Model/Kevacoin.php Normal file
View File

@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace Yggverse\Next\Model;
class Kevacoin
{
private \Kevachat\Kevacoin\Client $_client;
private string $_namespace;
public function __construct(
string $scheme,
string $user,
string $password,
string $host,
int $port,
string $namespace
) {
// Connect wallet
$this->_client = new \Kevachat\Kevacoin\Client(
$scheme,
$host,
$port,
$username,
$password
);
// Check namespace given exists
if (!$this->_namespace = $this->_client->kevaFilter($namespace))
{
throw new \Exception(
_('could not find requested namespace!')
);
}
}
}