[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/database/src/ -> DatabaseImporter.php (summary)

Part of the Joomla Framework Database Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 383 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 12 functions

  __construct()
  asXml()
  from()
  getAddColumnSql()
  getChangeColumnSql()
  getDropColumnSql()
  getKeyLookup()
  getRealTableName()
  importData()
  mergeStructure()
  setDbo()
  withStructure()

Functions
Functions that are not part of a class:

__construct()   X-Ref
Constructor.

Sets up the default options for the importer.


asXml()   X-Ref
Set the output option for the importer to XML format.

return: $this

from($from)   X-Ref
Specifies the data source to import.

param: \SimpleXMLElement|string  $from  The data source to import, either as a SimpleXMLElement object or XML string.
return: $this

getAddColumnSql($table, \SimpleXMLElement $field)   X-Ref
Get the SQL syntax to add a column.

param: string             $table  The table name.
param: \SimpleXMLElement  $field  The XML field definition.
return: string

getChangeColumnSql($table, \SimpleXMLElement $field)   X-Ref
Get the syntax to alter a column.

param: string             $table  The name of the database table to alter.
param: \SimpleXMLElement  $field  The XML definition for the field.
return: string

getDropColumnSql($table, $name)   X-Ref
Get the SQL syntax to drop a column.

param: string  $table  The table name.
param: string  $name   The name of the field to drop.
return: string

getKeyLookup($keys)   X-Ref
Get the details list of keys for a table.

param: array  $keys  An array of objects that comprise the keys for the table.
return: array  The lookup array. array({key name} => array(object, ...))

getRealTableName($table)   X-Ref
Get the real name of the table, converting the prefix wildcard string if present.

param: string  $table  The name of the table.
return: string    The real name of the table.

importData()   X-Ref
Import the data from the source into the existing tables.

return: void

mergeStructure()   X-Ref
Merges the incoming structure definition with the existing structure.

return: void

setDbo(DatabaseInterface $db)   X-Ref
Sets the database connector to use for exporting structure and/or data.

param: DatabaseInterface  $db  The database connector.
return: $this

withStructure($setting = true)   X-Ref
Sets an internal option to merge the structure based on the input data.

param: boolean  $setting  True to import the structure, false to not.
return: $this



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer