phpDocumentor Gallery
[ class tree: Gallery ] [ index: Gallery ] [ all elements ]

Class: GalleryImportElement

Source Location: /modules/core/classes/GalleryStorage/GalleryDatabaseImport.class

Class GalleryImportElement

Class Overview

This class provides basic methods for importing Gallery information from an exported Gallery file. It provides additional error handling and status reporting not provided by the GalleryXmlHandler.

Located in /modules/core/classes/GalleryStorage/GalleryDatabaseImport.class [line 38]

GalleryXmlHandler
   |
   --GalleryImportElement

Properties

Methods

[ Top ]
Direct descendents
Child Class Description
GalleryDatabaseImport GalleryDatabaseImport provides the functionality to import the Gallery database.
_GalleryExportTag Represents the root element of a Gallery2 database export file.
_GalleryPluginTag Processes the <plugin> tag and its children.
_GallerySequenceTag Processes the <sequence> tag an initializes a sequence.
_GalleryTableTag Processes the <table> tag and creates the table and loads the data.
_GalleryTableDefinitionTag Processes the <definition> tag from the input source.
_GalleryCreateSqlTag Process the <create-sql> tag from the input source.
_GalleryTableInfoTag Processes the <table-info> tag from the input source.
_GalleryDataTag Processes the <data> tag from the input source.
_GalleryFieldDefinitionTag Processes the <field> tag from the input source.
_GalleryRowTag Processes the <row> tag from the input source.
_GalleryFieldValueTag Processes the <f> tag from the input source.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From GalleryXmlHandler

GalleryXmlHandler::_processCData()
XML Callback to process CDATA elements
GalleryXmlHandler::_processChildElement()
This call back processes the child as it is pooped off the stack. Allows the parent element to aggregate data from the children elements.
GalleryXmlHandler::_processEndElement()
XML Callback to process end elements
GalleryXmlHandler::_processStartElement()
XML Callback to process start elements

[ Top ]
Property Summary
mixed   $_callBack   This variable contains the call back information and contains the following keys
mixed   $_currentElement   current element
mixed   $_errors   This is a place holder for a list of errors that have occurred.
mixed   $_parent   Parent GalleryImportElement
mixed   $_rowChunkSize   Defines the number of rows to be read before letting the user know that we are still working.
mixed   $_storage   Storage object.

[ Top ]
Method Summary
GalleryImportElement   GalleryImportElement()   Constructor
void   setError()   Stores an error message for later display. Follows the parent chain until a $_error variable is found.
void   updateStatus()   Walks the tag chain to find the parent that has the callback information and then does the callback.
string   _decodeHtmlSpecialChars()   Undo the effects of calling GalleryDatabaseExport::_encodeHtmlspecialchars($value). If the exported field is contained in a CDATA block, then we need to do the decoding ourselves.

[ Top ]
Properties
mixed   $_callBack [line 70]

This variable contains the call back information and contains the following keys

'progress' current progress 'total' total work involved 'callback' progress bar notification callback


[ Top ]
mixed   $_currentElement [line 57]

current element


[ Top ]
mixed   $_errors [line 62]

This is a place holder for a list of errors that have occurred.


[ Top ]
mixed   $_parent [line 52]

Parent GalleryImportElement


[ Top ]
mixed   $_rowChunkSize = 200 [line 42]

Defines the number of rows to be read before letting the user know that we are still working.


[ Top ]
mixed   $_storage [line 47]

Storage object.


[ Top ]
Methods
Constructor GalleryImportElement  [line 77]

  GalleryImportElement GalleryImportElement( [GalleryImportElement $parent = null]  )

Constructor

Parameters:
GalleryImportElement   $parent:  The parent object. Used to follow the parent chain in order to set error messages and to provide status information to the caller.


[ Top ]
setError  [line 89]

  void setError( GalleryStatus $status  )

Stores an error message for later display. Follows the parent chain until a $_error variable is found.

Parameters:
GalleryStatus   $status:  A Gallery status object.


[ Top ]
updateStatus  [line 103]

  void updateStatus( [integer $progress = 1], [integer $total = 0]  )

Walks the tag chain to find the parent that has the callback information and then does the callback.

Parameters:
integer   $progress:  (optional) The amount to increase the progress bar by.
integer   $total:  (optional) The amount to increase the total work units by.


[ Top ]
_decodeHtmlSpecialChars  [line 125]

  string _decodeHtmlSpecialChars( $string $valueToConvert  )

Undo the effects of calling GalleryDatabaseExport::_encodeHtmlspecialchars($value). If the exported field is contained in a CDATA block, then we need to do the decoding ourselves.

Parameters:
$string   $valueToConvert:  String to escape the html special characters.

API Tags:
Return:  The decoded string.

Information Tags:
Todo:  Move this routine to GalleryUtilities as a common function.

[ Top ]

Documentation generated on Sat, 21 Nov 2009 04:44:46 -0800 by phpDocumentor 1.3.0RC6