for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Blocktrail\SDK;
use BitWasp\Bitcoin\Network\NetworkInterface;
class NetworkParams
{
/**
* @var NetworkInterface
*/
private $network;
* @var string
private $name;
* @var bool
private $testnet;
private $shortCode;
* NetworkParams constructor.
* @param NetworkInterface $network
* @param string $name
* @param string $shortCode
* @param bool $testnet
public function __construct($shortCode, $name, $testnet, NetworkInterface $network) {
$this->network = $network;
$this->name = $name;
$this->testnet = $testnet;
$this->shortCode = $shortCode;
}
* @return string
public function getName() {
return $this->name;
public function getShortCode() {
return $this->shortCode;
* @param $network
* @return bool
public function isNetwork($network) {
return $this->name === $network;
public function isTestnet() {
return $this->testnet;
* @return NetworkInterface
public function getNetwork() {
return $this->network;