|
| __construct ( $type=self::TYPE_UNKNOWN) |
|
| __serialize () |
|
| __unserialize ( $fields) |
|
| addInterwikiId ( $identifier) |
| Adds an interwiki id to the site. More...
|
|
| addLocalId ( $type, $identifier) |
| Adds a local identifier. More...
|
|
| addNavigationId ( $identifier) |
| Adds a navigation id to the site. More...
|
|
| getAllPaths () |
| Returns the paths as associative array. More...
|
|
| getDomain () |
| Returns the domain of the site, ie en.wikipedia.org Or null if it's not known. More...
|
|
| getExtraConfig () |
| Returns the type specific config. More...
|
|
| getExtraData () |
| Returns the type specific fields. More...
|
|
| getGlobalId () |
| Returns the global site identifier (ie enwiktionary). More...
|
|
| getGroup () |
| Gets the group of the site (ie wikipedia). More...
|
|
| getInternalId () |
| Returns the set internal identifier for the site. More...
|
|
| getInterwikiIds () |
| Returns the interwiki link identifiers that can be used for this site. More...
|
|
| getLanguageCode () |
| Returns language code of the sites primary language. More...
|
|
| getLinkPath () |
| Returns the path used to construct links with or false if there is no such path. More...
|
|
| getLinkPathType () |
| Returns the main path type, that is the type of the path that should generally be used to construct links to the target site. More...
|
|
| getLocalIds () |
| Returns all local ids. More...
|
|
| getNavigationIds () |
| Returns the equivalent link identifiers that can be used to make the site show up in interfaces such as the "language links" section. More...
|
|
| getPageUrl ( $pageName=false) |
| Get the full URL for the given page on the site. More...
|
|
| getPath ( $pathType) |
| Returns the path of the provided type or null if there is no such path. More...
|
|
| getProtocol () |
| Returns the protocol of the site. More...
|
|
| getSource () |
| Returns the source of the site data (ie 'local', 'wikidata', 'my-magical-repo'). More...
|
|
| getType () |
| Returns the type of the site (ie mediawiki). More...
|
|
| normalizePageName ( $pageName, $followRedirect=MediaWikiPageNameNormalizer::FOLLOW_REDIRECT) |
| Attempt to normalize the page name in some fashion. More...
|
|
| removePath ( $pathType) |
| Removes the path of the provided type if it's set. More...
|
|
| setExtraConfig (array $extraConfig) |
| Sets the type specific config. More...
|
|
| setExtraData (array $extraData) |
| Sets the type specific fields. More...
|
|
| setForward (bool $shouldForward) |
| Sets if site.tld/path/key:pageTitle should forward users to the page on the actual site, where "key" is the local identifier. More...
|
|
| setGlobalId (?string $globalId) |
| Sets the global site identifier (ie enwiktionary). More...
|
|
| setGroup (string $group) |
| Sets the group of the site (ie wikipedia). More...
|
|
| setInternalId ( $internalId=null) |
| Sets the internal identifier for the site. More...
|
|
| setLanguageCode ( $languageCode) |
| Sets language code of the sites primary language. More...
|
|
| setLinkPath ( $fullUrl) |
| Set the path used to construct links with. More...
|
|
| setPath ( $pathType, string $fullUrl) |
| Set the path used to construct links with. More...
|
|
| setSource (string $source) |
| Sets the source of the site data (ie 'local', 'wikidata', 'my-magical-repo'). More...
|
|
| shouldForward () |
| Gets if site.tld/path/key:pageTitle should forward users to the page on the actual site, where "key" is the local identifier. More...
|
|
Represents a single site.
- Since
- 1.21
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Definition at line 32 of file Site.php.
Site::getLinkPathType |
( |
| ) |
|
Returns the main path type, that is the type of the path that should generally be used to construct links to the target site.
This default implementation returns Site::PATH_LINK as the default path type. Subclasses can override this to define a different default path type, or return false to disable site links.
- Since
- 1.21
- Returns
- string|null
Reimplemented in MediaWikiSite.
Definition at line 328 of file Site.php.
Site::getPageUrl |
( |
|
$pageName = false | ) |
|
Get the full URL for the given page on the site.
Returns null if the needed information is not known.
This generated URL is usually based upon the path returned by getLinkPath(), but this is not a requirement.
This implementation returns a URL constructed using the path returned by getLinkPath().
- Since
- 1.21
- Parameters
-
- Returns
- string|null
Reimplemented in MediaWikiSite.
Definition at line 346 of file Site.php.