MediaWiki
REL1_41
DiffOp.php
Go to the documentation of this file.
1
<?php
28
namespace
Wikimedia\Diff
;
29
38
abstract
class
DiffOp
{
39
44
public
$type
;
45
50
public
$orig
;
51
56
public
$closing
;
57
61
public
function
getType
() {
62
return
$this->type
;
63
}
64
71
public
function
getOrig
() {
72
return
$this->orig
;
73
}
74
84
public
function
getClosing
( $i =
null
) {
85
if
( $i ===
null
) {
86
return
$this->closing
;
87
}
88
if
( array_key_exists( $i, $this->closing ) ) {
89
return
$this->closing[$i];
90
}
91
return
null
;
92
}
93
97
abstract
public
function
reverse
();
98
102
public
function
norig
() {
103
return
$this->orig ? count( $this->orig ) : 0;
104
}
105
109
public
function
nclosing
() {
110
return
$this->closing ? count( $this->closing ) : 0;
111
}
112
}
113
115
class_alias( DiffOp::class,
'DiffOp'
);
Wikimedia\Diff\DiffOp
The base class for all other DiffOp classes.
Definition
DiffOp.php:38
Wikimedia\Diff\DiffOp\getClosing
getClosing( $i=null)
Without a line number this returns either all lines on the right ("new") side of the diff,...
Definition
DiffOp.php:84
Wikimedia\Diff\DiffOp\nclosing
nclosing()
Definition
DiffOp.php:109
Wikimedia\Diff\DiffOp\getOrig
getOrig()
Returns either all lines on the left ("old") side of the diff, or false when it's an add operation.
Definition
DiffOp.php:71
Wikimedia\Diff\DiffOp\norig
norig()
Definition
DiffOp.php:102
Wikimedia\Diff\DiffOp\$type
string $type
Definition
DiffOp.php:44
Wikimedia\Diff\DiffOp\getType
getType()
Definition
DiffOp.php:61
Wikimedia\Diff\DiffOp\reverse
reverse()
Wikimedia\Diff\DiffOp\$closing
string[] false $closing
The right ("new") side of the diff, or false when it's a "delete".
Definition
DiffOp.php:56
Wikimedia\Diff\DiffOp\$orig
string[] false $orig
The left ("old") side of the diff, or false when it's an "add".
Definition
DiffOp.php:50
Wikimedia\Diff
Definition
ArrayDiffFormatter.php:27
includes
libs
Diff
DiffOp.php
Generated on Wed Nov 27 2024 07:23:44 for MediaWiki by
1.10.0