MediaWiki REL1_40
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 32 of file SiteImporter.php.

Constructor & Destructor Documentation

◆ __construct()

SiteImporter::__construct ( SiteStore $store)
Parameters
SiteStore$store

Definition at line 47 of file SiteImporter.php.

Member Function Documentation

◆ getExceptionCallback()

SiteImporter::getExceptionCallback ( )
Returns
callable

Definition at line 54 of file SiteImporter.php.

◆ importFromFile()

SiteImporter::importFromFile ( $file)
Parameters
string$file

Definition at line 68 of file SiteImporter.php.

References $file, and importFromXML().

◆ importFromXML()

SiteImporter::importFromXML ( $xml)
Parameters
string$xml
Exceptions
InvalidArgumentException

Definition at line 83 of file SiteImporter.php.

Referenced by importFromFile().

◆ makeSite()

SiteImporter::makeSite ( DOMElement $siteElement)
Parameters
DOMElement$siteElement
Returns
Site
Exceptions
InvalidArgumentException

Definition at line 165 of file SiteImporter.php.

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

◆ setExceptionCallback()

SiteImporter::setExceptionCallback ( $exceptionCallback)
Parameters
callable$exceptionCallback

Definition at line 61 of file SiteImporter.php.


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