Skip to content
Snippets Groups Projects
Commit 99a88a3a authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Make it possible to include parameters in the OpenURL resolver base URL.

parent 5f1efadc
Branches
Tags
No related merge requests found
......@@ -68,7 +68,10 @@ abstract class AbstractBase implements DriverInterface
*/
public function getResolverUrl($openURL)
{
return $this->baseUrl . '?' . $openURL;
$url = $this->baseUrl;
$url .= strpos($url, '?') === false ? '?' : '&';
$url .= $openURL;
return $url;
}
/**
......
......@@ -81,7 +81,7 @@ class Redi extends AbstractBase
*/
public function fetchLinks($openURL)
{
$url = $this->baseUrl . '?' . $openURL;
$url = $this->getResolverUrl($openURL);
$feed = $this->httpClient->setUri($url)->send()->getBody();
return $feed;
}
......
......@@ -72,8 +72,9 @@ class Sfx extends AbstractBase
public function fetchLinks($openURL)
{
// Make the call to SFX and load results
$url = $this->baseUrl .
'?sfx.response_type=multi_obj_detailed_xml&svc.fulltext=yes&' . $openURL;
$url = $this->getResolverUrl(
'sfx.response_type=multi_obj_detailed_xml&svc.fulltext=yes&' . $openURL
);
$feed = $this->httpClient->setUri($url)->send()->getBody();
return $feed;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment