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 $cache) | |
initialize (Request $request, Response $response) | |
Public Member Functions inherited from BatchController | |
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) | |
initialize (Request $request, Response $response) | |
execute ($method=null) | |
getRequest () | |
getResponse () | |
Public Attributes | |
const | CACHE_SECTION = 'xmlexport' |
const | CACHE_KEY_ROOT_OIDS = 'rootOids' |
const | CACHE_KEY_EXPORTED_OIDS = 'exportedOids' |
Public Attributes inherited from BatchController | |
const | ONE_CALL_SESSION_VARNAME = 'BatchController.oneCall' |
const | STEP_SESSION_VARNAME = 'BatchController.curStep' |
const | NUM_STEPS_VARNAME = 'BatchController.numSteps' |
const | DOWNLOAD_STEP = 'BatchController.downloadStep' |
const | WORK_PACKAGES_VARNAME = 'BatchController.workPackages' |
Protected Member Functions | |
getFileUtil () | |
getWorkPackage ($number) | |
getDownloadFile () | |
initExport ($oids) | |
exportNodes ($oids) | |
finishExport ($oids) | |
endTags ($fileHandle, $curIndent, &$documentInfo) | |
writeNode ($fileHandle, ObjectId $oid, $depth, $documentInfo) | |
getNumUnvisitedChildren (Node $node) | |
formatValue ($value) | |
Protected Member Functions inherited from BatchController | |
doExecute () | |
getStepNumber () | |
addWorkPackage ($name, $size, $oids, $callback, $args=null) | |
processPart () | |
getNumberOfSteps () | |
getDisplayText ($step) | |
getDownloadFile () | |
getWorkPackage ($number) | |
Protected Member Functions inherited from Controller | |
validate () | |
executeSubAction ($action) | |
getLogger () | |
getSession () | |
getPersistenceFacade () | |
getPermissionManager () | |
getActionMapper () | |
getLocalization () | |
getMessage () | |
getConfiguration () | |
assignResponseDefaults () | |
isLocalizedRequest () | |
checkLanguageParameter () | |
Constructor & Destructor Documentation
__construct | ( | Session | $session, |
PersistenceFacade | $persistenceFacade, | ||
PermissionManager | $permissionManager, | ||
ActionMapper | $actionMapper, | ||
Localization | $localization, | ||
Message | $message, | ||
Configuration | $configuration, | ||
Cache | $cache | ||
) |
Constructor.
- Parameters
-
$session $persistenceFacade $permissionManager $actionMapper $localization $message $configuration $cache
Definition at line 91 of file XMLExportController.php.
Member Function Documentation
|
protected |
- See also
- Controller::initialize()
Definition at line 118 of file XMLExportController.php.
|
protected |
Definition at line 145 of file XMLExportController.php.
|
protected |
Definition at line 158 of file XMLExportController.php.
|
protected |
Initialize the XML export (oids parameter will be ignored)
- Parameters
-
$oids The oids to process
- Note
- This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Definition at line 168 of file XMLExportController.php.
|
protected |
Serialize all Nodes with given oids to XML.
- Parameters
-
$oids The oids to process
- Note
- This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Definition at line 219 of file XMLExportController.php.
|
protected |
Finish the XML export (oids parameter will be ignored)
- Parameters
-
$oids The oids to process
- Note
- This is a callback method called on a matching work package, see BatchController::addWorkPackage()
Definition at line 299 of file XMLExportController.php.
|
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 $documentInfo A reference to an assoziative array (see DOCUMENT_INFO)
Definition at line 324 of file XMLExportController.php.
|
protected |
Serialize a Node to XML.
- Parameters
-
$fileHandle The file handle to write to $oid The oid of the node $depth The depth of the node in the tree $documentInfo An assoziative array (see DOCUMENT_INFO)
- Returns
- The updated document state
Definition at line 347 of file XMLExportController.php.
|
protected |
Get number of children of the given node, that were not visited yet.
- Parameters
-
$node
- Returns
- Integer
Definition at line 408 of file XMLExportController.php.
|
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 440 of file XMLExportController.php.
Member Data Documentation
const CACHE_SECTION = 'xmlexport' |
Definition at line 56 of file XMLExportController.php.
const CACHE_KEY_ROOT_OIDS = 'rootOids' |
Definition at line 57 of file XMLExportController.php.
const CACHE_KEY_EXPORTED_OIDS = 'exportedOids' |
Definition at line 58 of file XMLExportController.php.