本文整理汇总了PHP中RedBean_OODBBean::setFlagBeautifulColumnNames方法的典型用法代码示例。如果您正苦于以下问题:PHP RedBean_OODBBean::setFlagBeautifulColumnNames方法的具体用法?PHP RedBean_OODBBean::setFlagBeautifulColumnNames怎么用?PHP RedBean_OODBBean::setFlagBeautifulColumnNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RedBean_OODBBean
的用法示例。
在下文中一共展示了RedBean_OODBBean::setFlagBeautifulColumnNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testKeywords
/**
* Test if RedBeanPHP can properly handle keywords.
*
* @return void
*/
public function testKeywords()
{
$keywords = array('anokeyword', 'znokeyword', 'group', 'DROP', 'inner', 'JOIN', 'select', 'table', 'int', 'cascade', 'float', 'CALL', 'in', 'status', 'order', 'limit', 'having', 'else', 'if', 'while', 'distinct', 'like');
R::setStrictTyping(FALSE);
RedBean_OODBBean::setFlagBeautifulColumnNames(FALSE);
foreach ($keywords as $k) {
R::nuke();
$bean = R::dispense($k);
$bean->{$k} = $k;
$id = R::store($bean);
$bean = R::load($k, $id);
$bean2 = R::dispense('other');
$bean2->name = $k;
$bean->bean = $bean2;
$bean->ownBean[] = $bean2;
$bean->sharedBean[] = $bean2;
$id = R::store($bean);
R::trash($bean);
pass();
}
RedBean_OODBBean::setFlagBeautifulColumnNames(TRUE);
R::setStrictTyping(TRUE);
}
示例2: array
$default_config['default_sql_limit'] = array(0, 25);
$default_config['rate_limit'] = 100;
$config = array_merge($default_config, $config);
if (file_exists('config.php.default') && $config['debug'] === false) {
die('Please remove the config.php.default.');
}
require_once 'utils.php';
/* make sure admin pass has changed */
if ($config['password'] === 'admin') {
die('Change the password in config.php');
}
/* setup database */
use RedBean_Facade as R;
R::setup($config['db_conn'], $config['db_user'], $config['db_pass']);
R::$writer->setUseCache(false);
RedBean_OODBBean::setFlagBeautifulColumnNames(false);
/* app start */
if ($config['debug'] === false) {
ini_set('display_errors', '0');
}
$app = new \Slim\Slim(array('debug' => $config['debug'], 'templates.path' => 'templates'));
/* Middlewares */
$r = new Util($app);
/* load hooks */
$r->loadHooks();
function API()
{
$app = \Slim\Slim::getInstance();
$app->view(new \JsonApiView());
$app->add(new \JsonApiMiddleware());
$app->response->headers->set('Content-Type', 'application/json');