-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.php
More file actions
26 lines (21 loc) · 697 Bytes
/
Config.php
File metadata and controls
26 lines (21 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
use CodeArchitect\Framework\Private\MultiChainClient;
require 'vendor/autoload.php';
class Config
{
public function __construct()
{
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
$dotenv->required(['RPC_HOST', 'RPC_PORT', 'RPC_USER', 'RPC_PASSWORD']);
}
public function instance(): MultiChainClient
{
// return new MultiChainClient( $this->RPC_host, $this->RPC_port, $this->RPC_user, $this->RPC_password);
return new MultiChainClient( $_ENV['RPC_HOST'], $_ENV['RPC_PORT'], $_ENV['RPC_USER'], $_ENV['RPC_PASSWORD']);
}
public function getChainName()
{
return $_ENV["CHAIN_NAME"];
}
}