protected function checkService() { $zipInstalled = InstallUtil::checkZip(); if ($zipInstalled) { $this->message = Zurmo::t('InstallModule', 'Zip extension is loaded.'); return true; } else { $this->message = Zurmo::t('InstallModule', 'Zip extension is not loaded.'); return false; } }
/** * Check if PHP Zip extension is loaded. * @throws NotSupportedException * @return boolean */ protected static function checkIfZipExtensionIsLoaded() { $isZipExtensionInstalled = InstallUtil::checkZip(); if (!$isZipExtensionInstalled) { $message = Zurmo::t('Core', 'Zip PHP extension is required by upgrade process, please install it.'); throw new NotSupportedException($message); } return true; }
/** * Simple test to confirm the check doesnt break. */ public function testCheckZip() { $this->assertNotNull(InstallUtil::checkZip()); }