Joomla Platform  13.1
Documentation des API du framework Joomla Platform
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JMediawikiLinks
+ Graphe d'héritage de JMediawikiLinks:
+ Graphe de collaboration de JMediawikiLinks:

Liste de tous les membres

Fonctions membres publiques

 getLinks (array $titles, array $plnamespace=null, $pllimit=null, $plcontinue=null, array $pltitles=null, $pldir=null)
 getLinksUsed (array $titles)
 getIWLinks (array $titles, $iwurl=false, $iwlimit=null, $iwcontinue=false, $iwprefix=null, $iwtitle=null, $iwdir=null)
 getLangLinks (array $titles, $lllimit=null, $llcontinue=false, $llurl=null, $lllang=null, $lltitle=null, $lldir=null)
 getExtLinks (array $titles, $ellimit=null, $eloffset=null, $elprotocol=null, $elquery=null)
 enumerateLinks ($alcontinue=false, $alfrom=null, $alto=null, $alprefix=null, $alunique=null, array $alprop=null, $alnamespace=null, $allimit=null)
- Fonctions membres publiques inherited from JMediawikiObject
 __construct (JRegistry $options=null, JMediawikiHttp $client=null)
 buildParameter (array $params)
 validateResponse ($response)

Additional Inherited Members

- Fonctions membres protégées inherited from JMediawikiObject
 fetchUrl ($path)
- Attributs protégés inherited from JMediawikiObject
 $options
 $client

Description détaillée

Définition à la ligne 19 du fichier links.php.


Documentation des fonctions membres

JMediawikiLinks::enumerateLinks (   $alcontinue = false,
  $alfrom = null,
  $alto = null,
  $alprefix = null,
  $alunique = null,
array  $alprop = null,
  $alnamespace = null,
  $allimit = null 
)

Method to enumerate all links that point to a given namespace.

Paramètres:
boolean$alcontinueWhen more results are available, use this to continue.
string$alfromStart listing at this title. The title need not exist.
string$altoThe page title to stop enumerating at.
string$alprefixSearch for all page titles that begin with this value.
string$aluniqueOnly show unique links.
array$alpropWhat pieces of information to include.
string$alnamespaceThe namespace to enumerate.
integer$allimitNumber of links to return.
Renvoie:
object
Depuis:
12.3

Définition à la ligne 279 du fichier links.php.

{
// Build the request.
$path = '?action=query&meta=siteinfo';
if ($alcontinue)
{
$path .= '&alcontinue=';
}
if (isset($alfrom))
{
$path .= '&alfrom=' . $alfrom;
}
if (isset($alto))
{
$path .= '&alto=' . $alto;
}
if (isset($alprefix))
{
$path .= '&alprefix=' . $alprefix;
}
if (isset($alunique))
{
$path .= '&alunique=' . $alunique;
}
if (isset($alprop))
{
$path .= '&alprop=' . $this->buildParameter($alprop);
}
if (isset($alnamespace))
{
$path .= '&alnamespace=' . $alnamespace;
}
if (isset($allimit))
{
$path .= '&allimit=' . $allimit;
}
// Send the request.
$response = $this->client->get($this->fetchUrl($path));
return $this->validateResponse($response);
}
JMediawikiLinks::getExtLinks ( array  $titles,
  $ellimit = null,
  $eloffset = null,
  $elprotocol = null,
  $elquery = null 
)

Method to return all external urls from the given page(s).

Paramètres:
array$titlesPage titles to retrieve links.
integer$ellimitNumber of links to return.
string$eloffsetWhen more results are available, use this to continue.
string$elprotocolProtocol of the url.
string$elquerySearch string without protocol.
Renvoie:
object
Depuis:
12.3

Définition à la ligne 229 du fichier links.php.

{
// Build the request.
$path = '?action=query&prop=extlinks';
// Append titles to the request.
$path .= '&titles=' . $this->buildParameter($titles);
if (isset($ellimit))
{
$path .= '&ellimit=' . $ellimit;
}
if (isset($eloffset))
{
$path .= '&eloffset=' . $eloffset;
}
if (isset($elprotocol))
{
$path .= '&elprotocol=' . $elprotocol;
}
if (isset($elquery))
{
$path .= '&elquery=' . $elquery;
}
// Send the request.
$response = $this->client->get($this->fetchUrl($path));
return $this->validateResponse($response);
}
JMediawikiLinks::getIWLinks ( array  $titles,
  $iwurl = false,
  $iwlimit = null,
  $iwcontinue = false,
  $iwprefix = null,
  $iwtitle = null,
  $iwdir = null 
)

Method to return all interwiki links from the given page(s).

Paramètres:
array$titlesPage titles to retrieve links.
boolean$iwurlWhether to get the full url.
integer$iwlimitNumber of interwiki links to return.
boolean$iwcontinueWhen more results are available, use this to continue.
string$iwprefixPrefix for the interwiki.
string$iwtitleInterwiki link to search for.
string$iwdirThe direction in which to list.
Renvoie:
object
Depuis:
12.3

Définition à la ligne 113 du fichier links.php.

{
// Build the request.
$path = '?action=query&prop=links';
// Append titles to the request.
$path .= '&titles=' . $this->buildParameter($titles);
if ($iwurl)
{
$path .= '&iwurl=';
}
if (isset($iwlimit))
{
$path .= '&iwlimit=' . $iwlimit;
}
if ($iwcontinue)
{
$path .= '&iwcontinue=';
}
if (isset($iwprefix))
{
$path .= '&iwprefix=' . $iwprefix;
}
if (isset($iwtitle))
{
$path .= '&iwtitle=' . $iwtitle;
}
if (isset($iwdir))
{
$path .= '&iwdir=' . $iwdir;
}
// Send the request.
$response = $this->client->get($this->fetchUrl($path));
return $this->validateResponse($response);
}
JMediawikiLinks::getLangLinks ( array  $titles,
  $lllimit = null,
  $llcontinue = false,
  $llurl = null,
  $lllang = null,
  $lltitle = null,
  $lldir = null 
)

Method to return all interlanguage links from the given page(s).

Paramètres:
array$titlesPage titles to retrieve links.
integer$lllimitNumber of langauge links to return.
boolean$llcontinueWhen more results are available, use this to continue.
string$llurlWhether to get the full URL.
string$lllangLanguage code.
string$lltitleLink to search for.
string$lldirThe direction in which to list.
Renvoie:
object
Depuis:
12.3

Définition à la ligne 172 du fichier links.php.

{
// Build the request.
$path = '?action=query&prop=langlinks';
// Append titles to the request.
$path .= '&titles=' . $this->buildParameter($titles);
if (isset($lllimit))
{
$path .= '&lllimit=' . $lllimit;
}
if ($llcontinue)
{
$path .= '&llcontinue=';
}
if (isset($llurl))
{
$path .= '&llurl=' . $llurl;
}
if (isset($lllang))
{
$path .= '&lllang=' . $lllang;
}
if (isset($lltitle))
{
$path .= '&lltitle=' . $lltitle;
}
if (isset($lldir))
{
$path .= '&lldir=' . $lldir;
}
// Send the request.
$response = $this->client->get($this->fetchUrl($path));
return $this->validateResponse($response);
}
JMediawikiLinks::getLinks ( array  $titles,
array  $plnamespace = null,
  $pllimit = null,
  $plcontinue = null,
array  $pltitles = null,
  $pldir = null 
)

Method to return all links from the given page(s).

Paramètres:
array$titlesPage titles to retrieve links.
array$plnamespaceNamespaces to get links.
string$pllimitNumber of links to return.
string$plcontinueContinue when more results are available.
array$pltitlesList links to these titles.
string$pldirDirection of listing.
Renvoie:
object
Depuis:
12.3

Définition à la ligne 36 du fichier links.php.

{
// Build the request.
$path = '?action=query&prop=links';
// Append titles to the request.
$path .= '&titles=' . $this->buildParameter($titles);
if (isset($plnamespace))
{
$path .= '&plnamespace=' . $this->buildParameter($plnamespace);
}
if (isset($pllimit))
{
$path .= '&pllimit=' . $pllimit;
}
if (isset($plcontinue))
{
$path .= '&plcontinue=' . $plcontinue;
}
if (isset($pltitles))
{
$path .= '&pltitles=' . $this->buildParameter($pltitles);
}
if (isset($pldir))
{
$path .= '&pldir=' . $pldir;
}
// Send the request.
$response = $this->client->get($this->fetchUrl($path));
return $this->validateResponse($response);
}
JMediawikiLinks::getLinksUsed ( array  $titles)

Method to return info about the link pages.

Paramètres:
array$titlesPage titles to retrieve links.
Renvoie:
object
Depuis:
12.3

Définition à la ligne 84 du fichier links.php.

{
// Build the request.
$path = '?action=query&generator=links&prop=info';
// Append titles to the request.
$path .= '&titles=' . $this->buildParameter($titles);
// Send the request.
$response = $this->client->get($this->fetchUrl($path));
return $this->validateResponse($response);
}

La documentation de cette classe a été générée à partir du fichier suivant :