class Tracking (View source)

PhpMyAdmin\Tracking\Tracking class

Methods

__construct(SqlQueryForm $sqlQueryForm, Template $template, Relation $relation, DatabaseInterface $dbi, TrackingChecker $trackingChecker)

No description

bool
deleteTracking(string $dbName, string $tableName, string $version = '')

Removes all tracking data for a table or a version of a table

array
filter(array $data, array $filterUsers, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Filters tracking entries

ResultInterface|false
getListOfVersionsOfTable(string $db, string $table)

Function to get the list versions of the table

string
getHtmlForMainPage(string $db, string $table, array $urlParams, string $textDir)

Function to get html for main page parts that do not use $_REQUEST

int
getTableLastVersionNumber(ResultInterface $result)

Function to get the last version number of a table

string
getHtmlForTrackingReport(TrackedData $trackedData, array $urlParams, LogType $logType, array $filterUsers, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo, string $users)

Function to get html for tracking report and tracking report export

string
getHtmlForElementsOfTrackingReport(LogType $logType, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo, string $users)

Generate HTML element for report form

string
getHtmlForTrackingReportExportForm1(TrackedData $trackedData, array $urlParams, LogType $logType, array $filterUsers, string $htmlForElementsOfTrackingReport, string $dropImageOrText, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Generate HTML for export form

string
getHtmlForTrackingReportExportForm2(array $urlParams, string $htmlForElementsOfTrackingReport, LogType $logType, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo, string $users)

Generate HTML for export form

string
getHtmlForDataManipulationStatements(TrackedData $trackedData, array $filterUsers, array $urlParams, int $ddlogCount, string $dropImageOrText, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Function to get html for data manipulation statements

array
getHtmlForDataDefinitionStatements(TrackedData $trackedData, array $filterUsers, array $urlParams, string $dropImageOrText, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Function to get html for data definition statements in schema snapshot

string
getHtmlForSchemaSnapshot(string $db, string $table, string $version, array $params)

Function to get html for schema snapshot

getTrackedData(string $dbname, string $tablename, string $version)

Gets the record of a tracking job.

string
getHtmlForColumns(array $columns)

Function to get html for displaying columns in the schema snapshot

string
getHtmlForIndexes(array $indexes)

Function to get html for the indexes in schema snapshot

string
deleteFromTrackingReportLog(string $db, string $table, string $version, array $logData, TrackedDataType $trackedDataType, int $deleteId)

Function to delete from a tracking report log

bool
changeTrackingData(string $dbName, string $tableName, string $version, TrackedDataType $trackedDataType, array $newData)

Changes tracking data of a table.

string
exportAsSqlDump(array $entries)

Function to export as sql dump

void
exportAsSqlExecution(array $entries)

Function to export as sql execution

array
getDownloadInfoForExport(string $table, array $entries)

No description

string
changeTracking(string $db, string $table, string $version, string $action)

Function to activate or deactivate tracking

string
getTrackingSet()

Function to get tracking set

string
deleteTrackingVersion(string $db, string $table, string $version)

Deletes a tracking version

string
createTrackingVersion(string $db, string $table, string $version)

Function to create the tracking version

void
createTrackingForMultipleTables(string $db, array $selected, string $version)

Create tracking version for multiple tables

array
getEntries(TrackedData $trackedData, array $filterUsers, LogType $logType, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Function to get the entries

string
getHtmlForDbTrackingTables(string $db, array $urlParams, string $textDir)

Get HTML for tracked and untracked tables

Details

__construct(SqlQueryForm $sqlQueryForm, Template $template, Relation $relation, DatabaseInterface $dbi, TrackingChecker $trackingChecker)

No description

Parameters

SqlQueryForm $sqlQueryForm
Template $template
Relation $relation
DatabaseInterface $dbi
TrackingChecker $trackingChecker

bool deleteTracking(string $dbName, string $tableName, string $version = '')

Removes all tracking data for a table or a version of a table

Parameters

string $dbName

name of database

string $tableName

name of table

string $version version

Return Value

bool

array filter(array $data, array $filterUsers, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Filters tracking entries

Parameters

array $data
array $filterUsers users
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo

Return Value

array

filtered entries

ResultInterface|false getListOfVersionsOfTable(string $db, string $table)

Function to get the list versions of the table

Parameters

string $db
string $table

Return Value

ResultInterface|false

string getHtmlForMainPage(string $db, string $table, array $urlParams, string $textDir)

Function to get html for main page parts that do not use $_REQUEST

Parameters

string $db
string $table
array $urlParams

url parameters

string $textDir

text direction

Return Value

string

int getTableLastVersionNumber(ResultInterface $result)

Function to get the last version number of a table

Parameters

ResultInterface $result

Return Value

int

string getHtmlForTrackingReport(TrackedData $trackedData, array $urlParams, LogType $logType, array $filterUsers, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo, string $users)

Function to get html for tracking report and tracking report export

Parameters

TrackedData $trackedData data
array $urlParams

url params

LogType $logType
array $filterUsers

filter users

string $version
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo
string $users

Return Value

string

string getHtmlForElementsOfTrackingReport(LogType $logType, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo, string $users)

Generate HTML element for report form

Parameters

LogType $logType
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo
string $users

Return Value

string

string getHtmlForTrackingReportExportForm1(TrackedData $trackedData, array $urlParams, LogType $logType, array $filterUsers, string $htmlForElementsOfTrackingReport, string $dropImageOrText, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Generate HTML for export form

Parameters

TrackedData $trackedData data
array $urlParams

url params

LogType $logType
array $filterUsers

filter users

string $htmlForElementsOfTrackingReport
string $dropImageOrText

HTML for image or text

string $version
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo

Return Value

string

HTML for form

string getHtmlForTrackingReportExportForm2(array $urlParams, string $htmlForElementsOfTrackingReport, LogType $logType, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo, string $users)

Generate HTML for export form

Parameters

array $urlParams Parameters
string $htmlForElementsOfTrackingReport
LogType $logType
string $version
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo
string $users

Return Value

string

HTML for form

string getHtmlForDataManipulationStatements(TrackedData $trackedData, array $filterUsers, array $urlParams, int $ddlogCount, string $dropImageOrText, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Function to get html for data manipulation statements

Parameters

TrackedData $trackedData data
array $filterUsers

filter users

array $urlParams

url parameters

int $ddlogCount

data definition log count

string $dropImageOrText

drop image or text

string $version
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo

Return Value

string

array getHtmlForDataDefinitionStatements(TrackedData $trackedData, array $filterUsers, array $urlParams, string $dropImageOrText, string $version, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Function to get html for data definition statements in schema snapshot

Parameters

TrackedData $trackedData data
array $filterUsers

filter users

array $urlParams

url parameters

string $dropImageOrText

drop image or text

string $version
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo

Return Value

array

string getHtmlForSchemaSnapshot(string $db, string $table, string $version, array $params)

Function to get html for schema snapshot

Parameters

string $db
string $table
string $version
array $params

url parameters

Return Value

string

TrackedData getTrackedData(string $dbname, string $tablename, string $version)

Gets the record of a tracking job.

Parameters

string $dbname

name of database

string $tablename

name of table

string $version

version number

Return Value

TrackedData

string getHtmlForColumns(array $columns)

Function to get html for displaying columns in the schema snapshot

Parameters

array $columns columns

Return Value

string

string getHtmlForIndexes(array $indexes)

Function to get html for the indexes in schema snapshot

Parameters

array $indexes indexes

Return Value

string

string deleteFromTrackingReportLog(string $db, string $table, string $version, array $logData, TrackedDataType $trackedDataType, int $deleteId)

Function to delete from a tracking report log

Parameters

string $db
string $table
string $version
array $logData
TrackedDataType $trackedDataType
int $deleteId

Return Value

string

HTML for the message

bool changeTrackingData(string $dbName, string $tableName, string $version, TrackedDataType $trackedDataType, array $newData)

Changes tracking data of a table.

Parameters

string $dbName

name of database

string $tableName

name of table

string $version version
TrackedDataType $trackedDataType
array $newData

Return Value

bool

string exportAsSqlDump(array $entries)

Function to export as sql dump

Parameters

array $entries entries

Return Value

string

HTML SQL query form

void exportAsSqlExecution(array $entries)

Function to export as sql execution

Parameters

array $entries entries

Return Value

void

array getDownloadInfoForExport(string $table, array $entries)

No description

Parameters

string $table
array $entries

Return Value

array

string changeTracking(string $db, string $table, string $version, string $action)

Function to activate or deactivate tracking

Parameters

string $db
string $table
string $version
string $action activate|deactivate

Return Value

string

HTML for the success message

string getTrackingSet()

Function to get tracking set

Return Value

string

string deleteTrackingVersion(string $db, string $table, string $version)

Deletes a tracking version

Parameters

string $db
string $table
string $version

tracking version

Return Value

string

HTML of the success message

string createTrackingVersion(string $db, string $table, string $version)

Function to create the tracking version

Parameters

string $db
string $table
string $version

Return Value

string

HTML of the success message

void createTrackingForMultipleTables(string $db, array $selected, string $version)

Create tracking version for multiple tables

Parameters

string $db
array $selected

list of selected tables

string $version

Return Value

void

array getEntries(TrackedData $trackedData, array $filterUsers, LogType $logType, DateTimeImmutable $dateFrom, DateTimeImmutable $dateTo)

Function to get the entries

Parameters

TrackedData $trackedData
array $filterUsers

filter users

LogType $logType
DateTimeImmutable $dateFrom
DateTimeImmutable $dateTo

Return Value

array

string getHtmlForDbTrackingTables(string $db, array $urlParams, string $textDir)

Get HTML for tracked and untracked tables

Parameters

string $db

current database

array $urlParams

url parameters

string $textDir

text direction

Return Value

string HTML