wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
XMLExportController Class Reference
+ Inheritance diagram for XMLExportController:

Public Member Functions

 initialize (&$request, &$response)
 
 getWorkPackage ($number)
 
 getDisplayText ($step)
 
 initExport ($oids)
 
 exportNodes ($oids)
 
 finishExport ($oids)
 
 endTags ($fileHandle, $curIndent, $documentInfo)
 
 writeNode ($fileHandle, $oid, $depth, $documentInfo)
 
 formatValue ($value)
 
- Public Member Functions inherited from BatchController
 initialize (&$request, &$response)
 
 addWorkPackage ($name, $size, $oids, $callback, $args=null)
 
 getWorkPackage ($number)
 
 getNumberOfSteps ()
 
 getDisplayText ($step)
 
 getSummaryText ()
 
 processPart ()
 
- Public Member Functions inherited from LongTaskController
 initialize (&$request, &$response)
 
 hasView ()
 
 executeKernel ()
 
 getStepNumber ()
 
 getNumberOfSteps ()
 
 getDisplayText ($step)
 
 getSummaryText ()
 
 initializeTask ()
 
 processPart ()
 
- Public Member Functions inherited from Controller
 Controller (&$delegate)
 
 initialize (&$request, &$response)
 
 validate ()
 
 hasView ()
 
 execute ()
 
 executeKernel ()
 
 getErrorMsg ()
 
 setErrorMsg ($msg)
 
 appendErrorMsg ($msg)
 
getRequest ()
 
getResponse ()
 
getView ()
 
getDelegate ()
 
 getViewTemplate ($controller, $context, $action)
 
 getCacheId ()
 
 assignViewDefaults (&$view)
 
 isLocalizedRequest ()
 

Public Attributes

 $ROOT_OIDS = 'XMLExportController.rootoids'
 
 $ITERATOR_ID = 'XMLExportController.iteratorid'
 
 $DOCUMENT_INFO = 'XMLExportController.documentinfo'
 
 $_DOCFILE = "export.xml"
 
 $_DOCTYPE = ""
 
 $_DTD = ""
 
 $_DOCROOTELEMENT = "Root"
 
 $_DOCLINEBREAK = "\n"
 
 $_DOCINDENT = " "
 
 $_NODES_PER_CALL = 10
 
- Public Attributes inherited from BatchController
 $WORK_PACKAGES_VARNAME = 'BatchController.workPackages'
 
 $NUM_STEPS_VARNAME = 'BatchController.numSteps'
 
 $_workPackages = array()
 
- Public Attributes inherited from LongTaskController
 $STEP_SESSION_VARNAME = 'LongTaskController.curStep'
 
 $ONE_CALL_SESSION_VARNAME = 'LongTaskController.oneCall'
 
 $_curStep = 1
 
- Public Attributes inherited from Controller
 $_request = null
 
 $_response = null
 
 $_errorMsg = ''
 
 $_view = null
 
 $_delegate = null
 

Detailed Description

XMLExportController exports the content tree into an XML file.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.XMLExportController.php 1462 2014-02-04 23:52:27Z iherwig

Input actions:

  • continue Continue export
  • unspecified: Initiate the export

Output actions:

Parameters
[in]docfileThe name of the file to write to (path relative to script main location), default: 'export.xml'
[in]doctypeThe document type (will be written into XML header), default: ''
[in]dtdThe dtd (will be written into XML header), default: ''
[in]docrootelementThe root element of the document (use this to enclose different root types if necessary), default: 'Root'
[in]doclinebreakThe linebreak character(s) to use, default: '
'
[in]docindentThe indent character(s) to use, default: ' '
[in]nodes_per_callThe number of nodes to process in one call, default: 10
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 47 of file class.XMLExportController.php.

Member Function Documentation

XMLExportController::initialize ( $request,
$response 
)
See Also
Controller::initialize()

Definition at line 70 of file class.XMLExportController.php.

References $_DOCFILE, $_DOCINDENT, $_DOCLINEBREAK, $_DOCROOTELEMENT, $_DOCTYPE, $_DTD, $_NODES_PER_CALL, and SessionData\getInstance().

+ Here is the call graph for this function:

XMLExportController::getWorkPackage (   $number)
See Also
BatchController::getWorkPackage()

Definition at line 98 of file class.XMLExportController.php.

References Message\get().

+ Here is the call graph for this function:

XMLExportController::getDisplayText (   $step)
XMLExportController::initExport (   $oids)

Initialize the XML export (oids parameter will be ignored)

Parameters
oidsThe oids to process
Note
This is a callback method called on a matching work package, see BatchController::addWorkPackage()

Definition at line 117 of file class.XMLExportController.php.

References BatchController\addWorkPackage(), FileUtil\fputsUnicode(), Message\get(), PersistenceFacade\getInstance(), InifileParser\getInstance(), and SessionData\getInstance().

+ Here is the call graph for this function:

XMLExportController::exportNodes (   $oids)

Serialize all Nodes with given oids to XML

Parameters
oidsThe oids to process
Note
This is a callback method called on a matching work package, see BatchController::addWorkPackage()

Definition at line 158 of file class.XMLExportController.php.

References BatchController\addWorkPackage(), Message\get(), SessionData\getInstance(), PersistentIterator\load(), and writeNode().

+ Here is the call graph for this function:

XMLExportController::finishExport (   $oids)

Finish the XML export (oids parameter will be ignored)

Parameters
oidsThe oids to process
Note
This is a callback method called on a matching work package, see BatchController::addWorkPackage()

Definition at line 240 of file class.XMLExportController.php.

References endTags(), FileUtil\fputsUnicode(), and SessionData\getInstance().

+ Here is the call graph for this function:

XMLExportController::endTags (   $fileHandle,
  $curIndent,
  $documentInfo 
)

Ends all tags up to $curIndent level

Parameters
fileHandleThe file handle to write to
curIndentThe depth of the node in the tree
documentInfoAn assoziative array (see DOCUMENT_INFO)

Definition at line 264 of file class.XMLExportController.php.

References FileUtil\fputsUnicode().

Referenced by finishExport(), and writeNode().

+ Here is the call graph for this function:

XMLExportController::writeNode (   $fileHandle,
  $oid,
  $depth,
  $documentInfo 
)

Serialize a Node to XML

Parameters
fileHandleThe file handle to write to
oidThe oid of the node
depthThe depth of the node in the tree
documentInfoAn assoziative array (see DOCUMENT_INFO)
Returns
The updated document state

Definition at line 286 of file class.XMLExportController.php.

References BUILDDEPTH_SINGLE, DATATYPE_ATTRIBUTE, DATATYPE_ELEMENT, endTags(), formatValue(), FileUtil\fputsUnicode(), and PersistenceFacade\getInstance().

Referenced by exportNodes().

+ Here is the call graph for this function:

XMLExportController::formatValue (   $value)

Format a value for XML output

Parameters
valueThe value to format
Returns
The formatted value
Note
Subclasses may overrite this for special application requirements

Definition at line 348 of file class.XMLExportController.php.

Referenced by writeNode().

Member Data Documentation

XMLExportController::$ROOT_OIDS = 'XMLExportController.rootoids'

Definition at line 50 of file class.XMLExportController.php.

XMLExportController::$ITERATOR_ID = 'XMLExportController.iteratorid'

Definition at line 51 of file class.XMLExportController.php.

XMLExportController::$DOCUMENT_INFO = 'XMLExportController.documentinfo'

Definition at line 56 of file class.XMLExportController.php.

XMLExportController::$_DOCFILE = "export.xml"

Definition at line 59 of file class.XMLExportController.php.

Referenced by initialize().

XMLExportController::$_DOCTYPE = ""

Definition at line 60 of file class.XMLExportController.php.

Referenced by initialize().

XMLExportController::$_DTD = ""

Definition at line 61 of file class.XMLExportController.php.

Referenced by initialize().

XMLExportController::$_DOCROOTELEMENT = "Root"

Definition at line 62 of file class.XMLExportController.php.

Referenced by initialize().

XMLExportController::$_DOCLINEBREAK = "\n"

Definition at line 63 of file class.XMLExportController.php.

Referenced by initialize().

XMLExportController::$_DOCINDENT = " "

Definition at line 64 of file class.XMLExportController.php.

Referenced by initialize().

XMLExportController::$_NODES_PER_CALL = 10

Definition at line 65 of file class.XMLExportController.php.

Referenced by initialize().


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