private function buildUrlByMethodName($method, array $parameters)
    {
        $url = $this
            ->apiUrls
            ->$method();

        return $this->host
            ? $this->buildUrlWithHost(
                $url,
                $parameters
            )
            : $this->buildUrlWithoutHost(
                $url,
                $parameters
            );
    }
private function buildUrlByMethodName($method, array $parameters)
    {
        $url = $this
            ->apiUrls
            ->$method();

        return $this->host
            ? $this->buildUrlWithHost(
                $url,
                $parameters
            )
            : $this->buildUrlWithoutHost(
                $url,
                $parameters
            );
    }
private function buildUrlByMethodName ( $ method , array $ parameters ) { $ url = $ this -> apiUrls -> $ method ( ) ; return $ this -> host ? $ this -> buildUrlWithHost ( $ url , $ parameters ) : $ this -> buildUrlWithoutHost ( $ url , $ parameters ) ; }
Given a method of the ApiUrls value object and a parameters for the route
construction, return url.

@param string $method     Method to be called for the url name
@param array  $parameters Parameters for the url construction

@return string Url
Given a method of the ApiUrls value object and a parameters for the route construction return url .