com_pubdbInstallerScript - JoomlaPubDB/PubDB GitHub Wiki
Summary:
Updates the database structure of the component
- No constants found
- public preflight()
- public install()
- public update()
- public uninstall()
- private installDb()
- private processTable()
- private existsTable()
- private generateCreateTableStatement()
- private generateColumnDeclaration()
- private getFieldType()
- private allowsLengthField()
- private executeFieldsUpdating()
- private processField()
- private addField()
- private existsField()
- private needsToUpdate()
- private generateChangeFieldStatement()
- private generateAddFieldStatement()
- private installPlugins()
- private isAlreadyInstalled()
- private installModules()
- private uninstallPlugins()
- private uninstallModules()
- File: script.php
- Package: Com_Pubdb
- Class Hierarchy:
- \com_pubdbInstallerScript
Tag | Version | Description |
---|---|---|
version | Release: 0.2b | |
author | Component Creator [email protected] | |
since | 0.1b |
public preflight(string $type, mixed $parent) : boolean
Summary
Method called before install/update the component. Note: This method won't be called during uninstall process.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$type | Type of process [install |
mixed |
$parent | Object who called this method |
Type | Description |
---|---|
\Exception |
Returns: boolean - True if the process should continue, false otherwise
public install(mixed $parent) : void
Summary
Method to install the component
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called this method. |
Returns: void
Tag | Version | Description |
---|---|---|
since | 0.2b |
public update(mixed $parent) : void
Summary
Method to update the component
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called this method. |
Returns: void
public uninstall(mixed $parent) : void
Summary
Method to uninstall the component
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called this method. |
Returns: void
private installDb(mixed $parent) : void
Summary
Method to update the DB of the component
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who started the upgrading process |
Type | Description |
---|---|
\Exception |
Returns: void
Tag | Version | Description |
---|---|---|
since | 0.2b |
private processTable(\JApplicationCms $app, \SimpleXMLElement $table) : void
Summary
Process a table
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
\JApplicationCms |
$app | Application object |
\SimpleXMLElement |
$table | Table to process |
Returns: void
Tag | Version | Description |
---|---|---|
since | 0.2b |
private existsTable(string $table_name) : boolean
Summary
Checks if a certain exists on the current database
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$table_name | Name of the table |
Returns: boolean - True if it exists, false if it does not.
private generateCreateTableStatement(\SimpleXMLElement $table) : string
Summary
Generates a 'CREATE TABLE' statement for the tables passed by argument.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
\SimpleXMLElement |
$table | Table of the database |
Returns: string - 'CREATE TABLE' statement
private generateColumnDeclaration(\SimpleXMLElement $field) : string
Summary
Generate a column declaration
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
\SimpleXMLElement |
$field | Field data |
Returns: string - Column declaration
private getFieldType(\SimpleXMLElement $field) : mixed
Summary
Generates SQL field type of a field.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
\SimpleXMLElement |
$field | Field information |
Returns: mixed - SQL string data type, false on failure.
private allowsLengthField(string $field_type) : boolean
Summary
Check if a SQL type allows length values.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$field_type | SQL type |
Returns: boolean - True if it allows length values, false if it does not.
private executeFieldsUpdating(\JApplicationCms $app, \SimpleXMLElement $table) : void
Summary
Updates all the fields related to a table.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
\JApplicationCms |
$app | Application Object |
\SimpleXMLElement |
$table | Table information. |
Returns: void
private processField(\JApplicationCms $app, string $table_name, \SimpleXMLElement $field) : void
Summary
Process a certain field.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
\JApplicationCms |
$app | Application object |
string |
$table_name | The name of the table that contains the field. |
\SimpleXMLElement |
$field | Field Information. |
Returns: void
private addField(string $table_name, \SimpleXMLElement $field) : mixed
Summary
Add a field if it does not exists or modify it if it does.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$table_name | Table name |
\SimpleXMLElement |
$field | Field Information |
Returns: mixed - Constant on success(self::$MODIFIED | self::$NOT_MODIFIED), error message if an error occurred
private existsField(string $table_name, string $field_name) : boolean
Summary
Checks if a field exists on a table
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$table_name | Table name |
string |
$field_name | Field name |
Returns: boolean - True if exists, false if it do
private needsToUpdate(string $table_name, \SimpleXMLElement $field) : boolean
Summary
Check if a field needs to be updated.
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$table_name | Table name |
\SimpleXMLElement |
$field | Field information |
Returns: boolean - True if the field has to be updated, false otherwise
private generateChangeFieldStatement(string $table_name, \SimpleXMLElement $field) : string
Summary
Generates an change column statement
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$table_name | Table name |
\SimpleXMLElement |
$field | Field Information |
Returns: string - Change column statement
private generateAddFieldStatement(string $table_name, \SimpleXMLElement $field) : string
Summary
Generates an add column statement
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$table_name | Table name |
\SimpleXMLElement |
$field | Field Information |
Returns: string - Add column statement
private installPlugins(mixed $parent) : void
Summary
Installs plugins for this component
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called the install/update method |
Returns: void
private isAlreadyInstalled(string $type, string $name, mixed $folder = null) : boolean
Summary
Check if an extension is already installed in the system
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
string |
$type | Extension type |
string |
$name | Extension name |
mixed |
$folder | Extension folder(for plugins) |
Returns: boolean
private installModules(mixed $parent) : void
Summary
Installs plugins for this component
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called the install/update method |
Returns: void
private uninstallPlugins(mixed $parent) : void
Summary
Uninstalls plugins
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called the uninstall method |
Returns: void
private uninstallModules(mixed $parent) : void
Summary
Uninstalls plugins
Details:
- Inherited From: \com_pubdbInstallerScript
Type | Name | Description |
---|---|---|
mixed |
$parent | Object who called the uninstall method |
Returns: void
This document was automatically generated from source code comments on 2020-07-13 using phpDocumentor and fr3nch13/phpdoc-markdown