MediaWiki  master
TitleFactory Class Reference

Creates Title objects. More...

Public Member Functions

 castFromLinkTarget (?LinkTarget $linkTarget)
 
 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 33 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 59 of file TitleFactory.php.

References Title\castFromLinkTarget().

◆ 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 130 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 142 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 40 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 100 of file TitleFactory.php.

References Title\newFromID().

◆ newFromIDs()

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

Definition at line 109 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 50 of file TitleFactory.php.

References Title\newFromLinkTarget().

◆ newFromRow()

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

Definition at line 118 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 70 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 81 of file TitleFactory.php.

References Title\newFromTextThrow().

◆ newFromURL()

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

Definition at line 90 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 151 of file TitleFactory.php.

References Title\newMainPage().


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