public function nextEndpoint() 
    {
        assert(is_array($this->_values[self::OPTION_ENDPOINT]));
        $endpoints = $this->_values[self::OPTION_ENDPOINT];

        $numberOfEndpoints = count($endpoints);

        $this->_currentEndpointIndex++;
        if ($this->_currentEndpointIndex >= $numberOfEndpoints) {
            $this->_currentEndpointIndex = 0;
        }

        $endpoint =  $endpoints[$this->_currentEndpointIndex];

        if ($numberOfEndpoints > 1) {
            $this->storeOptionsInCache();
        }

        return $endpoint;
    }
public function nextEndpoint() 
    {
        assert(is_array($this->_values[self::OPTION_ENDPOINT]));
        $endpoints = $this->_values[self::OPTION_ENDPOINT];

        $numberOfEndpoints = count($endpoints);

        $this->_currentEndpointIndex++;
        if ($this->_currentEndpointIndex >= $numberOfEndpoints) {
            $this->_currentEndpointIndex = 0;
        }

        $endpoint =  $endpoints[$this->_currentEndpointIndex];

        if ($numberOfEndpoints > 1) {
            $this->storeOptionsInCache();
        }

        return $endpoint;
    }
public function nextEndpoint ( ) { assert ( is_array ( $ this -> _values [ self :: OPTION_ENDPOINT ] ) ) ; $ endpoints = $ this -> _values [ self :: OPTION_ENDPOINT ] ; $ numberOfEndpoints = count ( $ endpoints ) ; $ this -> _currentEndpointIndex ++ ; if ( $ this -> _currentEndpointIndex >= $ numberOfEndpoints ) { $ this -> _currentEndpointIndex = 0 ; } $ endpoint = $ endpoints [ $ this -> _currentEndpointIndex ] ; if ( $ numberOfEndpoints > 1 ) { $ this -> storeOptionsInCache ( ) ; } return $ endpoint ; }
Return the next endpoint from the list of endpoints
As a side-effect this function switches to a new endpoint

@return string - the next endpoint
Return the next endpoint from the list of endpoints As a side - effect this function switches to a new endpoint