/** * Run the controller */ public function run() { // Check if shop has been installed $blnInstalled = \Database::getInstance()->tableExists(Config::getTable()); foreach (scan(TL_ROOT . '/system/modules/isotope/library/Isotope/Upgrade') as $strFile) { $strVersion = pathinfo($strFile, PATHINFO_FILENAME); if (preg_match('/To[0-9]{10}/', $strVersion)) { $strClass = 'Isotope\\Upgrade\\' . $strVersion; $strStep = 'Version ' . RepositoryVersion::format(substr($strVersion, 2)); try { $objUpgrade = new $strClass(); $objUpgrade->run($blnInstalled); } catch (\Exception $e) { $this->handleException($strStep, $e); } } } if ($blnInstalled) { try { $this->verifySystemIntegrity(); $this->purgeCaches(); } catch (\Exception $e) { $this->handleException('Finalization', $e); } } }
/** * @deprecated Deprecated since Haste 4.8, to be removed in Haste 5. * Use RepositoryVersion::format() instead. */ public static function repositoryVersion($aVersion) { return RepositoryVersion::format($aVersion); }
/** * @dataProvider versionProvider */ public function testFormat($expected, $input) { $this->assertEquals($expected, RepositoryVersion::format($input)); }