phpDocumentor GalleryCore
Storage
[ class tree: GalleryCore ] [ index: GalleryCore ] [ all elements ]

Class: GalleryDatabaseImport

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

Class GalleryDatabaseImport

Class Overview

GalleryDatabaseImport provides the functionality to import the Gallery database.

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

GalleryXmlHandler
   |
   --GalleryImportElement
      |
      --GalleryDatabaseImport
Author(s): Information Tags:
Version:  $Revision: 17580 $

Properties

Methods

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

Inherited From GalleryImportElement

GalleryImportElement::$_callBack
GalleryImportElement::$_currentElement
GalleryImportElement::$_errors
GalleryImportElement::$_parent
GalleryImportElement::$_rowChunkSize
GalleryImportElement::$_storage

Inherited From GalleryImportElement

GalleryImportElement::GalleryImportElement()
Constructor
GalleryImportElement::setError()
Stores an error message for later display. Follows the parent chain until a $_error variable is found.
GalleryImportElement::updateStatus()
Walks the tag chain to find the parent that has the callback information and then does the callback.
GalleryImportElement::_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.

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   $_fileReadChunkSize   Defines the number of bytes to read before letting the user know that we haven't forgotten them.

[ Top ]
Method Summary
GalleryDatabaseImport   GalleryDatabaseImport()  
array   importToDb()   Imports a file in Gallery export format.
array   verifyVersions()   This method prescans the exported Gallery database before doing an upload
void   _doStatusCheck()   Do the version validation prior actually reloading the Gallery installation
void   _processStartElement()  

[ Top ]
Properties
mixed   $_fileReadChunkSize = 8192 [line 143]

Defines the number of bytes to read before letting the user know that we haven't forgotten them.


[ Top ]
Methods
Constructor GalleryDatabaseImport  [line 145]

  GalleryDatabaseImport GalleryDatabaseImport( )



[ Top ]
importToDb  [line 311]

  array importToDb( string $fileName, string $progressCallback  )

Imports a file in Gallery export format.

This method will load an XML file, in the Gallery export format to the data base. It will restore the config.ini file and reset the versions.dat file.

Parameters:
string   $fileName:  Name of the file containing file database backup to restore.
string   $progressCallback:  Name of the routine to return call with progress reports

API Tags:
Return:  GalleryStatus array Array of GalleryStatus's containing errors encountered or null on success


[ Top ]
verifyVersions  [line 155]

  array verifyVersions( string $fileName  )

This method prescans the exported Gallery database before doing an upload

Parameters:
string   $fileName:  Filename to be imported.

API Tags:
Return:  List of error messages and warning messages generated by status check. Errors are contained in the key 'errors' and the warnings are contained in the key 'warnings'.


[ Top ]
_doStatusCheck  [line 233]

  void _doStatusCheck( array $versions, mixed &$errors  )

Do the version validation prior actually reloading the Gallery installation

Parameters:
array   $versions:  The plugin status as extracted from the <plugin-status> tag. $versions[1] - The plugin id $versions[2] - Required Core Api $versions[3] - Require Api (Module or Theme) $versions[4] - Plugin Version number $versions[5] - The plugin active flag. $versions[6] - The plugin type module | theme.


[ Top ]
_processStartElement  [line 372]

  void _processStartElement( $tag, $attributes  )

Parameters:
   $tag: 
   $attributes: 

API Tags:
Access:  protected
See:  GalleryXmlHandler::_processStartElement


Redefinition of:
GalleryXmlHandler::_processStartElement()
XML Callback to process start elements

[ Top ]

Documentation generated on Fri, 08 Oct 2010 04:56:50 -0700 by phpDocumentor 1.3.0RC6