本文整理匯總了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);
}
}