Inserted getter for the XMLReader and change the visibility of some
authorAlexander Lehmann <alexander.lehmann@student.hpi.uni-potsdam.de>
Tue, 13 May 2014 12:22:27 +0000 (14:22 +0200)
committerAlexander Lehmann <alexander.lehmann@student.hpi.uni-potsdam.de>
Thu, 15 May 2014 12:17:36 +0000 (14:17 +0200)
functions for use in hooks.
Bug 64657

Change-Id: Ie40c0721ec32935294756d60ea6686ebeefa61af

includes/Import.php

index f6e9032..8cbba76 100644 (file)
@@ -60,22 +60,30 @@ class WikiImporter {
                $this->setPageOutCallback( array( $this, 'finishImportPage' ) );
        }
 
-       private function throwXmlError( $err ) {
+       /**
+        * @return null|\XMLReader
+        */
+       public function getReader()
+       {
+               return $this->reader;
+       }
+
+       public function throwXmlError( $err ) {
                $this->debug( "FAILURE: $err" );
                wfDebug( "WikiImporter XML error: $err\n" );
        }
 
-       private function debug( $data ) {
+       public function debug( $data ) {
                if ( $this->mDebug ) {
                        wfDebug( "IMPORT: $data\n" );
                }
        }
 
-       private function warn( $data ) {
+       public function warn( $data ) {
                wfDebug( "IMPORT: $data\n" );
        }
 
-       private function notice( $msg /*, $param, ...*/ ) {
+       public function notice( $msg /*, $param, ...*/ ) {
                $params = func_get_args();
                array_shift( $params );
 
@@ -387,7 +395,7 @@ class WikiImporter {
         * @return string
         * @access private
         */
-       private function nodeContents() {
+       public function nodeContents() {
                if ( $this->reader->isEmptyElement ) {
                        return "";
                }