MediaWiki  master
DiffOp.php
Go to the documentation of this file.
1 <?php
37 abstract class DiffOp {
38 
42  public $type;
43 
47  public $orig;
48 
52  public $closing;
53 
57  public function getType() {
58  return $this->type;
59  }
60 
64  public function getOrig() {
65  return $this->orig;
66  }
67 
72  public function getClosing( $i = null ) {
73  if ( $i === null ) {
74  return $this->closing;
75  }
76  if ( array_key_exists( $i, $this->closing ) ) {
77  return $this->closing[$i];
78  }
79  return null;
80  }
81 
82  abstract public function reverse();
83 
87  public function norig() {
88  return $this->orig ? count( $this->orig ) : 0;
89  }
90 
94  public function nclosing() {
95  return $this->closing ? count( $this->closing ) : 0;
96  }
97 }
DiffOp
The base class for all other DiffOp classes.
Definition: DiffOp.php:37
DiffOp\getOrig
getOrig()
Definition: DiffOp.php:64
DiffOp\reverse
reverse()
DiffOp\$closing
string[] false $closing
Definition: DiffOp.php:52
DiffOp\$type
string $type
Definition: DiffOp.php:42
DiffOp\nclosing
nclosing()
Definition: DiffOp.php:94
DiffOp\getType
getType()
Definition: DiffOp.php:57
DiffOp\getClosing
getClosing( $i=null)
Definition: DiffOp.php:72
DiffOp\norig
norig()
Definition: DiffOp.php:87
DiffOp\$orig
string[] false $orig
Definition: DiffOp.php:47