当前位置: 首页>>代码示例>>PHP>>正文


PHP Db::forPrefixTable方法代码示例

本文整理汇总了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));
 }
开发者ID:ITw3,项目名称:redaxscript,代码行数:16,代码来源:ModuleTest.php

示例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();
 }
开发者ID:ITw3,项目名称:redaxscript,代码行数:11,代码来源:BreadcrumbTest.php

示例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;
         }
     }
 }
开发者ID:ITw3,项目名称:redaxscript,代码行数:30,代码来源:Breadcrumb.php

示例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));
 }
开发者ID:ITw3,项目名称:redaxscript,代码行数:14,代码来源:CaptchaTest.php

示例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');
 }
开发者ID:ITw3,项目名称:redaxscript,代码行数:9,代码来源:Template.php

示例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');
 }
开发者ID:ITw3,项目名称:redaxscript,代码行数:9,代码来源:Language.php


注:本文中的Redaxscript\Db::forPrefixTable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。