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) :
buildParameter
Method to build request parameters from a string array.
buildParameter(mixed||string|int params) :
| since |
1.0 |
|---|
Arguments
- params
array<string|int, mixed>string array that contains the parameters
Response
stringrequest parameter
enumerateLinks
Method to enumerate all links that point to a given namespace.
enumerateLinks( alcontinue = false, alfrom = null, alto = null, alprefix = null, alunique = null, array alprop = null, alnamespace = null, allimit = null) :
| 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
array<string|int, mixed>|nullWhat 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( path) :
| 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(mixed||string|int titles, ellimit = null, eloffset = null, elprotocol = null, elquery = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page 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(mixed||string|int titles, iwurl = false, iwlimit = null, iwcontinue = false, iwprefix = null, iwtitle = null, iwdir = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page 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(mixed||string|int titles, lllimit = null, llcontinue = false, llurl = null, lllang = null, lltitle = null, lldir = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page titles to retrieve links.- lllimit
intNumber of language 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(mixed||string|int titles, array plnamespace = null, pllimit = null, plcontinue = null, array pltitles = null, pldir = null) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page titles to retrieve links.- plnamespace
array<string|int, mixed>|nullNamespaces to get links.- pllimit
stringNumber of links to return.- plcontinue
stringContinue when more results are available.- pltitles
array<string|int, mixed>|nullList links to these titles.- pldir
stringDirection of listing.
Response
object
getLinksUsed
Method to return info about the link pages.
getLinksUsed(mixed||string|int titles) :
| since |
1.0 |
|---|
Arguments
- titles
array<string|int, mixed>Page 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
ResponseThe response from the mediawiki server.
Response
SimpleXMLElement