Class InstallationModelDatabase

Description

Database configuration model for the Joomla Core Installer.

  • since: 3.1

Located in /installation/model/database.php (line 18)

JModelBase
   |
   --InstallationModelDatabase
Variable Summary
 static integer $userId
Method Summary
 static integer generateRandUserId ()
 static integer getUserId ()
 static void resetRandUserId ()
 boolean backupDatabase (JDatabaseDriver $db, string $prefix)
 boolean createDatabase (array $options)
 boolean createDB (JDatabaseDriver $db, JObject $options, boolean $utf)
 boolean createTables (array $options)
 boolean deleteDatabase (JDatabaseDriver $db, string $prefix)
 boolean handleOldDatabase (array $options)
 boolean initialise (array $options)
 boolean installSampleData (array $options)
 boolean populateDatabase (JDatabaseDriver $db, string $schema)
 boolean setDatabaseCharset (JDatabaseDriver $db, string $name)
 array _splitQueries (string $query)
Variables
static integer $userId = 0 (line 26)

The generated user ID

  • since: 3.1
  • access: protected

Inherited Variables

Inherited from JModelBase

JModelBase::$state
Methods
static generateRandUserId (line 35)

Generates the user ID

  • return: The user ID
  • since: 3.1
  • access: protected
static integer generateRandUserId ()
static getUserId (line 71)

Retrieves the default user ID and sets it if necessary

  • return: The user ID
  • since: 3.1
  • access: public
static integer getUserId ()
static resetRandUserId (line 57)

Resets the user ID

  • since: 3.1
  • access: public
static void resetRandUserId ()
backupDatabase (line 660)

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

  • return: True on success.
  • since: 3.1
  • access: public
boolean backupDatabase (JDatabaseDriver $db, string $prefix)
  • JDatabaseDriver $db: JDatabaseDriver object.
  • string $prefix: Database table prefix.
createDatabase (line 179)

Method to create a new database.

  • return: True on success.
  • since: 3.1
  • access: public
boolean createDatabase (array $options)
  • array $options: The configuration options
createDB (line 718)

Method to create a new database.

  • return: True on success.
  • since: 3.1
  • access: public
boolean createDB (JDatabaseDriver $db, JObject $options, boolean $utf)
  • JDatabaseDriver $db: JDatabase object.
  • JObject $options: JObject coming from "initialise" function to pass user and database name to database driver.
  • boolean $utf: True if the database supports the UTF-8 character set.
createTables (line 354)

Method to create the database tables

  • return: True on success
  • since: 3.1
  • access: public
boolean createTables (array $options)
  • array $options: The options array
deleteDatabase (line 745)

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

  • return: True on success.
  • since: 3.1
  • access: public
boolean deleteDatabase (JDatabaseDriver $db, string $prefix)
  • JDatabaseDriver $db: JDatabaseDriver object.
  • string $prefix: Database table prefix.
handleOldDatabase (line 305)

Method to process the old database

  • return: True on success
  • since: 3.1
  • access: public
boolean handleOldDatabase (array $options)
  • array $options: The options array
initialise (line 90)

Method to initialise the database

  • return: True on success
  • since: 3.1
  • access: public
boolean initialise (array $options)
  • array $options: The options to use for configuration
installSampleData (line 564)

Method to install the sample data

  • return: True on success
  • since: 3.1
  • access: public
boolean installSampleData (array $options)
  • array $options: The options array
populateDatabase (line 786)

Method to import a database schema from a file.

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

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

  • since: 3.1
  • access: protected
void postInstallSampleData (JDatabaseDriver $db)
setDatabaseCharset (line 840)

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

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

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

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

Inherited Methods

Inherited From JModelBase

 JModelBase::__construct()
 JModelBase::getState()
 JModelBase::loadState()
 JModelBase::setState()

Documentation generated on Tue, 19 Nov 2013 14:57:50 +0100 by phpDocumentor 1.4.3