MediaWiki fundraising/REL1_35
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.

◆ 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.

◆ 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.

◆ newFromDBkey()

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

Definition at line 40 of file TitleFactory.php.

References newFromDBkey().

Referenced by 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.

◆ newFromIDs()

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

Definition at line 109 of file TitleFactory.php.

◆ 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.

◆ newFromRow()

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

Definition at line 118 of file TitleFactory.php.

◆ 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.

◆ 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.

◆ newFromURL()

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

Definition at line 90 of file TitleFactory.php.

◆ newMainPage()

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

Definition at line 151 of file TitleFactory.php.


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