Class JInstallationModelDatabase

Description

Database configuration model for the Joomla Core Installer.

  • since: 1.6

Located in /installation/models/database.php (line 19)

JObject
   |
   --JModel
      |
      --JModelLegacy
         |
         --JInstallationModelDatabase
Variable Summary
static mixed $userId
Method Summary
static void generateRandUserId ()
static void getUserId ()
static void resetRandUserId ()
boolean backupDatabase (JDatabase &$db, string $name, string $prefix)
boolean createDatabase (JDatabase &$db, string $name)
boolean deleteDatabase (JDatabase &$db, string $name, string $prefix)
void initialise ( $options)
void installSampleData ( $options)
boolean populateDatabase (JDatabase &$db, string $schema)
void postInstallSampleData (Database $db)
boolean setDatabaseCharset (JDatabase &$db, string $name)
array _splitQueries (string $sql)
Variables
static mixed $userId = 0 (line 22)
  • access: protected

Inherited Variables

Inherited from JModel

JModel::$event_clean_cache
JModel::$name
JModel::$option
JModel::$state
JModel::$_db
JModel::$__state_set

Inherited from JObject

JObject::$_errors
Methods
static method generateRandUserId (line 24)
  • access: protected
static void generateRandUserId ()
static method getUserId (line 44)
  • access: public
static void getUserId ()
static method resetRandUserId (line 37)
  • access: public
static void resetRandUserId ()
backupDatabase (line 394)

Method to backup all tables in a database with a given prefix.

  • return: True on success.
  • since: 1.0
  • access: public
boolean backupDatabase (JDatabase &$db, string $name, string $prefix)
  • JDatabase &$db: JDatabase object.
  • string $name: Name of the database to process.
  • string $prefix: Database table prefix.
createDatabase (line 447)

Method to create a new database.

  • return: True on success.
  • since: 1.0
  • access: public
boolean createDatabase (JDatabase &$db, string $name)
  • JDatabase &$db: JDatabase object.
  • string $name: Name of the database to create.
deleteDatabase (line 478)

Method to delete all tables in a database with a given prefix.

  • return: True on success.
  • since: 1.0
  • access: public
boolean deleteDatabase (JDatabase &$db, string $name, string $prefix)
  • JDatabase &$db: JDatabase object.
  • string $name: Name of the database to process.
  • string $prefix: Database table prefix.
initialise (line 52)
  • access: public
void initialise ( $options)
  • $options
installSampleData (line 314)
void installSampleData ( $options)
  • $options
populateDatabase (line 517)

Method to import a database schema from a file.

  • return: True on success.
  • since: 1.0
  • access: public
boolean populateDatabase (JDatabase &$db, string $schema)
  • JDatabase &$db: JDatabase object.
  • string $schema: Path to the schema file.
postInstallSampleData (line 361)

method to update the user id of the sample data content to the new rand user id

  • access: protected
void postInstallSampleData (Database $db)
  • Database $db: connector object $db
setDatabaseCharset (line 564)

Method to set the database character set to UTF-8.

  • return: True on success.
  • since: 1.0
  • access: public
boolean setDatabaseCharset (JDatabase &$db, string $name)
  • JDatabase &$db: JDatabase object.
  • string $name: Name of the database to process.
_splitQueries (line 593)

Method to split up queries from a schema file into an array.

  • return: Queries to perform.
  • since: 1.0
  • access: protected
array _splitQueries (string $sql)
  • string $sql: SQL schema.

Inherited Methods

Inherited From JModelLegacy

JModelLegacy::addIncludePath()

Inherited From JModel

JModel::__construct()
JModel::addIncludePath()
JModel::addTablePath()
JModel::cleanCache()
JModel::getDbo()
JModel::getInstance()
JModel::getName()
JModel::getState()
JModel::getTable()
JModel::populateState()
JModel::setDbo()
JModel::setState()
JModel::_createFileName()
JModel::_createTable()
JModel::_getList()
JModel::_getListCount()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:53:58 -0500 by phpDocumentor 1.4.4