MediaWiki  master
DiffOpCopy.php
Go to the documentation of this file.
1 <?php
2 
35 class DiffOpCopy extends DiffOp {
36  public $type = 'copy';
37 
38  public function __construct( $orig, $closing = false ) {
39  if ( !is_array( $closing ) ) {
40  $closing = $orig;
41  }
42  $this->orig = $orig;
43  $this->closing = $closing;
44  }
45 
49  public function reverse() {
50  return new DiffOpCopy( $this->closing, $this->orig );
51  }
52 }
DiffOp
The base class for all other DiffOp classes.
Definition: DiffOp.php:37
DiffOpCopy\$type
$type
Definition: DiffOpCopy.php:36
DiffOpCopy
Extends DiffOp.
Definition: DiffOpCopy.php:35
DiffOp\$closing
string[] false $closing
Definition: DiffOp.php:52
DiffOpCopy\reverse
reverse()
Definition: DiffOpCopy.php:49
DiffOp\$orig
string[] false $orig
Definition: DiffOp.php:47
DiffOpCopy\__construct
__construct( $orig, $closing=false)
Definition: DiffOpCopy.php:38