Client/ServerFactory.php
public function make($host)
    {
        $host = $this->resolver->resolve($host, '/');
        $hash = md5($host);

        if (isset($this->instances[$hash])) {
            return $this->instances[$hash];
        }

        $validator = new Validator(
            $this->validator,
            new ResourceNormalizer
        );
        $instance = new Server(
            $this->capabilities->make($host),
            new Client(
                $this->loader->make($host),
                $this->serializer,
                $this->resolver,
                $validator,
                $this->dispatcher,
                $this->http
            )
        );
        $this->instances[$hash] = $instance;

        return $instance;
    }
public function make($host)
    {
        $host = $this->resolver->resolve($host, '/');
        $hash = md5($host);

        if (isset($this->instances[$hash])) {
            return $this->instances[$hash];
        }

        $validator = new Validator(
            $this->validator,
            new ResourceNormalizer
        );
        $instance = new Server(
            $this->capabilities->make($host),
            new Client(
                $this->loader->make($host),
                $this->serializer,
                $this->resolver,
                $validator,
                $this->dispatcher,
                $this->http
            )
        );
        $this->instances[$hash] = $instance;

        return $instance;
    }
public function make ( $ host ) { $ host = $ this -> resolver -> resolve ( $ host , '/' ) ; $ hash = md5 ( $ host ) ; if ( isset ( $ this -> instances [ $ hash ] ) ) { return $ this -> instances [ $ hash ] ; } $ validator = new Validator ( $ this -> validator , new ResourceNormalizer ) ; $ instance = new Server ( $ this -> capabilities -> make ( $ host ) , new Client ( $ this -> loader -> make ( $ host ) , $ this -> serializer , $ this -> resolver , $ validator , $ this -> dispatcher , $ this -> http ) ) ; $ this -> instances [ $ hash ] = $ instance ; return $ instance ; }
Make a server object for the given host

@param string $host

@return Server
Make a server object for the given host