MediaWiki  master
Restriction.php
Go to the documentation of this file.
1 <?php
24 
26 
27 interface Restriction {
28 
35  public function getBlockId();
36 
44  public function setBlockId( $blockId );
45 
52  public function getValue();
53 
60  public static function getType();
61 
68  public static function getTypeId();
69 
77  public static function newFromRow( \stdClass $row );
78 
85  public function toRow();
86 
94  public function matches( Title $title );
95 
103  public function equals( Restriction $other );
104 
111  public function getHash();
112 
113 }
Represents a title within MediaWiki.
Definition: Title.php:76
setBlockId( $blockId)
Set the ID of the block.
getValue()
Get the value of the restriction.
static getType()
Get the type of restriction.
getHash()
Create a unique hash of the block restriction based on the type and value.
toRow()
Convert a restriction object into a row array for insertion.
equals(Restriction $other)
Determine if a restriction equals another restriction.
matches(Title $title)
Determine if a restriction matches a given title.
static newFromRow(\stdClass $row)
Create a new Restriction from a database row.
getBlockId()
Get the ID of the block.
static getTypeId()
Get the ID of the type of restriction.