當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Installer::checkDependency方法代碼示例

本文整理匯總了PHP中Installer::checkDependency方法的典型用法代碼示例。如果您正苦於以下問題:PHP Installer::checkDependency方法的具體用法?PHP Installer::checkDependency怎麽用?PHP Installer::checkDependency使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Installer的用法示例。


在下文中一共展示了Installer::checkDependency方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testInstallerCheckDependency

 public function testInstallerCheckDependency()
 {
     $dependency = Installer::checkDependency();
     $this->assertTrue($dependency['curl'], 'cURL is installed');
     $this->assertTrue($dependency['gd'], 'gd lib is installed');
     $this->assertTrue($dependency['pdo'], 'pdo lib is installed');
     $this->assertTrue($dependency['pdo_mysql'], 'pdo mysql lib is installed');
     $this->assertTrue($dependency['json'], 'json lib is installed');
     $this->assertTrue($dependency['hash'], 'hash lib is installed');
     $this->assertTrue($dependency['simplexml'], 'simplexml lib is installed');
 }
開發者ID:ravi-modria,項目名稱:ThinkUp,代碼行數:11,代碼來源:TestOfInstaller.php

示例2: step1

 /**
  * Step 1 - Check system requirements
  */
 private function step1()
 {
     $this->setViewTemplate('install.step1.tpl');
     // php version check
     $php_compat = false;
     if ($this->installer->checkVersion()) {
         $php_compat = true;
     }
     $this->addToView('php_compat', $php_compat);
     $requiredVersion = $this->installer->getRequiredVersion();
     $this->addToView('php_required_version', $requiredVersion['php']);
     // libs check
     if (isset($this->reqs)) {
         //testing only
         $libs = $this->installer->checkDependency($this->reqs);
     } else {
         $libs = $this->installer->checkDependency();
     }
     $libs_compat = true;
     foreach ($libs as $lib) {
         if (!$lib) {
             $libs_compat = false;
         }
     }
     $this->addToView('libs', $libs);
     // path permissions check
     $permissions = $this->installer->checkPermission();
     $this->addToView('permission', $permissions);
     $permissions_compat = true;
     foreach ($permissions as $perm) {
         if (!$perm) {
             $permissions_compat = false;
         }
     }
     $this->addToView('permissions_compat', $permissions_compat);
     $this->addToView('writable_data_directory', FileDataManager::getDataPath());
     // session save path permissions check
     $session_permissions_compat = $this->installer->isSessionDirectoryWritable();
     $this->addToView('session_permissions_compat', $session_permissions_compat);
     $this->addToView('writable_session_save_directory', ini_get('session.save_path'));
     // other vars set to view
     $requirements_met = $php_compat && $libs_compat && $permissions_compat && $session_permissions_compat;
     $this->addToView('requirements_met', $requirements_met);
     $this->addToView('subtitle', 'Check System Requirements');
     //If all requirements are met, go to step 2
     if ($requirements_met) {
         $this->addSuccessMessage("<strong>Great!</strong> Your system has everything it needs to run ThinkUp.", null, true);
         $this->step2();
     }
 }
開發者ID:jkuehl-carecloud,項目名稱:ThinkUp,代碼行數:53,代碼來源:class.InstallerController.php

示例3: step1

 /**
  * Step 1 - Check system requirements
  */
 private function step1()
 {
     $this->setViewTemplate('install.step1.tpl');
     // php version check
     $php_compat = false;
     if ($this->installer->checkVersion()) {
         $php_compat = true;
     }
     $this->addToView('php_compat', $php_compat);
     $requiredVersion = $this->installer->getRequiredVersion();
     $this->addToView('php_required_version', $requiredVersion['php']);
     // libs check
     if (isset($this->reqs)) {
         //testing only
         $libs = $this->installer->checkDependency($this->reqs);
     } else {
         $libs = $this->installer->checkDependency();
     }
     $libs_compat = true;
     foreach ($libs as $lib) {
         if (!$lib) {
             $libs_compat = false;
         }
     }
     $this->addToView('libs', $libs);
     // path permissions check
     $permissions = $this->installer->checkPermission();
     $this->addToView('permission', $permissions);
     $permissions_compat = true;
     foreach ($permissions as $perm) {
         if (!$perm) {
             $permissions_compat = false;
         }
     }
     $this->addToView('permissions_compat', $permissions_compat);
     $writeable_directories = array('compiled_view' => $this->view_mgr->compile_dir, 'cache' => $this->view_mgr->compile_dir . 'cache');
     $this->addToView('writeable_directories', $writeable_directories);
     // other vars set to view
     $requirements_met = $php_compat && $libs_compat && $permissions_compat;
     $this->addToView('requirements_met', $requirements_met);
     $this->addToView('subtitle', 'Check System Requirements');
     //If all requirements are met, go to step 2
     if ($requirements_met) {
         $this->addSuccessMessage("<strong>Great!</strong> Your system has everything it needs to run ThinkUp.", null, true);
         $this->step2();
     }
 }
開發者ID:randi2kewl,項目名稱:ThinkUp,代碼行數:50,代碼來源:class.InstallerController.php

示例4: step1

    /**
     * Step 1 - Check system requirements
     */
    private function step1() {
        $this->setViewTemplate('install.step1.tpl');

        // php version check
        $php_compat = 0;
        if ( $this->installer->checkVersion() ) {
            $php_compat = 1;
        }
        $this->addToView('php_compat', $php_compat);
        $requiredVersion = $this->installer->getRequiredVersion();
        $this->addToView('php_required_version', $requiredVersion['php']);

        // libs check
        $libs = $this->installer->checkDependency();
        $libs_compat = true;
        foreach ($libs as $lib) {
            if (!$lib) {
                $libs_compat = false;
            }
        }
        $this->addToView('libs', $libs);

        // path permissions check
        $permissions = $this->installer->checkPermission();
        $this->addToView('permission', $permissions);
        $permissions_compat = true;
        foreach ($permissions as $perm) {
            if (!$perm) {
                $permissions_compat = false;
            }
        }
        $this->addToView('permissions_compat', $permissions_compat);
        $writeable_directories = array(
            'compiled_view' => $this->view_mgr->compile_dir,
            'cache' => $this->view_mgr->compile_dir . 'cache');
        $this->addToView('writeable_directories', $writeable_directories);

        // other vars set to view
        $requirements_met = ($php_compat && $libs_compat && $permissions_compat);
        $this->addToView('requirements_met', $requirements_met);
        $this->addToView('subtitle', 'Check System Requirements');
    }
開發者ID:rkabir,項目名稱:ThinkUp,代碼行數:45,代碼來源:class.InstallerController.php

示例5: testInstallerCheckDependency

 public function testInstallerCheckDependency()
 {
     $dependency = Installer::checkDependency();
     $this->assertTrue($dependency['curl'], 'cURL is installed');
     $this->assertTrue($dependency['gd'], 'gd lib is installed');
 }
開發者ID:rayyan,項目名稱:ThinkUp,代碼行數:6,代碼來源:TestOfInstaller.php


注:本文中的Installer::checkDependency方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。