DatabaseSync
extends DatabaseSync
in package
Provides a system for syncing a database to a database definition.
The database definition is stored in one or more XML files, which get merged together before the sync is done. Contains code that may be MySQL specific.
Table of Contents
Properties
Methods
- __construct() : mixed
- Initial loading + set up.
- checkConnPermissions() : true|array<string|int, string>
- getErrors() : mixed
- getErrorsHtml() : mixed
- getLoadErrorsHtml() : string
- Return HTML of the load or sanity check errors
- getPdb() : Pdb
- The pdb connection instance.
- hasLoadErrors() : mixed
- loadStandardXmlFiles() : mixed
- Load the db_struct.xml from core and from all modules
- loadXml() : void
- sanityCheck() : bool
- updateDatabase() : string
Properties
$act
public
bool
$act
$parser
public
PdbParser
$parser
$sync
public
PdbSync
$sync
Methods
__construct()
Initial loading + set up.
public
__construct(bool $act) : mixed
Parameters
- $act : bool
-
If queries should be executed, false for a dry-run.
checkConnPermissions()
public
checkConnPermissions() : true|array<string|int, string>
Return values
true|array<string|int, string>getErrors()
public
getErrors() : mixed
getErrorsHtml()
public
getErrorsHtml() : mixed
getLoadErrorsHtml()
Return HTML of the load or sanity check errors
public
getLoadErrorsHtml() : string
Return values
string —HTML
getPdb()
The pdb connection instance.
public
static getPdb() : Pdb
Tags
Return values
PdbhasLoadErrors()
public
hasLoadErrors() : mixed
loadStandardXmlFiles()
Load the db_struct.xml from core and from all modules
public
loadStandardXmlFiles() : mixed
loadXml()
public
loadXml(string|DOMDocument $dom) : void
Parameters
- $dom : string|DOMDocument
Tags
sanityCheck()
public
sanityCheck() : bool
Return values
boolupdateDatabase()
public
updateDatabase([SyncActions|array<string|int, mixed>|null $do = null ]) : string
Parameters
- $do : SyncActions|array<string|int, mixed>|null = null