PHP Class Piwik\Updater\UpdateObserver

ファイルを表示 Open project: piwik/piwik

Public Methods

Method Description
onComponentUpdateFileFinished ( string $componentName, string $file, string $updateClassName, string $version ) Executed after the update method of an Updates class is successfully executed.
onComponentUpdateFileStarting ( string $componentName, string $file, string $updateClassName, string $version ) Executed before the update method of an Updates class is executed.
onComponentUpdateFinished ( string $name, string $version, string[] $warnings ) Executed after a component has been successfully updated.
onComponentUpdateStarting ( string $name ) Executed when a component is about to be updated. At this point, no SQL queries or other updating logic has been executed.
onError ( string $componentName, string $version, Exception $exception ) Executed when an error occurs during the update process. An error occurs when an Updates file throws a UpdaterErrorException.
onFinishedExecutingMigration ( string $updateFile, Migration $migration ) Executed after a migration is executed.
onStartExecutingMigration ( string $updateFile, Migration $migration ) Executed before a migration is executed.
onWarning ( string $componentName, string $version, Exception $exception ) Executed when a warning occurs during the update process. A warning occurs when an Updates file throws an exception that is not a UpdaterErrorException.

Method Details

onComponentUpdateFileFinished() public method

Executed after the update method of an Updates class is successfully executed.
public onComponentUpdateFileFinished ( string $componentName, string $file, string $updateClassName, string $version )
$componentName string The name of the component being updated.
$file string The path to the Updates file being executed.
$updateClassName string The name of the Update class that should exist within the Update file.
$version string The version the Updates file belongs to.

onComponentUpdateFileStarting() public method

Executed before the update method of an Updates class is executed.
public onComponentUpdateFileStarting ( string $componentName, string $file, string $updateClassName, string $version )
$componentName string The name of the component being updated.
$file string The path to the Updates file being executed.
$updateClassName string The name of the Update class that should exist within the Update file.
$version string The version the Updates file belongs to.

onComponentUpdateFinished() public method

Executed after a component has been successfully updated.
public onComponentUpdateFinished ( string $name, string $version, string[] $warnings )
$name string The name of the component being updated.
$version string The version of the component that was updated.
$warnings string[] Any warnings that occurred during the component update process.

onComponentUpdateStarting() public method

Executed when a component is about to be updated. At this point, no SQL queries or other updating logic has been executed.
public onComponentUpdateStarting ( string $name )
$name string The name of the component being updated.

onError() public method

Executed when an error occurs during the update process. An error occurs when an Updates file throws a UpdaterErrorException.
public onError ( string $componentName, string $version, Exception $exception )
$componentName string The name of the component being updated.
$version string The version of the Updates file during which the error occurred.
$exception Exception The exception that generated the error.

onFinishedExecutingMigration() public method

Executed after a migration is executed.
public onFinishedExecutingMigration ( string $updateFile, Migration $migration )
$updateFile string The path to the Updates file being executed.
$migration Migration The migration that is about to be executed.

onStartExecutingMigration() public method

Executed before a migration is executed.
public onStartExecutingMigration ( string $updateFile, Migration $migration )
$updateFile string The path to the Updates file being executed.
$migration Migration The migration that is about to be executed.

onWarning() public method

Executed when a warning occurs during the update process. A warning occurs when an Updates file throws an exception that is not a UpdaterErrorException.
public onWarning ( string $componentName, string $version, Exception $exception )
$componentName string The name of the component being updated.
$version string The version of the Updates file during which the warning occurred.
$exception Exception The exception that generated the warning.