WikiImporter Class Reference
[SpecialPage]

implements Special:Import More...

List of all members.

Public Member Functions

 __construct ($source)
 throwXmlError ($err)
 handleXmlNamespace ($parser, $data, $prefix=false, $uri=false)
 stripXmlNamespace ($name)
 doImport ()
 debug ($data)
 notice ($data)
 setDebug ($debug)
 Set debug mode.
 setPageCallback ($callback)
 Sets the action to perform as each new page in the stream is reached.
 setPageOutCallback ($callback)
 Sets the action to perform as each page in the stream is completed.
 setRevisionCallback ($callback)
 Sets the action to perform as each page revision is reached.
 setUploadCallback ($callback)
 Sets the action to perform as each file upload version is reached.
 setLogItemCallback ($callback)
 Sets the action to perform as each log item reached.
 setTargetNamespace ($namespace)
 Set a target namespace to override the defaults.
 importRevision ($revision)
 Default per-revision callback, performs the import.
 importLogItem ($rev)
 Default per-revision callback, performs the import.
 importUpload ($revision)
 Dummy for now.
 debugRevisionHandler (&$revision)
 Alternate per-revision callback, for debugging.
 pageCallback ($title)
 Notify the callback function when a new <page> is reached.
 pageOutCallback ($title, $origTitle, $revisionCount, $successCount)
 Notify the callback function when a </page> is closed.
 donothing ($parser, $x, $y="")
 in_start ($parser, $name, $attribs)
 in_mediawiki ($parser, $name, $attribs)
 out_mediawiki ($parser, $name)
 in_siteinfo ($parser, $name, $attribs)
 out_siteinfo ($parser, $name)
 in_page ($parser, $name, $attribs)
 out_page ($parser, $name)
 in_nothing ($parser, $name, $attribs)
 char_append ($parser, $data)
 out_append ($parser, $name)
 in_revision ($parser, $name, $attribs)
 out_revision ($parser, $name)
 in_logitem ($parser, $name, $attribs)
 out_logitem ($parser, $name)
 in_upload ($parser, $name, $attribs)
 out_upload ($parser, $name)
 in_contributor ($parser, $name, $attribs)
 out_contributor ($parser, $name)

Public Attributes

 $mDebug = false
 $mSource = null
 $mPageCallback = null
 $mPageOutCallback = null
 $mRevisionCallback = null
 $mLogItemCallback = null
 $mUploadCallback = null
 $mTargetNamespace = null
 $mXmlNamespace = false
 $lastfield
 $tagStack = array()

Private Member Functions

 push ($name)
 pop ()
 parentTag ()


Detailed Description

implements Special:Import

Definition at line 377 of file Import.php.


Constructor & Destructor Documentation

WikiImporter::__construct ( source  ) 

Definition at line 390 of file Import.php.

References $source, setLogItemCallback(), setRevisionCallback(), and setUploadCallback().


Member Function Documentation

WikiImporter::char_append ( parser,
data 
)

Definition at line 754 of file Import.php.

References debug().

WikiImporter::debug ( data  ) 

WikiImporter::debugRevisionHandler ( &$  revision  ) 

Alternate per-revision callback, for debugging.

Parameters:
$revision WikiRevision
Access:
private

Definition at line 579 of file Import.php.

References $revision, and debug().

WikiImporter::doImport (  ) 

Definition at line 420 of file Import.php.

References $offset, wfDebug(), and wfMsgHtml().

WikiImporter::donothing ( parser,
x,
y = "" 
)

Definition at line 619 of file Import.php.

WikiImporter::handleXmlNamespace ( parser,
data,
prefix = false,
uri = false 
)

Definition at line 402 of file Import.php.

References $prefix.

WikiImporter::importLogItem ( rev  ) 

Default per-revision callback, performs the import.

Parameters:
$revision WikiRevision
Access:
private

Definition at line 560 of file Import.php.

References $dbw, and wfGetDB().

WikiImporter::importRevision ( revision  ) 

Default per-revision callback, performs the import.

Parameters:
$revision WikiRevision
Access:
private

Definition at line 550 of file Import.php.

References $dbw, $revision, and wfGetDB().

WikiImporter::importUpload ( revision  ) 

Dummy for now.

..

Definition at line 568 of file Import.php.

WikiImporter::in_contributor ( parser,
name,
attribs 
)

Definition at line 978 of file Import.php.

References $name, debug(), and stripXmlNamespace().

WikiImporter::in_logitem ( parser,
name,
attribs 
)

Definition at line 895 of file Import.php.

References $name, debug(), push(), and stripXmlNamespace().

WikiImporter::in_mediawiki ( parser,
name,
attribs 
)

Definition at line 632 of file Import.php.

References $name, debug(), push(), and stripXmlNamespace().

WikiImporter::in_nothing ( parser,
name,
attribs 
)

Definition at line 748 of file Import.php.

References $name, debug(), and stripXmlNamespace().

WikiImporter::in_page ( parser,
name,
attribs 
)

Definition at line 687 of file Import.php.

References $name, debug(), pageTitle(), push(), and stripXmlNamespace().

WikiImporter::in_revision ( parser,
name,
attribs 
)

Definition at line 855 of file Import.php.

References $name, debug(), push(), and stripXmlNamespace().

WikiImporter::in_siteinfo ( parser,
name,
attribs 
)

Definition at line 662 of file Import.php.

References $name, debug(), and stripXmlNamespace().

WikiImporter::in_start ( parser,
name,
attribs 
)

Definition at line 623 of file Import.php.

References $name, debug(), and stripXmlNamespace().

WikiImporter::in_upload ( parser,
name,
attribs 
)

Definition at line 937 of file Import.php.

References $name, debug(), push(), and stripXmlNamespace().

WikiImporter::notice ( data  ) 

Definition at line 454 of file Import.php.

References $wgCommandLineMode, $wgOut, and print.

Referenced by out_append().

WikiImporter::out_append ( parser,
name 
)

WikiImporter::out_contributor ( parser,
name 
)

Definition at line 994 of file Import.php.

References $name, debug(), parentTag(), pop(), and stripXmlNamespace().

WikiImporter::out_logitem ( parser,
name 
)

Definition at line 919 of file Import.php.

References $name, $ok, debug(), pop(), and stripXmlNamespace().

WikiImporter::out_mediawiki ( parser,
name 
)

Definition at line 652 of file Import.php.

References $name, debug(), and stripXmlNamespace().

WikiImporter::out_page ( parser,
name 
)

Definition at line 728 of file Import.php.

References $name, debug(), pageOutCallback(), pageTitle(), pop(), and stripXmlNamespace().

WikiImporter::out_revision ( parser,
name 
)

Definition at line 877 of file Import.php.

References $name, $ok, debug(), pop(), and stripXmlNamespace().

WikiImporter::out_siteinfo ( parser,
name 
)

Definition at line 679 of file Import.php.

References $name, and stripXmlNamespace().

WikiImporter::out_upload ( parser,
name 
)

Definition at line 960 of file Import.php.

References $name, $ok, debug(), pop(), and stripXmlNamespace().

WikiImporter::pageCallback ( title  ) 

Notify the callback function when a new <page> is reached.

Parameters:
$title Title
Access:
private

Definition at line 597 of file Import.php.

References $title.

Referenced by out_append().

WikiImporter::pageOutCallback ( title,
origTitle,
revisionCount,
successCount 
)

Notify the callback function when a </page> is closed.

Parameters:
$title Title
$origTitle Title
$revisionCount int
$successCount Int: number of revisions for which callback returned true
Access:
private

Definition at line 611 of file Import.php.

References $title.

Referenced by out_page().

WikiImporter::parentTag (  )  [private]

Definition at line 1016 of file Import.php.

References $name, and debug().

Referenced by out_append(), and out_contributor().

WikiImporter::pop (  )  [private]

Definition at line 1010 of file Import.php.

References $name, and debug().

Referenced by out_contributor(), out_logitem(), out_page(), out_revision(), and out_upload().

WikiImporter::push ( name  )  [private]

Definition at line 1005 of file Import.php.

References $name, and debug().

Referenced by in_logitem(), in_mediawiki(), in_page(), in_revision(), and in_upload().

WikiImporter::setDebug ( debug  ) 

Set debug mode.

..

Definition at line 467 of file Import.php.

WikiImporter::setLogItemCallback ( callback  ) 

Sets the action to perform as each log item reached.

Parameters:
$callback callback
Returns:
callback

Definition at line 524 of file Import.php.

Referenced by __construct().

WikiImporter::setPageCallback ( callback  ) 

Sets the action to perform as each new page in the stream is reached.

Parameters:
$callback callback
Returns:
callback

Definition at line 476 of file Import.php.

WikiImporter::setPageOutCallback ( callback  ) 

Sets the action to perform as each page in the stream is completed.

Callback accepts the page title (as a Title object), a second object with the original title form (in case it's been overridden into a local namespace), and a count of revisions.

Parameters:
$callback callback
Returns:
callback

Definition at line 491 of file Import.php.

WikiImporter::setRevisionCallback ( callback  ) 

Sets the action to perform as each page revision is reached.

Parameters:
$callback callback
Returns:
callback

Definition at line 502 of file Import.php.

Referenced by __construct().

WikiImporter::setTargetNamespace ( namespace  ) 

Set a target namespace to override the defaults.

Definition at line 533 of file Import.php.

WikiImporter::setUploadCallback ( callback  ) 

Sets the action to perform as each file upload version is reached.

Parameters:
$callback callback
Returns:
callback

Definition at line 513 of file Import.php.

Referenced by __construct().

WikiImporter::stripXmlNamespace ( name  ) 

WikiImporter::throwXmlError ( err  ) 

Definition at line 397 of file Import.php.

References debug(), and wfDebug().


Member Data Documentation

WikiImporter::$lastfield

Definition at line 387 of file Import.php.

WikiImporter::$mDebug = false

Definition at line 378 of file Import.php.

WikiImporter::$mLogItemCallback = null

Definition at line 383 of file Import.php.

WikiImporter::$mPageCallback = null

Definition at line 380 of file Import.php.

WikiImporter::$mPageOutCallback = null

Definition at line 381 of file Import.php.

WikiImporter::$mRevisionCallback = null

Definition at line 382 of file Import.php.

WikiImporter::$mSource = null

Definition at line 379 of file Import.php.

WikiImporter::$mTargetNamespace = null

Definition at line 385 of file Import.php.

WikiImporter::$mUploadCallback = null

Definition at line 384 of file Import.php.

WikiImporter::$mXmlNamespace = false

Definition at line 386 of file Import.php.

WikiImporter::$tagStack = array()

Definition at line 388 of file Import.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:50 2009 for MediaWiki by  doxygen 1.5.9