Piwik\Plugins\CoreUpdater\CoreUpdater::updateComponents PHP Method

updateComponents() public static method

Deprecation:
public static updateComponents ( Updater $updater, $componentsWithUpdateFile )
$updater Piwik\Updater
    public static function updateComponents(PiwikCoreUpdater $updater, $componentsWithUpdateFile)
    {
        return $updater->updateComponents($componentsWithUpdateFile);
    }

Usage Example

 private static function updateDatabase()
 {
     $updater = new Updater();
     $componentsWithUpdateFile = CoreUpdater::getComponentUpdates($updater);
     if (empty($componentsWithUpdateFile)) {
         throw new \Exception("Failed to update pre-2.0 database (nothing to update).");
     }
     $result = CoreUpdater::updateComponents($updater, $componentsWithUpdateFile);
     if (!empty($result['coreError']) && !empty($result['warnings']) && !empty($result['errors'])) {
         throw new \Exception("Failed to update pre-2.0 database (errors or warnings found): " . print_r($result, true));
     }
 }
All Usage Examples Of Piwik\Plugins\CoreUpdater\CoreUpdater::updateComponents