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

Class: DatabaseSetupStep

Source Location: /install/steps/DatabaseSetupStep.class

Class DatabaseSetupStep

Method Summary
bool   in_array_cin()   in_array_cin: case-insensitive in_array
void   isRedoable()  
void   loadTemplateData()  
void   stepName()  
void   _captureEnd()  
void   _captureStart()  
array   _cleanDatabase()   Drop all Gallery database tables
boolean   _emptyGalleryStorageDirectory()   Empty the Gallery storage directory and reset it to its original state
array(boolean   _executeSql()   Execute a series of SQL statements.
void   _getCaptured()  
string   _getDbVersion()   Get the state and the version of the Gallery database.
array   _getVersions()   Get the installed version from versions.dat in the Storage directory And the codebase version from modules/core/module.inc
boolean   _loadG2Api()   Load minimal G2 API
array   _testPrivileges()   Check if the user has the most basic database privileges required to finish the install

[ Top ]
Methods
in_array_cin  [line 751]

  bool in_array_cin( string $strItem, array $arItems  )

in_array_cin: case-insensitive in_array

case-insensitive version of php function in_array() returns true if param 1 is in array param 2

PostgreSQL in windows/linux, Mysql on Windows both return a all lower-case list of existing tables. DB2 on Windows returns a all upper-case list of tablenames. Probably, only MySQL on linux returns a case-sensitive list of tablenames. Generalize to compare tablenames case-insensitively.

Parameters:
string   $strItem:  the search argument
array   $arItems:  vars to search in

API Tags:
Return:  success status


[ Top ]
isRedoable  [line 396]

  void isRedoable( )



Redefinition of:
InstallStep::isRedoable()

[ Top ]
loadTemplateData  [line 35]

  void loadTemplateData( &$templateData  )

Parameters:
   &$templateData: 


Redefinition of:
InstallStep::loadTemplateData()

[ Top ]
stepName  [line 31]

  void stepName( )



Redefinition of:
InstallStep::stepName()

[ Top ]
_captureEnd  [line 378]

  void _captureEnd( )



[ Top ]
_captureStart  [line 374]

  void _captureStart( )



[ Top ]
_cleanDatabase  [line 718]

  array _cleanDatabase( )

Drop all Gallery database tables

Drop all Gallery database tables that are listed in the Gallery schema table


API Tags:
Return:  GalleryStatus a status code


[ Top ]
_emptyGalleryStorageDirectory  [line 676]

  boolean _emptyGalleryStorageDirectory( )

Empty the Gallery storage directory and reset it to its original state

Deletes everything in the storage directory and then rebuilds the initial folder structure


API Tags:
Return:  success


[ Top ]
_executeSql  [line 484]

  array(boolean _executeSql( string $buffer, string $tablePrefix  )

Execute a series of SQL statements.

Parameters:
string   $buffer:  the SQL statements
string   $tablePrefix:  prefix for table names

API Tags:
Return:  success, string error message)


[ Top ]
_getCaptured  [line 386]

  void _getCaptured( )



[ Top ]
_getDbVersion  [line 553]

  string _getDbVersion( array $metaTables  )

Get the state and the version of the Gallery database.

Parameters:
array   $metaTables:  the meta tables info array from the database

API Tags:
Return:  the db version


[ Top ]
_getVersions  [line 526]

  array _getVersions( )

Get the installed version from versions.dat in the Storage directory And the codebase version from modules/core/module.inc

Avoid using GalleryInitFirstPass (as this is called even for fresh installs)


API Tags:
Return:  ('installed' => string the storage versions.dat version, 'codebase' => string the codebase version)


[ Top ]
_loadG2Api  [line 592]

  boolean _loadG2Api( [int $level = 1]  )

Load minimal G2 API

Used to check the version in the db and to clean the db / storage dir

Parameters:
int   $level:  (optional) which level to load

API Tags:
Return:  success


[ Top ]
_testPrivileges  [line 411]

  array _testPrivileges( string $dbType, array $metatables  )

Check if the user has the most basic database privileges required to finish the install

steps successfully. Check:

  • CREATE TABLE, ALTER TABLE, DROP TABLE
  • CREATE INDEX, DROP INDEX
  • CREATE SEQUENCE, DROP SEQUENCE

Parameters:
string   $dbType:  platform name (i.e. not mysqlt, but mysql)
array   $metatables:  (string tableName)

API Tags:
Return:  (boolean success, string errors)


[ Top ]

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