MediaWiki master
MediaWiki\Site\SiteImporter Class Reference

Utility for importing site entries from XML. More...

Public Member Functions

 __construct (SiteStore $store)
 
 getExceptionCallback ()
 
 importFromFile ( $file)
 
 importFromXML ( $xml)
 
 makeSite (DOMElement $siteElement)
 
 setExceptionCallback ( $exceptionCallback)
 

Detailed Description

Utility for importing site entries from XML.

For the expected format of the input, see docs/sitelist.md and docs/sitelist-1.0.xsd.

Since
1.25
Author
Daniel Kinzler

Definition at line 39 of file SiteImporter.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Site\SiteImporter::__construct ( SiteStore $store)
Parameters
SiteStore$store

Definition at line 54 of file SiteImporter.php.

Member Function Documentation

◆ getExceptionCallback()

MediaWiki\Site\SiteImporter::getExceptionCallback ( )
Returns
callable

Definition at line 61 of file SiteImporter.php.

◆ importFromFile()

MediaWiki\Site\SiteImporter::importFromFile ( $file)
Parameters
string$file

Definition at line 75 of file SiteImporter.php.

References MediaWiki\Site\SiteImporter\importFromXML().

◆ importFromXML()

MediaWiki\Site\SiteImporter::importFromXML ( $xml)
Parameters
string$xml

Definition at line 89 of file SiteImporter.php.

Referenced by MediaWiki\Site\SiteImporter\importFromFile().

◆ makeSite()

MediaWiki\Site\SiteImporter::makeSite ( DOMElement $siteElement)
Parameters
DOMElement$siteElement
Returns
Site

Definition at line 163 of file SiteImporter.php.

References $path, MediaWiki\Site\Site\GROUP_NONE, MediaWiki\Site\Site\newForType(), MediaWiki\Site\Site\SOURCE_LOCAL, and MediaWiki\Site\Site\TYPE_UNKNOWN.

◆ setExceptionCallback()

MediaWiki\Site\SiteImporter::setExceptionCallback ( $exceptionCallback)
Parameters
callable$exceptionCallback

Definition at line 68 of file SiteImporter.php.


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