MediaWiki master
MediaWiki\Block\Restriction\Restriction Interface Reference

Inherited by MediaWiki\Block\Restriction\AbstractRestriction.

Public Member Functions

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

Static Public Member Functions

static getType ()
 Get the type of restriction.
 
static getTypeId ()
 Get the ID of the type of restriction.
 
static newFromRow (\stdClass $row)
 Create a new Restriction from a database row.
 

Detailed Description

Definition at line 27 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 ( )

Get 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

Get the type of restriction.

Since
1.33
Returns
string

Implemented in MediaWiki\Block\Restriction\AbstractRestriction.

◆ getTypeId()

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

Get 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 ( )

Get 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

Create 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)

Set 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: