MediaWiki  master
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. More...
 
 getBlockId ()
 Get the ID of the block. More...
 
 getHash ()
 Create a unique hash of the block restriction based on the type and value. More...
 
 getValue ()
 Get the value of the restriction. More...
 
 matches (Title $title)
 Determine if a restriction matches a given title. More...
 
 setBlockId ( $blockId)
 Set the ID of the block. More...
 
 toRow ()
 Convert a restriction object into a row array for insertion. More...
 

Static Public Member Functions

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

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\PageRestriction, MediaWiki\Block\Restriction\NamespaceRestriction, and MediaWiki\Block\Restriction\ActionRestriction.

◆ 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\PageRestriction, and MediaWiki\Block\Restriction\AbstractRestriction.

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