class ReplicationGui (View source)

Functions for the replication GUI

Methods

__construct(Replication $replication, Template $template)

No description

string
getHtmlForErrorMessage()

returns HTML for error message

string
getHtmlForPrimaryReplication(string|null $connection, bool $hasReplicaClearScreen, string|null $primaryAddUser, string|null $username, string|null $hostname)

returns HTML for primary replication

string
getHtmlForPrimaryConfiguration()

returns HTML for primary replication configuration

string
getHtmlForReplicaConfiguration(string|null $connection, bool $serverReplicaStatus, array $serverReplicaReplication, bool $replicaConfigure)

returns HTML for replica replication configuration

string
getHtmlForReplicationDbMultibox()

returns HTML code for selecting databases

string
getHtmlForReplicationChangePrimary(string $submitName)

returns HTML for changing primary

string
getHtmlForReplicationStatusTable(string|null $connection, string $type, bool $isHidden = false, bool $hasTitle = true)

This function returns html code for table with replication status.

array
getUsernameHostnameLength()

get the correct username and hostname lengths for this MySQL server

string
getHtmlForReplicationPrimaryAddReplicaUser(string|null $postUsername, string|null $hostname)

returns html code to add a replication replica user to the primary

void
handleControlRequest(bool $srTakeAction, bool $replicaChangePrimary, bool $srReplicaServerControl, string|null $srReplicaAction, bool $srReplicaSkipError, int $srSkipErrorsCount, string|null $srReplicaControlParam, string $username, string $pmaPassword, string $hostname, int $port)

handle control requests

bool
handleRequestForReplicaChangePrimary(string $username, string $pmaPassword, string $hostname, int $port)

No description

bool
handleRequestForReplicaServerControl(string|null $srReplicaAction, string|null $control)

No description

bool
handleRequestForReplicaSkipError(int $srSkipErrorsCount)

No description

Details

__construct(Replication $replication, Template $template)

No description

Parameters

Replication $replication
Template $template

string getHtmlForErrorMessage()

returns HTML for error message

Return Value

string

HTML code

string getHtmlForPrimaryReplication(string|null $connection, bool $hasReplicaClearScreen, string|null $primaryAddUser, string|null $username, string|null $hostname)

returns HTML for primary replication

Parameters

string|null $connection
bool $hasReplicaClearScreen
string|null $primaryAddUser
string|null $username
string|null $hostname

Return Value

string

HTML code

string getHtmlForPrimaryConfiguration()

returns HTML for primary replication configuration

Return Value

string

HTML code

string getHtmlForReplicaConfiguration(string|null $connection, bool $serverReplicaStatus, array $serverReplicaReplication, bool $replicaConfigure)

returns HTML for replica replication configuration

Parameters

string|null $connection

Primary connection

bool $serverReplicaStatus

Whether it is Primary or Replica

array $serverReplicaReplication

Replica replication

bool $replicaConfigure

Replica configure

Return Value

string

HTML code

string getHtmlForReplicationDbMultibox()

returns HTML code for selecting databases

Return Value

string

HTML code

string getHtmlForReplicationChangePrimary(string $submitName)

returns HTML for changing primary

Parameters

string $submitName

submit button name

Return Value

string

HTML code

string getHtmlForReplicationStatusTable(string|null $connection, string $type, bool $isHidden = false, bool $hasTitle = true)

This function returns html code for table with replication status.

Parameters

string|null $connection

primary connection

string $type

either primary or replica

bool $isHidden

if true, then default style is set to hidden, default value false

bool $hasTitle

if true, then title is displayed, default true

Return Value

string

HTML code

array getUsernameHostnameLength()

get the correct username and hostname lengths for this MySQL server

Return Value

array

username length, hostname length

string getHtmlForReplicationPrimaryAddReplicaUser(string|null $postUsername, string|null $hostname)

returns html code to add a replication replica user to the primary

Parameters

string|null $postUsername
string|null $hostname

Return Value

string

HTML code

void handleControlRequest(bool $srTakeAction, bool $replicaChangePrimary, bool $srReplicaServerControl, string|null $srReplicaAction, bool $srReplicaSkipError, int $srSkipErrorsCount, string|null $srReplicaControlParam, string $username, string $pmaPassword, string $hostname, int $port)

handle control requests

Parameters

bool $srTakeAction
bool $replicaChangePrimary
bool $srReplicaServerControl
string|null $srReplicaAction
bool $srReplicaSkipError
int $srSkipErrorsCount
string|null $srReplicaControlParam
string $username
string $pmaPassword
string $hostname
int $port

Return Value

void

bool handleRequestForReplicaChangePrimary(string $username, string $pmaPassword, string $hostname, int $port)

No description

Parameters

string $username
string $pmaPassword
string $hostname
int $port

Return Value

bool

bool handleRequestForReplicaServerControl(string|null $srReplicaAction, string|null $control)

No description

Parameters

string|null $srReplicaAction
string|null $control

Return Value

bool

bool handleRequestForReplicaSkipError(int $srSkipErrorsCount)

No description

Parameters

int $srSkipErrorsCount

Return Value

bool