Links
Extends AbstractMediawikiObjectMediaWiki API Links class.
| since |
1.0 |
|---|---|
| package |
Joomla Framework |
Methods
__construct
Constructor.
__construct(\Joomla\Registry\Registry options = null, \Joomla\Mediawiki\Http client = null) : mixed
| since |
1.0 |
|---|
Arguments
- options
\Joomla\Registry\RegistryMediawiki options object.- client
\Joomla\Mediawiki\HttpThe HTTP client object.
Response
mixed
buildParameter
Method to build request parameters from a string array.
buildParameter(array params) : string
| since |
1.0 |
|---|
Arguments
- params
arraystring array that contains the parameters
Response
stringrequest parameter
enumerateLinks
Method to enumerate all links that point to a given namespace.
enumerateLinks(bool alcontinue = false, string alfrom = null, string alto = null, string alprefix = null, string alunique = null, array alprop = null, string alnamespace = null, int allimit = null) : object
| since |
1.0 |
|---|
Arguments
- alcontinue
boolWhen more results are available, use this to continue.- alfrom
stringStart listing at this title. The title need not exist.- alto
stringThe page title to stop enumerating at.- alprefix
stringSearch for all page titles that begin with this value.- alunique
stringOnly show unique links.- alprop
arrayWhat pieces of information to include.- alnamespace
stringThe namespace to enumerate.- allimit
intNumber of links to return.
Response
object
fetchUrl
Method to build and return a full request URL for the request.
fetchUrl(string path) : string
| since |
1.0 |
|---|
Arguments
- path
stringURL to inflect
Response
stringThe request URL.
getExtLinks
Method to return all external urls from the given page(s).
getExtLinks(array titles, int ellimit = null, string eloffset = null, string elprotocol = null, string elquery = null) : object
| since |
1.0 |
|---|
Arguments
- titles
arrayPage titles to retrieve links.- ellimit
intNumber of links to return.- eloffset
stringWhen more results are available, use this to continue.- elprotocol
stringProtocol of the url.- elquery
stringSearch string without protocol.
Response
object
getIWLinks
Method to return all interwiki links from the given page(s).
getIWLinks(array titles, bool iwurl = false, int iwlimit = null, bool iwcontinue = false, string iwprefix = null, string iwtitle = null, string iwdir = null) : object
| since |
1.0 |
|---|
Arguments
- titles
arrayPage titles to retrieve links.- iwurl
boolWhether to get the full url.- iwlimit
intNumber of interwiki links to return.- iwcontinue
boolWhen more results are available, use this to continue.- iwprefix
stringPrefix for the interwiki.- iwtitle
stringInterwiki link to search for.- iwdir
stringThe direction in which to list.
Response
object
getLangLinks
Method to return all interlanguage links from the given page(s).
getLangLinks(array titles, int lllimit = null, bool llcontinue = false, string llurl = null, string lllang = null, string lltitle = null, string lldir = null) : object
| since |
1.0 |
|---|
Arguments
- titles
arrayPage titles to retrieve links.- lllimit
intNumber of langauge links to return.- llcontinue
boolWhen more results are available, use this to continue.- llurl
stringWhether to get the full URL.- lllang
stringLanguage code.- lltitle
stringLink to search for.- lldir
stringThe direction in which to list.
Response
object
getLinks
Method to return all links from the given page(s).
getLinks(array titles, array plnamespace = null, string pllimit = null, string plcontinue = null, array pltitles = null, string pldir = null) : object
| since |
1.0 |
|---|
Arguments
- titles
arrayPage titles to retrieve links.- plnamespace
arrayNamespaces to get links.- pllimit
stringNumber of links to return.- plcontinue
stringContinue when more results are available.- pltitles
arrayList links to these titles.- pldir
stringDirection of listing.
Response
object
getLinksUsed
Method to return info about the link pages.
getLinksUsed(array titles) : object
| since |
1.0 |
|---|
Arguments
- titles
arrayPage titles to retrieve links.
Response
object
validateResponse
Method to validate response for errors
validateResponse(\Joomla\Http\Response response) : \SimpleXMLElement
| since |
1.0 |
|---|---|
| throws |
|
Arguments
- response
\Joomla\Http\ResponseThe response from the mediawiki server.
Response
\SimpleXMLElement
Properties
options
Options for the Mediawiki object.
| since |
1.0 |
|---|
Type(s)
\Joomla\Registry\Registry
client
The HTTP client object to use in sending HTTP requests.
| since |
1.0 |
|---|
Type(s)
\Joomla\Mediawiki\Http