DriverInterface
in
Resolver Specific Driver Class
This interface class is the definition of the required methods for interacting with the local OpenURL resolver.
Tags
Table of Contents
- fetchLinks() : string
- Fetch Links
- getResolverUrl() : string
- Get Resolver Url
- parseLinks() : array<string|int, mixed>
- Parse Links
- supportsMoreOptionsLink() : bool
- This controls whether a "More options" link will be shown below the fetched resolver links eventually linking to the resolver page previously being parsed.
Methods
fetchLinks()
Fetch Links
public
fetchLinks(string $openURL) : string
Fetches a set of links corresponding to an OpenURL
Parameters
- $openURL : string
-
openURL (url-encoded)
Return values
string —raw XML returned by resolver
getResolverUrl()
Get Resolver Url
public
getResolverUrl(string $openURL) : string
Transform the OpenURL as needed to get a working link to the resolver.
Parameters
- $openURL : string
-
openURL (url-encoded)
Return values
string —Returns resolver specific url
parseLinks()
Parse Links
public
parseLinks(string $xmlstr) : array<string|int, mixed>
Parses an XML file returned by a link resolver and converts it to a standardised format for display
Parameters
- $xmlstr : string
-
Raw XML returned by resolver
Return values
array<string|int, mixed> —Array of values
supportsMoreOptionsLink()
This controls whether a "More options" link will be shown below the fetched resolver links eventually linking to the resolver page previously being parsed.
public
supportsMoreOptionsLink() : bool
This is especially useful for resolver such as the JOP resolver returning XML which would not be of any immediate use for the user.