MediaWiki  master
TitleFactory Class Reference

Creates Title objects. More...

Public Member Functions

 castFromLinkTarget (?LinkTarget $linkTarget)
 
 castFromPageIdentity (?PageIdentity $pageIdentity)
 
 castFromPageReference (?PageReference $pageReference)
 
 makeTitle ( $ns, $title, $fragment='', $interwiki='')
 
 makeTitleSafe ( $ns, $title, $fragment='', $interwiki='')
 
 newFromDBkey ( $key)
 
 newFromID ( $id, $flags=0)
 
 newFromIDs ( $ids)
 
 newFromLinkTarget (LinkTarget $linkTarget, $forceClone='')
 
 newFromRow ( $row)
 
 newFromText ( $text, $defaultNamespace=NS_MAIN)
 
 newFromTextThrow ( $text, $defaultNamespace=NS_MAIN)
 
 newFromURL ( $url)
 
 newMainPage (MessageLocalizer $localizer=null)
 

Detailed Description

Creates Title objects.

For now, there is nothing interesting in this class. It is meant for preventing static Title methods causing problems in unit tests.

Since
1.35

Definition at line 35 of file TitleFactory.php.

Member Function Documentation

◆ castFromLinkTarget()

TitleFactory::castFromLinkTarget ( ?LinkTarget  $linkTarget)
See also
Title::castFromLinkTarget
Parameters
LinkTarget | null$linkTarget
Returns
Title|null

Definition at line 61 of file TitleFactory.php.

References Title\castFromLinkTarget().

◆ castFromPageIdentity()

TitleFactory::castFromPageIdentity ( ?PageIdentity  $pageIdentity)
See also
Title::castFromPageIdentity
Since
1.36
Parameters
PageIdentity | null$pageIdentity
Returns
Title|null

Definition at line 71 of file TitleFactory.php.

References Title\castFromPageIdentity().

◆ castFromPageReference()

TitleFactory::castFromPageReference ( ?PageReference  $pageReference)
See also
Title::castFromPageReference
Since
1.37
Parameters
PageReference | null$pageReference
Returns
Title|null

Definition at line 81 of file TitleFactory.php.

References Title\castFromPageReference().

◆ makeTitle()

TitleFactory::makeTitle (   $ns,
  $title,
  $fragment = '',
  $interwiki = '' 
)
See also
Title::makeTitle
Parameters
int$ns
string$title
string$fragment
string$interwiki
Returns
Title

Definition at line 152 of file TitleFactory.php.

References $title, and Title\makeTitle().

◆ makeTitleSafe()

TitleFactory::makeTitleSafe (   $ns,
  $title,
  $fragment = '',
  $interwiki = '' 
)
See also
Title::makeTitleSafe
Parameters
int$ns
string$title
string$fragment
string$interwiki
Returns
Title|null

Definition at line 164 of file TitleFactory.php.

References $title, and Title\makeTitleSafe().

◆ newFromDBkey()

TitleFactory::newFromDBkey (   $key)
See also
Title::newFromDBkey
Parameters
string$key
Returns
Title|null

Definition at line 42 of file TitleFactory.php.

References Title\newFromDBkey().

◆ newFromID()

TitleFactory::newFromID (   $id,
  $flags = 0 
)
See also
Title::newFromID
Parameters
int$id
int$flags
Returns
Title|null

Definition at line 122 of file TitleFactory.php.

References Title\newFromID().

◆ newFromIDs()

TitleFactory::newFromIDs (   $ids)
See also
Title::newFromIDs
Parameters
int[]$ids
Returns
Title[]

Definition at line 131 of file TitleFactory.php.

References Title\newFromIDs().

◆ newFromLinkTarget()

TitleFactory::newFromLinkTarget ( LinkTarget  $linkTarget,
  $forceClone = '' 
)
See also
Title::newFromLinkTarget
Parameters
LinkTarget$linkTarget
string$forceClone
Returns
Title

Definition at line 52 of file TitleFactory.php.

References Title\newFromLinkTarget().

◆ newFromRow()

TitleFactory::newFromRow (   $row)
See also
Title::newFromRow
Parameters
stdClass$row
Returns
Title

Definition at line 140 of file TitleFactory.php.

References Title\newFromRow().

◆ newFromText()

TitleFactory::newFromText (   $text,
  $defaultNamespace = NS_MAIN 
)
See also
Title::newFromText
Parameters
string | int | null$text
int$defaultNamespace
Exceptions
InvalidArgumentException
Returns
Title|null

Definition at line 92 of file TitleFactory.php.

References Title\newFromText().

◆ newFromTextThrow()

TitleFactory::newFromTextThrow (   $text,
  $defaultNamespace = NS_MAIN 
)
See also
Title::newFromTextThrow
Parameters
string$text
int$defaultNamespace
Exceptions
MalformedTitleException
Returns
Title

Definition at line 103 of file TitleFactory.php.

References Title\newFromTextThrow().

◆ newFromURL()

TitleFactory::newFromURL (   $url)
See also
Title::newFromURL
Parameters
string$url
Returns
Title|null

Definition at line 112 of file TitleFactory.php.

References Title\newFromURL().

◆ newMainPage()

TitleFactory::newMainPage ( MessageLocalizer  $localizer = null)
See also
Title::newMainPage
Parameters
MessageLocalizer | null$localizer
Returns
Title

Definition at line 173 of file TitleFactory.php.

References Title\newMainPage().


The documentation for this class was generated from the following file: