本文整理汇总了PHP中Setup::install方法的典型用法代码示例。如果您正苦于以下问题:PHP Setup::install方法的具体用法?PHP Setup::install怎么用?PHP Setup::install使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setup
的用法示例。
在下文中一共展示了Setup::install方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: database
public function database(\Base $f3)
{
$this->response->data['SUBPART'] = 'settings_database.html';
$cfg = \Config::instance();
if ($f3->get('VERB') == 'POST' && $f3->exists('POST.active_db')) {
$type = $f3->get('POST.active_db');
$cfg->{'DB_' . $type} = $f3->get('POST.DB_' . $type);
$cfg->ACTIVE_DB = $type;
$cfg->save();
\Flash::instance()->addMessage('Config saved', 'success');
$setup = new \Setup();
$setup->install($type);
// logout
$f3->clear('SESSION.user_id');
}
$cfg->copyto('POST');
$f3->set('JIG_format', array('JSON', 'Serialized'));
}
示例2: getInstall
/**
* Shows the installation screen
*
* @param string $method
* @param string $action
* @return \Illuminate\Support\Facades\View
*/
public function getInstall($method = 'web', $action = '')
{
// Installation 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'), 'unstable' => System::updated() > 0);
return View::make("setup/install/stage{$stage}", $data);
case 'ajax':
return Setup::install($action);
case 'error':
return View::make('setup/error');
default:
App::abort(404);
// Not found
}
}
示例3: showInstall
/**
* Shows the install screen
*/
public static function showInstall()
{
$error = Setup::install();
if ($error == '') {
$txt = 'ownCloud is now installed';
Setup::showContent('Success', $txt, 3);
} else {
$txt = 'ownCloud is NOT installed<br />' . $error;
Setup::showContent('Error', $txt);
}
}