当前位置: 首页>>代码示例>>PHP>>正文


PHP Environment::get_phpboost_version方法代码示例

本文整理汇总了PHP中Environment::get_phpboost_version方法的典型用法代码示例。如果您正苦于以下问题:PHP Environment::get_phpboost_version方法的具体用法?PHP Environment::get_phpboost_version怎么用?PHP Environment::get_phpboost_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Environment的用法示例。


在下文中一共展示了Environment::get_phpboost_version方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load_apps

 /**
  * @desc Load Application Classes
  * @param $checks
  */
 private function load_apps($checks = CHECK_ALL_UPDATES)
 {
     if (ServerConfiguration::get_phpversion() > self::PHP_MIN_VERSION_UPDATES) {
         $user_locale = AppContext::get_current_user()->get_locale();
         if ($checks & CHECK_KERNEL) {
             // Add the kernel to the check list
             $this->apps[] = new Application('kernel', $user_locale, Application::KERNEL_TYPE, Environment::get_phpboost_version(), Updates::PHPBOOST_OFFICIAL_REPOSITORY);
         }
         if ($checks & CHECK_MODULES) {
             $activated_modules = ModulesManager::get_activated_modules_map_sorted_by_localized_name();
             foreach ($activated_modules as $module) {
                 $this->apps[] = new Application($module->get_id(), $user_locale, Application::MODULE_TYPE, $module->get_configuration()->get_version(), $module->get_configuration()->get_repository());
             }
         }
         if ($checks & CHECK_THEMES) {
             // Add Themes
             $activated_themes = ThemesManager::get_activated_themes_map();
             foreach ($activated_themes as $id => $value) {
                 $repository = $value->get_configuration()->get_repository();
                 if (!empty($repository)) {
                     $this->apps[] = new Application($id, $user_locale, Application::TEMPLATE_TYPE, $value->get_configuration()->get_version(), $repository);
                 }
             }
         }
     }
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:30,代码来源:Updates.class.php

示例2: build_form

 private function build_form()
 {
     $picture_yes = '<i class="fa fa-success fa-2x" title="' . LangLoader::get_message('yes', 'common') . '"></i>';
     $picture_no = '<i class="fa fa-error fa-2x" title="' . LangLoader::get_message('no', 'common') . '"></i>';
     $picture_unknown = '<i class="fa fa-question fa-2x" title="' . LangLoader::get_message('unknown', 'main') . '"></i>';
     $default_lang_config = LangsManager::get_lang(LangsManager::get_default_lang())->get_configuration();
     $default_theme_config = ThemesManager::get_theme(ThemesManager::get_default_theme())->get_configuration();
     $editors = AppContext::get_content_formatting_service()->get_available_editors();
     $default_editor = $editors[ContentFormattingConfig::load()->get_default_editor()];
     $server_configuration = new ServerConfiguration();
     $general_config = GeneralConfig::load();
     $server_environment_config = ServerEnvironmentConfig::load();
     $sessions_config = SessionsConfig::load();
     $maintenance_config = MaintenanceConfig::load();
     $url_rewriting_available = false;
     $url_rewriting_known = true;
     try {
         $url_rewriting_available = $server_configuration->has_url_rewriting();
     } catch (UnsupportedOperationException $ex) {
         $url_rewriting_known = false;
     }
     $summerization = "---------------------------------System report---------------------------------\n-----------------------------generated by PHPBoost-----------------------------\nSERVER CONFIGURATION-----------------------------------------------------------\nphp version\t\t\t: " . ServerConfiguration::get_phpversion() . "\ndbms version\t\t\t: " . PersistenceContext::get_dbms_utils()->get_dbms_version() . "\ngd library\t\t\t: " . (int) $server_configuration->has_gd_library() . "\nurl rewriting\t\t\t: " . ($url_rewriting_known ? (int) $url_rewriting_available : 'N/A') . "\napcu cache\t\t\t: " . (int) DataStoreFactory::is_apc_available() . "\nPHPBOOST CONFIGURATION---------------------------------------------------------\nphpboost version\t\t: " . Environment::get_phpboost_version() . "\nserver url\t\t\t: " . $general_config->get_site_url() . "\nsite path\t\t\t: " . $general_config->get_site_path() . "\ndefault theme\t\t\t: " . $default_theme_config->get_name() . " (" . LangLoader::get_message('version', 'admin') . " " . $default_theme_config->get_version() . ")\ndefault language\t\t: " . $default_lang_config->get_name() . "\ndefault editor\t\t\t: " . $default_editor . "\nhome page\t\t\t: " . Environment::get_home_page() . "\nurl rewriting\t\t\t: " . (int) $server_environment_config->is_url_rewriting_enabled() . "\napcu cache\t\t\t: " . (int) DataStoreFactory::is_apc_enabled() . "\noutput gzip\t\t\t: " . (int) $server_environment_config->is_output_gziping_enabled() . "\nsession cookie name\t\t: " . $sessions_config->get_cookie_name() . "\nsession duration\t\t: " . $sessions_config->get_session_duration() . "\nactive session duration\t\t: " . $sessions_config->get_active_session_duration() . "\nDIRECTORIES AUTHORIZATIONS-----------------------------------------------------\n";
     $form = new HTMLForm('system-report', '', false);
     $this->get_advises($form);
     $fieldset = new FormFieldsetHTML('report', $this->admin_lang['server']);
     $form->add_fieldset($fieldset);
     $fieldset->add_field(new FormFieldFree('php_version', $this->admin_lang['php_version'], ServerConfiguration::get_phpversion()));
     $fieldset->add_field(new FormFieldFree('dbms_version', $this->admin_lang['dbms_version'], PersistenceContext::get_dbms_utils()->get_dbms_version()));
     $fieldset->add_field(new FormFieldFree('gd_library', $this->admin_lang['gd_library'], $server_configuration->has_gd_library() ? $picture_yes : $picture_no));
     $fieldset->add_field(new FormFieldFree('url_rewriting', $this->admin_lang['url_rewriting'], $url_rewriting_known ? $url_rewriting_available ? $picture_yes : $picture_no : $picture_unknown));
     $fieldset->add_field(new FormFieldFree('apcu_cache', LangLoader::get_message('apcu_cache', 'admin-cache-common'), DataStoreFactory::is_apc_available() ? $picture_yes : $picture_no));
     $fieldset = new FormFieldsetHTML('report', $this->admin_lang['phpboost_config']);
     $form->add_fieldset($fieldset);
     $fieldset->add_field(new FormFieldFree('kernel_version', $this->admin_lang['kernel_version'], Environment::get_phpboost_version()));
     $fieldset->add_field(new FormFieldFree('site_url', LangLoader::get_message('advanced-config.site_url', 'admin-config-common'), $general_config->get_site_url()));
     $fieldset->add_field(new FormFieldFree('site_path', LangLoader::get_message('advanced-config.site_path', 'admin-config-common'), $general_config->get_site_path()));
     $fieldset->add_field(new FormFieldFree('default_theme', LangLoader::get_message('general-config.default_theme', 'admin-config-common'), $default_theme_config->get_name() . " (" . LangLoader::get_message('version', 'admin') . " " . $default_theme_config->get_version() . ")"));
     $fieldset->add_field(new FormFieldFree('default_language', LangLoader::get_message('general-config.default_language', 'admin-config-common'), $default_lang_config->get_name()));
     $fieldset->add_field(new FormFieldFree('default_editor', LangLoader::get_message('content.config.default-formatting-language', 'admin-contents-common'), $default_editor));
     $fieldset->add_field(new FormFieldFree('start_page', LangLoader::get_message('general-config.start_page', 'admin-config-common'), Environment::get_home_page()));
     $fieldset->add_field(new FormFieldFree('phpboost_url_rewriting', $this->admin_lang['url_rewriting'], $server_environment_config->is_url_rewriting_enabled() ? $picture_yes : $picture_no));
     $fieldset->add_field(new FormFieldFree('phpboost_apcu_cache', LangLoader::get_message('apcu_cache', 'admin-cache-common'), DataStoreFactory::is_apc_enabled() ? $picture_yes : $picture_no));
     $fieldset->add_field(new FormFieldFree('output_gz', $this->admin_lang['output_gz'], $server_environment_config->is_output_gziping_enabled() ? $picture_yes : $picture_no));
     $fieldset->add_field(new FormFieldFree('cookie_name', LangLoader::get_message('advanced-config.cookie-name', 'admin-config-common'), $sessions_config->get_cookie_name()));
     $fieldset->add_field(new FormFieldFree('session_length', LangLoader::get_message('advanced-config.cookie-duration', 'admin-config-common'), $sessions_config->get_session_duration()));
     $fieldset->add_field(new FormFieldFree('session_guest_length', LangLoader::get_message('advanced-config.active-session-duration', 'admin-config-common'), $sessions_config->get_active_session_duration()));
     $fieldset = new FormFieldsetHTML('directories_auth', $this->admin_lang['directories_auth']);
     $form->add_fieldset($fieldset);
     $directories_summerization = '';
     foreach (PHPBoostFoldersPermissions::get_permissions() as $key => $folder) {
         $fieldset->add_field(new FormFieldFree(str_replace('/', '_', $key), $key, $folder->is_writable() ? $picture_yes : $picture_no));
         $directories_summerization .= $key . str_repeat('	', 5 - strlen($key) / 8) . ": " . (int) $folder->is_writable() . "\n";
     }
     $fieldset = new FormFieldsetHTML('summerization', $this->admin_lang['system_report_summerization']);
     $form->add_fieldset($fieldset);
     $fieldset->add_field(new FormFieldLabel($this->admin_lang['system_report_summerization_explain']));
     $fieldset->add_field(new FormFieldMultiLineTextEditor('summerization', '', $summerization . $directories_summerization, array('rows' => 20, 'cols' => 15, 'class' => 'system-report')));
     $this->form = $form;
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:59,代码来源:AdminServerSystemReportController.class.php

示例3: ucwords

                    } else {
                        $stats_array[$name] = $array_info[1];
                    }
                } else {
                    if (isset($array_info[0])) {
                        $name = ucwords($key);
                        if (array_key_exists($name, $stats_array)) {
                            $stats_array[$name] = $stats_array[$name] + $array_info[0];
                        } else {
                            $stats_array[$name] = $array_info[0];
                        }
                    }
                }
            }
        }
        if ($robots_visits_number) {
            $Stats = new ImagesStats();
            $Stats->load_data($stats_array, 'ellipse');
            foreach ($Stats->data_stats as $key => $angle_value) {
                $array_color = $Stats->array_allocated_color[$Stats->image_color_allocate_dark(false, NO_ALLOCATE_COLOR)];
                $name = ucfirst($key);
                $tpl->assign_block_vars('list', array('COLOR' => 'RGB(' . $array_color[0] . ', ' . $array_color[1] . ', ' . $array_color[2] . ')', 'VIEWS' => NumberHelper::round($angle_value * $Stats->nbr_entry / 360, 0), 'PERCENT' => NumberHelper::round($angle_value / 3.6, 1), 'L_NAME' => $name == 'Other' ? $LANG['other'] : $name));
            }
        }
        $tpl->put_all(array('C_STATS_ROBOTS' => true, 'C_ROBOTS_DATA' => $robots_visits_number, 'L_ERASE_RAPPORT' => $LANG['erase_rapport'], 'L_ERASE' => $LANG['erase'], 'L_COLORS' => $LANG['colors'], 'L_VIEW_NUMBER' => $LANG['number_r_visit'], 'L_LAST_UPDATE' => $LANG['last_update']));
    } else {
        $tpl->put_all(array('C_STATS_SITE' => true, 'START' => GeneralConfig::load()->get_site_install_date()->format(Date::FORMAT_DAY_MONTH_YEAR), 'VERSION' => Environment::get_phpboost_version(), 'BUILD' => GeneralConfig::load()->get_phpboost_major_version(), 'L_START' => $LANG['start'], 'L_KERNEL_VERSION' => $LANG['kernel_version']));
    }
    $tpl->display();
}
require_once '../admin/admin_footer.php';
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:31,代码来源:admin_stats.php

示例4: check_compatibility

 /**
  * @desc Checks compatibility with limits
  * @return boolean TRUE if compatible FALSE if not
  */
 public function check_compatibility()
 {
     $current_version = $this->get_installed_version();
     if ($current_version == '0') {
         return false;
     }
     $phpboost_version = Environment::get_phpboost_version();
     return version_compare($current_version, $this->get_version(), '<') > 0 && ($phpboost_version >= $this->compatibility_min && ($this->compatibility_max == null || $phpboost_version <= $this->compatibility_max && $this->compatibility_max >= $this->compatibility_min));
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:13,代码来源:Application.class.php


注:本文中的Environment::get_phpboost_version方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。