MediaWiki REL1_34
DiffOp.php
Go to the documentation of this file.
1<?php
37abstract 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}
The base class for all other DiffOp classes.
Definition DiffOp.php:37
getOrig()
Definition DiffOp.php:64
string[] false $orig
Definition DiffOp.php:47
nclosing()
Definition DiffOp.php:94
getClosing( $i=null)
Definition DiffOp.php:72
string $type
Definition DiffOp.php:42
getType()
Definition DiffOp.php:57
string[] false $closing
Definition DiffOp.php:52
norig()
Definition DiffOp.php:87