Méthode | Description | |
---|---|---|
checkDatabaseVersion ( ) | Checks the database server version against the required minimum version. | |
createAnonymousUser ( ) | Creates an entry in the User table for the "anonymous" user. | |
createDatabase ( string | null $dbName = null ) | Create database | |
createTable ( string $nameWithoutPrefix, string $createDefinition ) | Creates a new table in the database. | |
createTables ( ) | Create all tables | |
deleteArchiveTables ( ) | Deletes archive tables. For use in tests. | |
disconnectDatabase ( ) | Disconnect from database | |
dropDatabase ( $dbName = null ) | Drop database, used in tests | |
getTableColumns ( string $tableName ) : array | Get list of installed columns in a table | |
getTableCreateSql ( string $tableName ) : string | Get the SQL to create a specific Piwik table | |
getTablesCreateSql ( ) : array | Get the SQL to create Piwik tables | |
getTablesInstalled ( boolean $forceReload = true ) : array | Get list of tables installed | |
isDatabaseConnectionUTF8 ( ) : boolean | Check database connection character set is utf8. | |
isInstalled ( ) : boolean | Returns true if Piwik is installed | |
isValidDbname ( string $dbname ) : boolean | Returns true if the string is a valid database name for MySQL. MySQL allows + in the database names. | |
truncateAllTables ( ) | Truncate all tables |
public static checkDatabaseVersion ( ) |
public static createAnonymousUser ( ) |
public static createDatabase ( string | null $dbName = null ) | ||
$dbName | string | null |
public static createTable ( string $nameWithoutPrefix, string $createDefinition ) | ||
$nameWithoutPrefix | string | The name of the table without any piwik prefix. |
$createDefinition | string | The table create definition |
public static deleteArchiveTables ( ) |
public static disconnectDatabase ( ) |
public static dropDatabase ( $dbName = null ) |
public static getTableColumns ( string $tableName ) : array | ||
$tableName | string | The name of a table. |
Résultat | array | Installed columns indexed by the column name. |
public static getTableCreateSql ( string $tableName ) : string | ||
$tableName | string | Unprefixed table name. |
Résultat | string | SQL |
public static getTablesCreateSql ( ) : array | ||
Résultat | array | array of strings containing SQL |
public static getTablesInstalled ( boolean $forceReload = true ) : array | ||
$forceReload | boolean | Invalidate cache |
Résultat | array | Tables installed |
public static isDatabaseConnectionUTF8 ( ) : boolean | ||
Résultat | boolean | True if it is (or doesn't matter); false otherwise |
public static isInstalled ( ) : boolean | ||
Résultat | boolean | True if installed; false otherwise |
public static isValidDbname ( string $dbname ) : boolean | ||
$dbname | string | |
Résultat | boolean |