コード例 #1
0
 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;
     }
 }
コード例 #2
0
 /**
  * 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;
 }
コード例 #3
0
 /**
  * Simple test to confirm the check doesnt break.
  */
 public function testCheckZip()
 {
     $this->assertNotNull(InstallUtil::checkZip());
 }