src/Autodiscover.php
public function discover()
    {
        $result = $this->tryTLD();

        if ($result === false) {
            $result = $this->trySubdomain();
        }

        if ($result === false) {
            $result = $this->trySubdomainUnauthenticatedGet();
        }

        if ($result === false) {
            $result = $this->trySRVRecord();
        }

        if ($result === false) {
            throw new \RuntimeException('Autodiscovery failed.');
        }

        return $result;
    }
public function discover()
    {
        $result = $this->tryTLD();

        if ($result === false) {
            $result = $this->trySubdomain();
        }

        if ($result === false) {
            $result = $this->trySubdomainUnauthenticatedGet();
        }

        if ($result === false) {
            $result = $this->trySRVRecord();
        }

        if ($result === false) {
            throw new \RuntimeException('Autodiscovery failed.');
        }

        return $result;
    }
public function discover ( ) { $ result = $ this -> tryTLD ( ) ; if ( $ result === false ) { $ result = $ this -> trySubdomain ( ) ; } if ( $ result === false ) { $ result = $ this -> trySubdomainUnauthenticatedGet ( ) ; } if ( $ result === false ) { $ result = $ this -> trySRVRecord ( ) ; } if ( $ result === false ) { throw new \ RuntimeException ( 'Autodiscovery failed.' ) ; } return $ result ; }
Execute the full discovery chain of events in the correct sequence
until a valid response is received, or all methods have failed.

@return integer
One of the AUTODISCOVERED_VIA_* constants.

@throws \RuntimeException
When all autodiscovery methods fail.
Execute the full discovery chain of events in the correct sequence until a valid response is received or all methods have failed .