本文整理汇总了PHP中Setup::setUseDevelopmentEnvironment方法的典型用法代码示例。如果您正苦于以下问题:PHP Setup::setUseDevelopmentEnvironment方法的具体用法?PHP Setup::setUseDevelopmentEnvironment怎么用?PHP Setup::setUseDevelopmentEnvironment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Setup
的用法示例。
在下文中一共展示了Setup::setUseDevelopmentEnvironment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parseStringFromWebVar
*
* @param mixed $index The index of the POST var to parse.
* @return mixed String of value if value is set, null otherwise.
*/
function parseStringFromWebVar($index)
{
if (array_key_exists($index, $_POST) && isset($_POST[$index])) {
return (string) $_POST[$index];
}
return null;
}
$setup = new Setup();
$setup->setCreateDatabase(parseBoolFromWebVar('createdb'));
$setup->setUseRealKrb(parseBoolFromWebVar('realKrb'));
$setup->setSetupTempFolders(parseBoolFromWebVar('setuptmpfolders'));
$setup->setUseDevelopmentEnvironment(parseBoolFromWebVar('usedevelopmentenv'));
$setup->setUserInfo(parseStringFromWebVar('firstname'), parseStringFromWebVar('surname'), parseStringFromWebVar('username'), parseStringFromWebVar('email'));
?>
<?php
require './header.html';
?>
<p class="results">
<?php
$setup->run();
?>
<ul class="actions">
<li>
<a href="../../../" class="positive">Go to HMS</a>
</li>
示例2: return
return (string) $array[$index];
}
return null;
}
$shortopts = '';
$shortopts .= 'd';
// If present, create the database
$shortopts .= 'h:';
// Users handle
$shortopts .= 'n:';
// Users firstname
$shortopts .= 's:';
// Users surname
$shortopts .= 'e:';
// Users e-mail
$shortopts .= 'f';
// If present, set-up the tmp folders
$shortopts .= 'v';
// If present, use development configs, settings and databases
$options = getopt($shortopts);
if (is_array($options)) {
$setup = new Setup();
$setup->setCreateDatabase(parseBoolFromArray('d', $options));
$setup->setSetupTempFolders(parseBoolFromArray('f', $options));
$setup->setUseDevelopmentEnvironment(parseBoolFromArray('v', $options));
$setup->setUserInfo(parseStringFromArray('n', $options), parseStringFromArray('s', $options), parseStringFromArray('h', $options), parseStringFromArray('e', $options));
$setup->run();
} else {
echo 'Unable to parse options\\n';
exit(1);
}