XMLExportController.php
41 * | _in_ `docFile` | The name of the file to write to (path relative to script main location) (default: 'export.xml')
44 * | _in_ `docRootElement` | The root element of the document (use this to enclose different root types if necessary) (default: 'Root')
175 * @note This is a callback method called on a matching work package, see BatchController::addWorkPackage()
193 $this->fileUtil->fputsUnicode($fileHandle, '<?xml version="1.0" encoding="UTF-8"?>'.$docLinebreak);
195 $this->fileUtil->fputsUnicode($fileHandle, '<!DOCTYPE '.$docType.' SYSTEM "'.$dtd.'">'.$docLinebreak);
228 * @note This is a callback method called on a matching work package, see BatchController::addWorkPackage()
233 // - If there is an iterator stored in the session we are inside a tree and continue iterating (_NODES_PER_CALL nodes)
235 // - If the oids array holds one value!=null this is assumed to be an root oid and a new iterator is constructed
251 $iterator = new PersistentIterator($this->ITERATOR_ID_VAR, $persistenceFacade, $session, $oids[0]);
300 * @note This is a callback method called on a matching work package, see BatchController::addWorkPackage()
340 $this->fileUtil->fputsUnicode($fileHandle, str_repeat($docIndent, $closeTag["indent"]).'</'.$closeTag["name"].'>'.$docLinebreak);
385 $this->fileUtil->fputsUnicode($fileHandle, str_repeat($docIndent, $curIndent).'<'.$elementName);
Session is the interface for session implementations and defines access to session variables.
Definition: Session.php:19
Response holds the response values that are used as output from Controller instances.
Definition: Response.php:20
Request holds the request values that are used as input to Controller instances.
Definition: Request.php:18
const ITERATOR_ID_VAR
Definition: XMLExportController.php:62
getMapper()
Definition: DefaultPersistentObject.php:123
XMLExportController exports the content tree into an XML file.
Definition: XMLExportController.php:55
const DOCTYPE
Definition: XMLExportController.php:66
endTags($fileHandle, $curIndent)
Ends all tags up to $curIndent level.
Definition: XMLExportController.php:325
getWorkPackage($number)
Definition: XMLExportController.php:155
writeNode($fileHandle, ObjectId $oid, $depth)
Serialize a Node to XML.
Definition: XMLExportController.php:356
PersistentIterator is used to iterate over a tree/list built of persistent objects using a Depth-Firs...
Definition: PersistentIterator.php:24
const CACHE_KEY_TAGS_TO_CLOSE
Definition: XMLExportController.php:59
const CACHE_KEY_ROOT_OIDS
Definition: XMLExportController.php:56
exportNodes($oids)
Serialize all Nodes with given object ids to XML.
Definition: XMLExportController.php:230
static reset($id, Session $session)
Reset the iterator with the given id.
Definition: PersistentIterator.php:79
const NODES_PER_CALL
Definition: XMLExportController.php:71
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
Implementations of Configuration give access to the application configuration.
Definition: Configuration.php:32
cleanup()
Definition: XMLExportController.php:465
const CACHE_KEY_LAST_INDENT
Definition: XMLExportController.php:58
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
FileUtil provides basic support for file functionality like HTTP file upload.
Definition: FileUtil.php:22
const CACHE_KEY_EXPORTED_OIDS
Definition: XMLExportController.php:57
__construct(Session $session, PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ActionMapper $actionMapper, Localization $localization, Message $message, Configuration $configuration, Cache $staticCache)
Constructor.
Definition: XMLExportController.php:87
initialize(Request $request, Response $response)
Definition: XMLExportController.php:104
BatchController is used to process complex, longer running actions, that need to be divided into seve...
Definition: BatchController.php:73
addWorkPackage($name, $size, array $oids, $callback, $args=null)
Add a work package to session.
Definition: BatchController.php:210
static load($id, $persistenceFacade, $session)
Load an iterator state from the session.
Definition: PersistentIterator.php:90
Controller is the base class of all controllers.
Definition: Controller.php:49
initExport($oids)
Initialize the XML export (object ids parameter will be ignored)
Definition: XMLExportController.php:177
ActionMapper implementations are responsible for instantiating and executing Controllers based on the...
Definition: ActionMapper.php:21
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:20
const DOCROOTELEMENT
Definition: XMLExportController.php:68
const DOCFILE
Definition: XMLExportController.php:65
getNumUnvisitedChildren(Node $node)
Get number of children of the given node, that were not visited yet.
Definition: XMLExportController.php:425
getDownloadFile()
Definition: XMLExportController.php:168
const DOCLINEBREAK
Definition: XMLExportController.php:69
finishExport($oids)
Finish the XML export (object ids parameter will be ignored)
Definition: XMLExportController.php:302
const DOCINDENT
Definition: XMLExportController.php:70
Localization defines the interface for storing localized entity instances and retrieving them back.
Definition: Localization.php:32
Message is used to get localized messages to be used in the user interface.
Definition: Message.php:23