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


PHP Config::setFlag方法代码示例

本文整理汇总了PHP中CB\Config::setFlag方法的典型用法代码示例。如果您正苦于以下问题:PHP Config::setFlag方法的具体用法?PHP Config::setFlag怎么用?PHP Config::setFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CB\Config的用法示例。


在下文中一共展示了Config::setFlag方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: update

 /**
  * update file
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     //disable default log from parent Object class
     \CB\Config::setFlag('disableActivityLog', true);
     $rez = parent::update($p);
     \CB\Config::setFlag('disableActivityLog', false);
     $p =& $this->data;
     $this->logAction('file_update', array('file' => array('id' => $p['id'], 'name' => $p['name'])));
     return $rez;
 }
开发者ID:sebbie42,项目名称:casebox,代码行数:15,代码来源:File.php

示例2: update

 /**
  * update comment
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     //disable default log from parent Object class
     //we'll set comments add as comment action for parent
     Config::setFlag('disableActivityLog', true);
     $rez = parent::update($p);
     Config::setFlag('disableActivityLog', false);
     $p =& $this->data;
     $this->logAction('comment_update', array('new' => Objects::getCachedObject($p['pid']), 'comment' => $p['data']['_title']));
     return $rez;
 }
开发者ID:ameliefranco,项目名称:casebox,代码行数:16,代码来源:Comment.php

示例3: tearDown

 protected function tearDown()
 {
     $_SESSION['user']['id'] = $this->oldValues['user_id'];
     Config::setFlag('disableSolrIndexing', $this->oldValues['solrIndexing']);
     if (empty($this->oldValues['userVerified'])) {
         unset($_SESSION['verified']);
     }
 }
开发者ID:sebbie42,项目名称:casebox,代码行数:8,代码来源:SearchTest.php

示例4: tearDown

 protected function tearDown()
 {
     //remove users and objects
     \CB\Config::setFlag('disableSolrIndexing', $this->oldValues['solrIndexing']);
     if (empty($this->oldValues['userVerified'])) {
         unset($_SESSION['verified']);
     }
 }
开发者ID:austinvernsonger,项目名称:casebox,代码行数:8,代码来源:NotificationsTest.php

示例5: import

 /**
  * start importing process
  * @return void
  */
 public function import()
 {
     \CB\Config::setFlag('disableSolrIndexing', true);
     \CB\Config::setFlag('disableActivityLog', true);
     \CB\Config::setFlag('disableTriggers', true);
     DB\startTransaction();
     echo "\nInitializing .. \n____________________________\n";
     $this->init();
     echo "\nOk\n";
     echo "\nPreparing .. \n____________________________\n";
     $this->prepare();
     echo "\nOk\n";
     echo "\nExecuting .. \n____________________________\n";
     $this->execute();
     echo "\nOk\n";
     echo "\nAdjusting .. \n____________________________\n";
     $this->adjust();
     echo "\nOk\n";
     \CB\Config::setFlag('disableTriggers', false);
     \CB\Config::setFlag('disableActivityLog', false);
     \CB\Config::setFlag('disableSolrIndexing', false);
     DB\commitTransaction();
     echo "\nReindexing .. \n____________________________\n";
     $this->reindex();
     echo "\nOk\n";
 }
开发者ID:ameliefranco,项目名称:casebox,代码行数:30,代码来源:Base.php

示例6: ini_set

    Note: there is no need to run any reindexing
        All new actions will generate notifications based on followers data
*/
use CB\DB;
ini_set('max_execution_time', 0);
$path = realpath(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'crons' . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
//check script options
$options = getopt('c:', array('core'));
$core = empty($options['c']) ? @$options['core'] : $options['c'];
if (empty($core)) {
    die('no core specified or invalid options set.');
}
$cron_id = 'dummy';
include $path . 'init.php';
\CB\Config::setFlag('disableActivityLog', true);
//select tasks count
$res = DB\dbQuery('SELECT count(*) `nr`
    FROM objects
    WHERE `sys_data` LIKE \'%"subscribers"%\'') or die(DB\dbQueryError());
if ($r = $res->fetch_assoc()) {
    echo "Total objects: " . $r['nr'] . "\n";
}
$res->close();
DB\startTransaction();
//iterate and upgrade each object
$i = 0;
$res = DB\dbQuery('SELECT id, sys_data
    FROM objects
    WHERE `sys_data` LIKE \'%"subscribers"%\'') or die(DB\dbQueryError());
while ($r = $res->fetch_assoc()) {
开发者ID:youprofit,项目名称:casebox,代码行数:30,代码来源:20150528_subscribers_to_followers.php

示例7: update

 /**
  * update file
  * @param  array   $p optional properties. If not specified then $this-data is used
  * @return boolean
  */
 public function update($p = false)
 {
     //disable default log from parent Object class
     Config::setFlag('disableActivityLog', true);
     $rez = parent::update($p);
     Config::setFlag('disableActivityLog', false);
     $p =& $this->data;
     // log the action
     $logParams = array('type' => 'file_update', 'new' => Objects::getCachedObject($p['pid']), 'file' => array('id' => $p['id'], 'name' => $p['name']));
     Log::add($logParams);
     return $rez;
 }
开发者ID:austinvernsonger,项目名称:casebox,代码行数:17,代码来源:File.php


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