class Manager (View source)

Properties

protected DatabaseManager $databaseManager
protected Resolver $resolver
protected Filesystem $fileSystem

Methods

__construct(DatabaseManager $databaseManager, Resolver $resolver, Filesystem $fileSystem)

No description

apply(string $characterSet, string $collation, string $connectionName = '', string $environment = '', callable $messageCallback = null, ErrorList $warnings = null)

Apply the character set and collation to a connection.

convertTables(Connection $connection, string $characterSet, string $collation, callable $messageCallback, ErrorList $warnings = null)

Convert all the database tables a specific character set/collation combination.

bool
convertTable(Connection $connection, string $tableName, string $characterSet, string $collation)

Convert a table to a specific character set/collation combination.

persistConfiguration(string $connectionName, string $environment, string $characterSet, string $collation)

Persist the character set/collation configuration for a specific connection.

getRepository(string $environment)

No description

Details

__construct(DatabaseManager $databaseManager, Resolver $resolver, Filesystem $fileSystem)

No description

Parameters

DatabaseManager $databaseManager
Resolver $resolver
Filesystem $fileSystem

apply(string $characterSet, string $collation, string $connectionName = '', string $environment = '', callable $messageCallback = null, ErrorList $warnings = null)

Apply the character set and collation to a connection.

Parameters

string $characterSet

the character set to be applied (if empty, we'll derive it from the collation)

string $collation

the collation to be applied (if empty, we'll use the character set default one)

string $connectionName

the name of the connection (if empty, we'll use the default connection)

string $environment
callable $messageCallback

a callback function that will receive progress messages

ErrorList $warnings

if specified, conversion errors will be added to this ErrorList

Exceptions

Exception

protected convertTables(Connection $connection, string $characterSet, string $collation, callable $messageCallback, ErrorList $warnings = null)

Convert all the database tables a specific character set/collation combination.

Parameters

Connection $connection
string $characterSet
string $collation
callable $messageCallback

a callback function that will receive progress messages

ErrorList $warnings

Exceptions

Exception

protected bool convertTable(Connection $connection, string $tableName, string $characterSet, string $collation)

Convert a table to a specific character set/collation combination.

Parameters

Connection $connection
string $tableName
string $characterSet
string $collation

Return Value

bool

true: table updated, false: table already up-to-date

Exceptions

Exception

protected persistConfiguration(string $connectionName, string $environment, string $characterSet, string $collation)

Persist the character set/collation configuration for a specific connection.

Parameters

string $connectionName
string $environment
string $characterSet
string $collation

private Repository getRepository(string $environment)

No description

Parameters

string $environment

Return Value

Repository