public function getEndpoint($forceNew = false)
    {
        $index = $forceNew === true ? ++$this->poolIndex : $this->poolIndex;
        if ($index == count($this->nodes)) {
            $index = 0;
        }

        if (!isset($this->endpoints[$this->network][$index])) {
            $api = new API([
                "use_ssl"  => false,
                "protocol" => "http",
                "host" => $this->nodes[$this->network][$index],
                "port" => 7890,
                "endpoint" => "/",
            ]);

            $this->endpoints[$this->network][$index] = $api;
        }

        $this->poolIndex = $index;
        return $this->endpoints[$this->network][$index];
    }
public function getEndpoint($forceNew = false)
    {
        $index = $forceNew === true ? ++$this->poolIndex : $this->poolIndex;
        if ($index == count($this->nodes)) {
            $index = 0;
        }

        if (!isset($this->endpoints[$this->network][$index])) {
            $api = new API([
                "use_ssl"  => false,
                "protocol" => "http",
                "host" => $this->nodes[$this->network][$index],
                "port" => 7890,
                "endpoint" => "/",
            ]);

            $this->endpoints[$this->network][$index] = $api;
        }

        $this->poolIndex = $index;
        return $this->endpoints[$this->network][$index];
    }
public function getEndpoint ( $ forceNew = false ) { $ index = $ forceNew === true ? ++ $ this -> poolIndex : $ this -> poolIndex ; if ( $ index == count ( $ this -> nodes ) ) { $ index = 0 ; } if ( ! isset ( $ this -> endpoints [ $ this -> network ] [ $ index ] ) ) { $ api = new API ( [ "use_ssl" => false , "protocol" => "http" , "host" => $ this -> nodes [ $ this -> network ] [ $ index ] , "port" => 7890 , "endpoint" => "/" , ] ) ; $ this -> endpoints [ $ this -> network ] [ $ index ] = $ api ; } $ this -> poolIndex = $ index ; return $ this -> endpoints [ $ this -> network ] [ $ index ] ; }
Get a connected API using the NEM node configured
at the current `poolIndex`

@param   boolean     $forceNew
@return  \NEM\API
Get a connected API using the NEM node configured at the current poolIndex