Documentation

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

$act  : bool
$parser  : PdbParser
$sync  : PdbSync

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

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>

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
inheritdoc
Return values
Pdb

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
throws
XMLException
Exception

sanityCheck()

public sanityCheck() : bool
Return values
bool

updateDatabase()

public updateDatabase([SyncActions|array<string|int, mixed>|null $do = null ]) : string
Parameters
$do : SyncActions|array<string|int, mixed>|null = null
Tags
throws
InvalidArgumentException
PDOException
QueryException
Return values
string
On this page

Search results