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