protected function setBitcoinLibMagicBytes($network, $testnet, $regtest) {

        if ($network === "bitcoin") {
            if ($regtest) {
                $useNetwork = NetworkFactory::bitcoinRegtest();
            } else if ($testnet) {
                $useNetwork = NetworkFactory::bitcoinTestnet();
            } else {
                $useNetwork = NetworkFactory::bitcoin();
            }
        } else if ($network === "bitcoincash") {
            if ($regtest) {
                $useNetwork = new BitcoinCashRegtest();
            } else if ($testnet) {
                $useNetwork = new BitcoinCashTestnet();
            } else {
                $useNetwork = new BitcoinCash();
            }
        }

        Bitcoin::setNetwork($useNetwork);
    }
protected function setBitcoinLibMagicBytes($network, $testnet, $regtest) {

        if ($network === "bitcoin") {
            if ($regtest) {
                $useNetwork = NetworkFactory::bitcoinRegtest();
            } else if ($testnet) {
                $useNetwork = NetworkFactory::bitcoinTestnet();
            } else {
                $useNetwork = NetworkFactory::bitcoin();
            }
        } else if ($network === "bitcoincash") {
            if ($regtest) {
                $useNetwork = new BitcoinCashRegtest();
            } else if ($testnet) {
                $useNetwork = new BitcoinCashTestnet();
            } else {
                $useNetwork = new BitcoinCash();
            }
        }

        Bitcoin::setNetwork($useNetwork);
    }
protected function setBitcoinLibMagicBytes ( $ network , $ testnet , $ regtest ) { if ( $ network === "bitcoin" ) { if ( $ regtest ) { $ useNetwork = NetworkFactory :: bitcoinRegtest ( ) ; } else if ( $ testnet ) { $ useNetwork = NetworkFactory :: bitcoinTestnet ( ) ; } else { $ useNetwork = NetworkFactory :: bitcoin ( ) ; } } else if ( $ network === "bitcoincash" ) { if ( $ regtest ) { $ useNetwork = new BitcoinCashRegtest ( ) ; } else if ( $ testnet ) { $ useNetwork = new BitcoinCashTestnet ( ) ; } else { $ useNetwork = new BitcoinCash ( ) ; } } Bitcoin :: setNetwork ( $ useNetwork ) ; }
set BitcoinLib to the correct magic-byte defaults for the selected network

@param $network
@param bool $testnet
@param bool $regtest
set BitcoinLib to the correct magic - byte defaults for the selected network