MediaWiki REL1_40
MediaWiki\Title\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 39 of file TitleFactory.php.

Member Function Documentation

◆ castFromLinkTarget()

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

Definition at line 65 of file TitleFactory.php.

Referenced by MediaWiki\Linker\Linker\getUploadUrl(), MediaWiki\Linker\Linker\makeBrokenImageLinkObj(), and MediaWiki\Linker\Linker\makeMediaLinkFile().

◆ castFromPageIdentity()

◆ castFromPageReference()

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

Definition at line 85 of file TitleFactory.php.

Referenced by MediaWiki\Parser\ParserObserver\notifyParse().

◆ makeTitle()

◆ makeTitleSafe()

MediaWiki\Title\TitleFactory::makeTitleSafe ( $ns,
$title,
$fragment = '',
$interwiki = '' )

◆ newFromDBkey()

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

Definition at line 46 of file TitleFactory.php.

◆ newFromID()

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

Definition at line 126 of file TitleFactory.php.

Referenced by MediaWiki\Block\Restriction\PageRestriction\getTitle().

◆ newFromIDs()

MediaWiki\Title\TitleFactory::newFromIDs ( $ids)
Deprecated
since 1.38 use a PageStore QueryBuilder instead
See also
Title::newFromIDs
Parameters
int[]$ids
Returns
Title[]

Definition at line 136 of file TitleFactory.php.

◆ newFromLinkTarget()

MediaWiki\Title\TitleFactory::newFromLinkTarget ( LinkTarget $linkTarget,
$forceClone = '' )

◆ newFromRow()

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

Definition at line 146 of file TitleFactory.php.

Referenced by MediaWiki\Block\Restriction\PageRestriction\newFromRow().

◆ newFromText()

MediaWiki\Title\TitleFactory::newFromText ( $text,
$defaultNamespace = NS_MAIN )

◆ newFromTextThrow()

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

Definition at line 107 of file TitleFactory.php.

◆ newFromURL()

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

Definition at line 116 of file TitleFactory.php.

◆ newMainPage()


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