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


PHP Setup::messages方法代码示例

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


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

示例1: getUpdate

 /**
  * Shows the update screen
  *
  * @param  string  $method
  * @param  string  $action
  * @return \Illuminate\Support\Facades\View
  */
 public function getUpdate($method = 'web', $action = '')
 {
     // Updater stage
     $stage = Session::has('setup.stage') ? Session::get('setup.stage') : 1;
     // Output based on request method
     switch ($method) {
         case 'web':
             $data = array('error' => Session::get('messages.error'), 'success' => Session::get('messages.success'), 'version' => Session::get('setup.version'), 'versions' => Setup::updateVersions(), 'messages' => Setup::messages(), 'unstable' => System::updated() > 0);
             return View::make("setup/update/stage{$stage}", $data);
         case 'ajax':
             return Setup::update($action);
         case 'error':
             return View::make('setup/error');
         default:
             App::abort(404);
             // Not found
     }
 }
开发者ID:moises-silva,项目名称:sticky-notes,代码行数:25,代码来源:SetupController.php

示例2: app_path

    $configFile = app_path() . '/config/config.php';
    // Now we migrate the old config data
    if (File::exists($configFile)) {
        include $configFile;
        // Import site settings
        Site::config('general', array_map('html_entity_decode', array('title' => $site_name, 'copyright' => $site_copyright, 'googleApi' => $google_api_key)));
        // Import antispam settings
        Site::config('antispam', array_map('html_entity_decode', array('services' => $sg_services, 'phpKey' => $sg_php_key, 'phpDays' => $sg_php_days, 'phpScore' => $sg_php_score, 'phpType' => $sg_php_type, 'censor' => $sg_censor)));
        // Import authentication settings
        Site::config('auth', array_map('html_entity_decode', array('method' => $auth_method, 'ldapServer' => $ldap_server, 'ldapPort' => $ldap_port, 'ldapBaseDn' => $ldap_base_dn, 'ldapUid' => $ldap_uid, 'ldapFilter' => $ldap_filter, 'ldapUserDn' => $ldap_user_dn, 'ldapPassword' => $ldap_password)));
        // Import SMTP settings
        Site::config('mail', array_map('html_entity_decode', array('host' => $smtp_host, 'port' => $smtp_port, 'encryption' => $smtp_crypt, 'username' => $smtp_username, 'password' => $smtp_password, 'address' => $smtp_from)));
        // If auth method is LDAP, notify the user to set
        // an admin filter.
        if ($auth_method == 'ldap') {
            Setup::messages('0.4', Lang::get('setup.ldap_update_warn'));
        }
        // Remove the old config file
        File::delete($configFile);
    }
}), '1.0' => array(), '1.1' => array('closure' => function () {
    $config = Site::config('general');
    // Modify config values
    if (isset($config->googleApi)) {
        Site::config('services', array('googleApiKey' => $config->googleApi));
    }
}), '1.2' => array('newTables' => array('comments' => array((object) array('name' => 'id', 'type' => 'increments'), (object) array('name' => 'paste_id', 'type' => 'integer'), (object) array('name' => 'data', 'type' => 'text'), (object) array('name' => 'author', 'type' => 'string', 'length' => 50, 'nullable' => TRUE, 'default' => NULL), (object) array('name' => 'timestamp', 'type' => 'integer')))), '1.3' => array('newTables' => array('statistics' => array((object) array('name' => 'id', 'type' => 'increments'), (object) array('name' => 'date', 'type' => 'date'), (object) array('name' => 'web', 'type' => 'integer', 'default' => 0), (object) array('name' => 'api', 'type' => 'integer', 'default' => 0)))), '1.4' => array(), '1.5' => array(), '1.6' => array('modifyTables' => array('main' => array((object) array('name' => 'flagged', 'type' => 'boolean', 'default' => 0), (object) array('name' => 'attachment', 'type' => 'boolean', 'default' => 0)), 'users' => array((object) array('name' => 'remember_token', 'type' => 'string', 'length' => 60, 'default' => '')))), '1.7' => array('closure' => function () {
    $config = Site::config('general');
    // Modify config values
    if (isset($config->privateSite) and $config->privateSite) {
        Site::config('general', array('pasteVisibility' => 'private'));
开发者ID:carriercomm,项目名称:sticky-notes,代码行数:31,代码来源:schema.php


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