Detailed Description
XMLExportController exports the content tree into an XML file.
The controller supports the following actions:
Parameter | Description |
---|---|
in docFile | The name of the file to write to (path relative to script main location) (default: 'export.xml') |
in docType | The document type (will be written into XML header) (default: '') |
in dtd | The dtd (will be written into XML header) (default: '') |
in docRootElement | The root element of the document (use this to enclose different root types if necessary) (default: 'Root') |
in docLinebreak | The linebreak character(s) to use (default: ' ') |
in docIndent | The indent character(s) to use (default: ' ') |
in nodesPerCall | The number of nodes to process in one call (default: 10) |
For additional actions and parameters see BatchController actions.
Definition at line 55 of file XMLExportController.php.
Public Member Functions | |
__construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, Cache $staticCache) | |
initialize (Request $request, Response $response) | |
Public Member Functions inherited from Controller | |
__construct (Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration) | |
execute ($method=null) | |
getRequest () | |
getResponse () | |
Public Attributes | |
const | CACHE_KEY_ROOT_OIDS = 'rootOids' |
const | CACHE_KEY_EXPORTED_OIDS = 'exportedOids' |
const | CACHE_KEY_LAST_INDENT = 'lastIndent' |
const | CACHE_KEY_TAGS_TO_CLOSE = 'tagsToClose' |
const | ITERATOR_ID_VAR = 'XMLExportController.iteratorid' |
const | DOCFILE = "export.xml" |
const | DOCTYPE = "" |
const | DTD = "" |
const | DOCROOTELEMENT = "Root" |
const | DOCLINEBREAK = "\n" |
const | DOCINDENT = " " |
const | NODES_PER_CALL = 10 |
Public Attributes inherited from BatchController | |
const | REQUEST_VAR = 'request' |
const | ONE_CALL_VAR = 'oneCall' |
const | STEP_VAR = 'step' |
const | NUM_STEPS_VAR = 'numSteps' |
const | DOWNLOAD_STEP_VAR = 'downloadStep' |
const | PACKAGES_VAR = 'packages' |
Public Attributes inherited from Controller | |
const | CSRF_TOKEN_PARAM = 'csrf_token' |
Constructor & Destructor Documentation
◆ __construct()
__construct | ( | Session | $session, |
PersistenceFacade | $persistenceFacade, | ||
PermissionManager | $permissionManager, | ||
ActionMapper | $actionMapper, | ||
Localization | $localization, | ||
Message | $message, | ||
Configuration | $configuration, | ||
Cache | $staticCache | ||
) |
Constructor.
- Parameters
-
$session $persistenceFacade $permissionManager $actionMapper $localization $message $configuration $staticCache
Definition at line 87 of file XMLExportController.php.
Member Function Documentation
◆ initialize()
- See also
- Controller::initialize()
Reimplemented from BatchController.
Definition at line 104 of file XMLExportController.php.
◆ getWorkPackage()
|
protected |
Reimplemented from BatchController.
Definition at line 155 of file XMLExportController.php.
◆ getDownloadFile()
|
protected |
Reimplemented from BatchController.
Definition at line 168 of file XMLExportController.php.
◆ initExport()
|
protected |
Initialize the XML export (object ids parameter will be ignored)
- Parameters
-
$oids The object ids to process
- Note
- This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Definition at line 177 of file XMLExportController.php.
◆ exportNodes()
|
protected |
Serialize all Nodes with given object ids to XML.
- Parameters
-
$oids The object ids to process
- Note
- This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Definition at line 230 of file XMLExportController.php.
◆ finishExport()
|
protected |
Finish the XML export (object ids parameter will be ignored)
- Parameters
-
$oids The object ids to process
- Note
- This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Definition at line 302 of file XMLExportController.php.
◆ endTags()
|
protected |
Ends all tags up to $curIndent level.
- Parameters
-
$fileHandle The file handle to write to $curIndent The depth of the node in the tree
Definition at line 325 of file XMLExportController.php.
◆ writeNode()
|
protected |
Serialize a Node to XML.
- Parameters
-
$fileHandle The file handle to write to $oid The object id of the node $depth The depth of the node in the tree
Definition at line 356 of file XMLExportController.php.
◆ getNumUnvisitedChildren()
|
protected |
Get number of children of the given node, that were not visited yet.
- Parameters
-
$node
- Returns
- Integer
Definition at line 425 of file XMLExportController.php.
◆ formatValue()
|
protected |
Format a value for XML output.
- Parameters
-
$value The value to format
- Returns
- The formatted value
- Note
- Subclasses may overrite this for special application requirements
Definition at line 458 of file XMLExportController.php.
◆ cleanup()
|
protected |
- See also
- BatchController::cleanup()
Reimplemented from BatchController.
Definition at line 465 of file XMLExportController.php.
Member Data Documentation
◆ CACHE_KEY_ROOT_OIDS
const CACHE_KEY_ROOT_OIDS = 'rootOids' |
Definition at line 56 of file XMLExportController.php.
◆ CACHE_KEY_EXPORTED_OIDS
const CACHE_KEY_EXPORTED_OIDS = 'exportedOids' |
Definition at line 57 of file XMLExportController.php.
◆ CACHE_KEY_LAST_INDENT
const CACHE_KEY_LAST_INDENT = 'lastIndent' |
Definition at line 58 of file XMLExportController.php.
◆ CACHE_KEY_TAGS_TO_CLOSE
const CACHE_KEY_TAGS_TO_CLOSE = 'tagsToClose' |
Definition at line 59 of file XMLExportController.php.
◆ ITERATOR_ID_VAR
const ITERATOR_ID_VAR = 'XMLExportController.iteratorid' |
Definition at line 62 of file XMLExportController.php.
◆ DOCFILE
const DOCFILE = "export.xml" |
Definition at line 65 of file XMLExportController.php.
◆ DOCTYPE
const DOCTYPE = "" |
Definition at line 66 of file XMLExportController.php.
◆ DTD
const DTD = "" |
Definition at line 67 of file XMLExportController.php.
◆ DOCROOTELEMENT
const DOCROOTELEMENT = "Root" |
Definition at line 68 of file XMLExportController.php.
◆ DOCLINEBREAK
const DOCLINEBREAK = "\n" |
Definition at line 69 of file XMLExportController.php.
◆ DOCINDENT
const DOCINDENT = " " |
Definition at line 70 of file XMLExportController.php.
◆ NODES_PER_CALL
const NODES_PER_CALL = 10 |
Definition at line 71 of file XMLExportController.php.