getNamespace() instead */ public function getNs(): int { return $this->getLinkTarget()->getNamespace(); } /** * The page's ID, if any * @return int 0 if the page doesn't (yet?) exist */ abstract public function getPageId(): int; /** * The page's language code. * * @return Bcp47Code a BCP-47 language code */ abstract public function getPageLanguageBcp47(): Bcp47Code; /** * The page's language direction * @return string 'ltr' or 'rtl' */ abstract public function getPageLanguageDir(): string; /** * The revision's ID, if any * @return int|null */ abstract public function getRevisionId(): ?int; /** * The revision's parent ID, if any * @return int|null */ abstract public function getParentRevisionId(): ?int; /** * The revision's timestamp, if any * @return string|null "YYYYMMDDHHIISS" format */ abstract public function getRevisionTimestamp(): ?string; /** * The revision's author's user name, if any * @return string|null */ abstract public function getRevisionUser(): ?string; /** * The revision's author's user ID, if any * @return int|null 0 if the user is not registered */ abstract public function getRevisionUserId(): ?int; /** * The revision's SHA1 checksum, if any * @return string|null Hex encoded */ abstract public function getRevisionSha1(): ?string; /** * The revision's length, if known * @return int|null Bytes */ abstract public function getRevisionSize(): ?int; /** * The revision's content * @return PageContent|null */ abstract public function getRevisionContent(): ?PageContent; /** * Get the page's language variant * @return ?Bcp47Code a BCP-47 language code */ public function getVariantBcp47(): ?Bcp47Code { return $this->htmlVariant; # stored as BCP-47 } /** * Set the page's language variant. (Records the fact that * conversion has been done in the parser pipeline.) * @param Bcp47Code $htmlVariant a BCP-47 language code */ public function setVariantBcp47( Bcp47Code $htmlVariant ): void { $this->htmlVariant = $htmlVariant; # stored as BCP-47 } /** * FIXME: Once we remove the hardcoded slot name here, * the name of this method could be updated, if necessary. * * Shortcut method to get page source * @deprecated Use $this->topFrame->getSrcText() * @return string */ public function getPageMainContent(): string { return $this->getRevisionContent()->getContent( 'main' ); } }