protected function buildOEmbedRequestUrl($resource, $endPoint, $format = self::FORMAT_DEFAULT)
    {
        $parameters = [
            'url' => $resource,
            'format' => $format,
            'version' => self::VERSION
        ];

        if ($this->getRequestParameters() !== null) {
            $parameters = Arrays::arrayMergeRecursiveOverrule($this->getRequestParameters()->toArray(), $parameters);
        }

        $urlParams = http_build_query($parameters, '', '&');
        $url = $endPoint . ((strpos($endPoint, '?') !== false) ? '&' : '?') . $urlParams;

        return $url;
    }
protected function buildOEmbedRequestUrl($resource, $endPoint, $format = self::FORMAT_DEFAULT)
    {
        $parameters = [
            'url' => $resource,
            'format' => $format,
            'version' => self::VERSION
        ];

        if ($this->getRequestParameters() !== null) {
            $parameters = Arrays::arrayMergeRecursiveOverrule($this->getRequestParameters()->toArray(), $parameters);
        }

        $urlParams = http_build_query($parameters, '', '&');
        $url = $endPoint . ((strpos($endPoint, '?') !== false) ? '&' : '?') . $urlParams;

        return $url;
    }
protected function buildOEmbedRequestUrl ( $ resource , $ endPoint , $ format = self :: FORMAT_DEFAULT ) { $ parameters = [ 'url' => $ resource , 'format' => $ format , 'version' => self :: VERSION ] ; if ( $ this -> getRequestParameters ( ) !== null ) { $ parameters = Arrays :: arrayMergeRecursiveOverrule ( $ this -> getRequestParameters ( ) -> toArray ( ) , $ parameters ) ; } $ urlParams = http_build_query ( $ parameters , '' , '&' ) ; $ url = $ endPoint . ( ( strpos ( $ endPoint , '?' ) !== false ) ? '&' : '?' ) . $ urlParams ; return $ url ; }
Build the oEmbed request URL according to the specification.

@param string $resource The URL of the resource to fetch.
@param string $endPoint The provider endpoint URL
@param string $format The format of the response we'd like to receive.
@return string
Build the oEmbed request URL according to the specification .