MediaWiki REL1_37
MediaWiki\DAO Namespace Reference

Classes

interface  WikiAwareEntity
 Marker interface for entities aware of the wiki they belong to. More...
 

Functions

 assertWiki ( $wikiId)
 Throws if $wikiId is not the same as this entity wiki.
 
 assertWikiIdParam ( $wikiId)
 Asserts correct $wikiId parameter was passed.
 
 deprecateInvalidCrossWiki ( $wikiId, string $since)
 Emits a deprecation warning $since version if $wikiId is not the same as this wiki.
 
 wikiIdToString ( $wikiId)
 Convert $wikiId to a string for logging.
 

Variables

trait WikiAwareEntityTrait
 

Function Documentation

◆ assertWiki()

MediaWiki\DAO\assertWiki (   $wikiId)

Throws if $wikiId is not the same as this entity wiki.

Parameters
string | false$wikiIdThe wiki ID expected by the caller.
Exceptions
PreconditionException

Definition at line 54 of file WikiAwareEntityTrait.php.

References MediaWiki\DAO\wikiIdToString().

◆ assertWikiIdParam()

MediaWiki\DAO\assertWikiIdParam (   $wikiId)
protected

Asserts correct $wikiId parameter was passed.

Parameters
string | false$wikiId

Definition at line 88 of file WikiAwareEntityTrait.php.

◆ deprecateInvalidCrossWiki()

MediaWiki\DAO\deprecateInvalidCrossWiki (   $wikiId,
string  $since 
)
protected

Emits a deprecation warning $since version if $wikiId is not the same as this wiki.

Parameters
string | false$wikiId
string$since

Definition at line 70 of file WikiAwareEntityTrait.php.

References wfDeprecatedMsg(), and MediaWiki\DAO\wikiIdToString().

◆ wikiIdToString()

MediaWiki\DAO\wikiIdToString (   $wikiId)
private

Convert $wikiId to a string for logging.

Parameters
string | false$wikiId
Returns
string

Definition at line 99 of file WikiAwareEntityTrait.php.

Referenced by MediaWiki\DAO\assertWiki(), and MediaWiki\DAO\deprecateInvalidCrossWiki().

Variable Documentation

◆ WikiAwareEntityTrait

trait MediaWiki::DAO\WikiAwareEntityTrait
Initial value:
{
abstract public function getWikiId()

Definition at line 32 of file WikiAwareEntityTrait.php.