JDatabaseImporter

Joomla Platform Database Importer Class

abstract
since

12.1

package

Joomla.Platform

Methods

__construct

Constructor.

__construct() 

Sets up the default options for the exporter.

since

13.1

asXml

Set the output option for the exporter to XML format.

asXml() : \JDatabaseImporter
since

13.1

Response

\JDatabaseImporterMethod supports chaining.

check

Checks if all data and options are in order prior to exporting.

check() : \JDatabaseImporter
abstract
since

13.1

throws

\Exceptionif an error is encountered.

Response

\JDatabaseImporterMethod supports chaining.

from

Specifies the data source to import.

from(mixed $from) : \JDatabaseImporter
since

13.1

Arguments

$from

mixedThe data source to import.

Response

\JDatabaseImporterMethod supports chaining.

getDropColumnSql

Get the SQL syntax to drop a column.

getDropColumnSql(string $table, string $name) : string
since

13.1

Arguments

$table

stringThe table name.

$name

stringThe name of the field to drop.

Response

string

getRealTableName

Get the real name of the table, converting the prefix wildcard string if present.

getRealTableName(string $table) : string
since

13.1

Arguments

$table

stringThe name of the table.

Response

stringThe real name of the table.

mergeStructure

Merges the incoming structure definition with the existing structure.

mergeStructure() : void
note

Currently only supports XML format.

since

13.1

throws

\RuntimeExceptionon error.

setDbo

Sets the database connector to use for exporting structure and/or data.

setDbo(\JDatabaseDriver $db) : \JDatabaseImporter
since

13.1

Arguments

$db

\JDatabaseDriverThe database connector.

Response

\JDatabaseImporterMethod supports chaining.

withStructure

Sets an internal option to merge the structure based on the input data.

withStructure(boolean $setting = true) : \JDatabaseImporter
since

13.1

Arguments

$setting

booleanTrue to export the structure, false to not.

Response

\JDatabaseImporterMethod supports chaining.

Properties

cache

An array of cached data.

Type(s)

array

db

The database connector to use for exporting structure and/or data.

from

The input source.

Type(s)

mixed

asFormat

The type of input format (XML).

Type(s)

string

options

An array of options for the exporter.

Type(s)

object