src/ReactFactory.php
protected static function buildHttpClient04(
        LoopInterface $loop,
        $dns = null
    ) {
        // create dns resolver if one isn't provided
        if (null === $dns) {
            $dns = static::buildDnsResolver($loop);
        }

        // validate connector instance for proper error reporting
        if (!$dns instanceof DnsResolver) {
            throw new \InvalidArgumentException('For react http client v0.4, $dns must be an instance of DnsResolver');
        }

        $factory = new HttpClientFactory();

        return $factory->create($loop, $dns);
    }
protected static function buildHttpClient04(
        LoopInterface $loop,
        $dns = null
    ) {
        // create dns resolver if one isn't provided
        if (null === $dns) {
            $dns = static::buildDnsResolver($loop);
        }

        // validate connector instance for proper error reporting
        if (!$dns instanceof DnsResolver) {
            throw new \InvalidArgumentException('For react http client v0.4, $dns must be an instance of DnsResolver');
        }

        $factory = new HttpClientFactory();

        return $factory->create($loop, $dns);
    }
protected static function buildHttpClient04 ( LoopInterface $ loop , $ dns = null ) { // create dns resolver if one isn't provided if ( null === $ dns ) { $ dns = static :: buildDnsResolver ( $ loop ) ; } // validate connector instance for proper error reporting if ( ! $ dns instanceof DnsResolver ) { throw new \ InvalidArgumentException ( 'For react http client v0.4, $dns must be an instance of DnsResolver' ) ; } $ factory = new HttpClientFactory ( ) ; return $ factory -> create ( $ loop , $ dns ) ; }
Builds a React Http client v0.4 style.

@param LoopInterface    $loop
@param DnsResolver|null $dns

@return HttpClient
Builds a React Http client v0 . 4 style .