public function newRequest(RequestAdapter $request = null)
    {
        if (empty($request)) {
            $request = new GuzzleRequest;
        }

        $request = $request::init($this->endPoint);

        if (! empty($this->plugins)) {
            array_walk($this->plugins, [$request, 'addPlugin']);
        }

        return $request;

    }
public function newRequest(RequestAdapter $request = null)
    {
        if (empty($request)) {
            $request = new GuzzleRequest;
        }

        $request = $request::init($this->endPoint);

        if (! empty($this->plugins)) {
            array_walk($this->plugins, [$request, 'addPlugin']);
        }

        return $request;

    }
public function newRequest ( RequestAdapter $ request = null ) { if ( empty ( $ request ) ) { $ request = new GuzzleRequest ; } $ request = $ request :: init ( $ this -> endPoint ) ; if ( ! empty ( $ this -> plugins ) ) { array_walk ( $ this -> plugins , [ $ request , 'addPlugin' ] ) ; } return $ request ; }
Object builder to create and use the Http request client.
In this case, is set up as default Guzzle Http client.

@param  \RestGalleries\Http\RequestAdapter $request
@return \RestGalleries\Http\RequestAdapter
Object builder to create and use the Http request client . In this case is set up as default Guzzle Http client .