本文整理汇总了PHP中Redaxscript\Db::forPrefixTable方法的典型用法代码示例。如果您正苦于以下问题:PHP Db::forPrefixTable方法的具体用法?PHP Db::forPrefixTable怎么用?PHP Db::forPrefixTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redaxscript\Db
的用法示例。
在下文中一共展示了Db::forPrefixTable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUninstall
/**
* testUninstall
*
* @since 2.2.0
*/
public function testUninstall()
{
/* setup */
$module = new Module(array('alias' => 'test'));
$module->uninstall();
/* result */
Db::clearCache();
$result = Db::forPrefixTable('modules')->where('alias', 'test')->findOne();
/* compare */
$this->assertFalse(is_object($result));
}
示例2: tearDownAfterClass
/**
* tearDownAfterClass
*
* @since 2.2.0
*/
public static function tearDownAfterClass()
{
Db::forPrefixTable('categories')->where('alias', 'ultra')->deleteMany();
Db::forPrefixTable('categories')->where('alias', 'lightweight')->deleteMany();
Db::forPrefixTable('articles')->where('alias', 'cms')->deleteMany();
}
示例3: _buildContent
/**
* build the breadcrumb array for current content
*
* @since 2.1.0
*
* @param integer $key
*/
private function _buildContent($key = 0)
{
/* join first title */
$this->_breadcrumbArray[$key]['title'] = Db::forPrefixTable($this->_registry->get('firstTable'))->where('alias', $this->_registry->get('firstParameter'))->findOne()->title;
/* set route if not end */
if ($this->_registry->get('firstParameter') !== $this->_registry->get('lastParameter')) {
$this->_breadcrumbArray[$key]['route'] = $this->_registry->get('firstParameter');
}
/* join second title */
if ($this->_registry->get('secondTable')) {
$key++;
$this->_breadcrumbArray[$key]['title'] = Db::forPrefixTable($this->_registry->get('secondTable'))->where('alias', $this->_registry->get('secondParameter'))->findOne()->title;
/* set route if not end */
if ($this->_registry->get('secondParameter') !== $this->_registry->get('lastParameter')) {
$this->_breadcrumbArray[$key]['route'] = $this->_registry->get('firstParameter') . '/' . $this->_registry->get('secondParameter');
}
/* join third title */
if ($this->_registry->get('thirdTable')) {
$key++;
$this->_breadcrumbArray[$key]['title'] = Db::forPrefixTable($this->_registry->get('thirdTable'))->where('alias', $this->_registry->get('thirdParameter'))->findOne()->title;
}
}
}
示例4: testMinus
/**
* testMinus
*
* @since 2.2.0
*/
public function testMinus()
{
/* setup */
Db::forPrefixTable('settings')->where('name', 'captcha')->findOne()->set('value', 3)->save();
/* result */
$result = new Captcha($this->_language);
/* compare */
$this->assertTrue(is_object($result));
}
示例5: init
/**
* init the class
*
* @since 2.1.0
*/
public function init()
{
$this->_detect(array('query' => Request::getQuery('t'), 'session' => Request::getSession($this->_registry->get('root') . '/template'), 'contents' => $this->_registry->get('lastTable') ? Db::forPrefixTable($this->_registry->get('lastTable'))->where('id', $this->_registry->get('lastId'))->findOne()->template : null, 'settings' => Db::getSettings('template'), 'fallback' => 'default'), 'template', 'templates/{value}/index.phtml');
}
示例6: init
/**
* init the class
*
* @since 2.1.0
*/
public function init()
{
$this->_detect(array('query' => Request::getQuery('l'), 'session' => Request::getSession($this->_registry->get('root') . '/language'), 'contents' => $this->_registry->get('lastTable') ? Db::forPrefixTable($this->_registry->get('lastTable'))->where('id', $this->_registry->get('lastId'))->findOne()->language : null, 'settings' => Db::getSettings('language'), 'browser' => substr(Request::getServer('HTTP_ACCEPT_LANGUAGE'), 0, 2), 'fallback' => 'en'), 'language', 'languages/{value}.json');
}