PHP Класс Piwik\Updates

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
deletePluginFromConfigFile ( $pluginToDelete )
disableMaintenanceMode ( ) Helper method to disable maintenance mode after large updates.
doUpdate ( Updater $updater ) Perform the incremental version update.
enableMaintenanceMode ( ) Enables maintenance mode. Should be used for updates where Piwik will be unavailable for a large amount of time.
getMigrationQueries ( Updater $updater ) : array Return SQL to be executed in this update.
getMigrations ( Updater $updater ) : Migration[] Return migrations to be executed in this update.
getSql ( )
isMajorUpdate ( ) : boolean Tell the updater that this is a major update.
update ( )

Описание методов

deletePluginFromConfigFile() публичный статический Метод

public static deletePluginFromConfigFile ( $pluginToDelete )

disableMaintenanceMode() публичный статический Метод

Helper method to disable maintenance mode after large updates.
public static disableMaintenanceMode ( )

doUpdate() публичный Метод

This method should preform all updating logic. If you define migrations in an overridden getMigrations() method, you must call {@link Updater::executeMigrations()} here. See {@link \Piwik\Plugins\ExamplePlugin\Updates\Updates_0_0_2} for an example.
public doUpdate ( Updater $updater )
$updater Updater

enableMaintenanceMode() публичный статический Метод

Enables maintenance mode. Should be used for updates where Piwik will be unavailable for a large amount of time.
public static enableMaintenanceMode ( )

getMigrationQueries() публичный Метод

Return SQL to be executed in this update.
Устаревший: since Piwik 3.0.0, implement {@link getMigrations()} instead. Will be removed in Piwik 4.0.0
public getMigrationQueries ( Updater $updater ) : array
$updater Updater
Результат array

getMigrations() публичный Метод

Migrations should be defined here, instead of in doUpdate(), since this method is used to display a preview of which migrations and database queries an update will run. If you execute migrations directly in doUpdate(), they won't be displayed to the user.
public getMigrations ( Updater $updater ) : Migration[]
$updater Updater
Результат Piwik\Updater\Migration[]

getSql() публичный статический Метод

Устаревший: since v2.12.0 use getMigrationQueries() instead. Will be removed in Piwik 4.0.0
public static getSql ( )

isMajorUpdate() публичный статический Метод

Leads to a more visible notice. NOTE to release manager: Remember to mention in the Changelog that this update contains major DB upgrades and will take some time!
public static isMajorUpdate ( ) : boolean
Результат boolean

update() публичный статический Метод

Устаревший: since v2.12.0 use doUpdate() instead. Will be removed in Piwik 4.0.0
public static update ( )