MediaWiki master
DumpFilter.php
Go to the documentation of this file.
1<?php
37 public $sink;
38
43
47 public function __construct( &$sink ) {
48 $this->sink =& $sink;
49 }
50
54 public function writeOpenStream( $string ) {
55 $this->sink->writeOpenStream( $string );
56 }
57
61 public function writeCloseStream( $string ) {
62 $this->sink->writeCloseStream( $string );
63 }
64
69 public function writeOpenPage( $page, $string ) {
70 $this->sendingThisPage = $this->pass( $page );
71 if ( $this->sendingThisPage ) {
72 $this->sink->writeOpenPage( $page, $string );
73 }
74 }
75
79 public function writeClosePage( $string ) {
80 if ( $this->sendingThisPage ) {
81 $this->sink->writeClosePage( $string );
82 $this->sendingThisPage = false;
83 }
84 }
85
90 public function writeRevision( $rev, $string ) {
91 if ( $this->sendingThisPage ) {
92 $this->sink->writeRevision( $rev, $string );
93 }
94 }
95
100 public function writeLogItem( $rev, $string ) {
101 $this->sink->writeRevision( $rev, $string );
102 }
103
108 public function closeRenameAndReopen( $newname ) {
109 $this->sink->closeRenameAndReopen( $newname );
110 }
111
117 public function closeAndRename( $newname, $open = false ) {
118 $this->sink->closeAndRename( $newname, $open );
119 }
120
124 public function getFilenames() {
125 return $this->sink->getFilenames() ?? [];
126 }
127
133 protected function pass( $page ) {
134 return true;
135 }
136}
writeCloseStream( $string)
writeLogItem( $rev, $string)
bool $sendingThisPage
__construct(&$sink)
closeAndRename( $newname, $open=false)
writeOpenPage( $page, $string)
DumpOutput $sink
FIXME will need to be made protected whenever legacy code is updated.
writeRevision( $rev, $string)
closeRenameAndReopen( $newname)
pass( $page)
Override for page-based filter types.
writeClosePage( $string)
writeOpenStream( $string)