mirror of
https://github.com/YGGverse/next.git
synced 2025-03-12 13:41:27 +00:00
init kevacoin model
This commit is contained in:
parent
cf9d255eb5
commit
90a7325623
38
src/Model/Kevacoin.php
Normal file
38
src/Model/Kevacoin.php
Normal 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!')
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user