MediaWiki REL1_39
MediaWiki\Block\Restriction\Restriction Interface Reference
Inheritance diagram for MediaWiki\Block\Restriction\Restriction:

Public Member Functions

 equals (Restriction $other)
 Determine if a restriction equals another restriction.
 
 getBlockId ()
 Gets the id of the block.
 
 getHash ()
 Create a unique hash of the block restriction based on the type and value.
 
 getValue ()
 Gets the value of the restriction.
 
 matches (\Title $title)
 Determine if a restriction matches a given title.
 
 setBlockId ( $blockId)
 Sets the id of the block.
 
 toRow ()
 Convert a restriction object into a row array for insertion.
 

Static Public Member Functions

static getType ()
 Gets the type of restriction.
 
static getTypeId ()
 Gets the id of the type of restriction.
 
static newFromRow (\stdClass $row)
 Creates a new Restriction from a database row.
 

Detailed Description

Definition at line 25 of file Restriction.php.

Member Function Documentation

◆ equals()

MediaWiki\Block\Restriction\Restriction::equals ( Restriction $other)

Determine if a restriction equals another restriction.

Since
1.33
Parameters
Restriction$other
Returns
bool

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ getBlockId()

MediaWiki\Block\Restriction\Restriction::getBlockId ( )

Gets the id of the block.

Since
1.33
Returns
int

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ getHash()

MediaWiki\Block\Restriction\Restriction::getHash ( )

Create a unique hash of the block restriction based on the type and value.

Since
1.33
Returns
string

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

Referenced by MediaWiki\Block\Restriction\AbstractRestriction\equals().

◆ getType()

static MediaWiki\Block\Restriction\Restriction::getType ( )
static

Gets the type of restriction.

Since
1.33
Returns
string

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ getTypeId()

static MediaWiki\Block\Restriction\Restriction::getTypeId ( )
static

Gets the id of the type of restriction.

This id is used in the database.

Since
1.33
Returns
int

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ getValue()

MediaWiki\Block\Restriction\Restriction::getValue ( )

Gets the value of the restriction.

Since
1.33
Returns
int

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ matches()

MediaWiki\Block\Restriction\Restriction::matches ( \Title $title)

Determine if a restriction matches a given title.

Since
1.33
Parameters
\\Title$title
Returns
bool

Implemented in MediaWiki\Block\Restriction\ActionRestriction, MediaWiki\Block\Restriction\NamespaceRestriction, and MediaWiki\Block\Restriction\PageRestriction.

◆ newFromRow()

static MediaWiki\Block\Restriction\Restriction::newFromRow ( \stdClass $row)
static

Creates a new Restriction from a database row.

Since
1.33
Parameters
\\stdClass$row
Returns
static

Implemented in MediaWiki\Block\Restriction\AbstractRestriction, and MediaWiki\Block\Restriction\PageRestriction.

◆ setBlockId()

MediaWiki\Block\Restriction\Restriction::setBlockId ( $blockId)

Sets the id of the block.

Since
1.33
Parameters
int$blockId
Returns
self

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ toRow()

MediaWiki\Block\Restriction\Restriction::toRow ( )

Convert a restriction object into a row array for insertion.

Since
1.33
Returns
array

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.


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