當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。