當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataAccessObject::logStart方法代碼示例

本文整理匯總了PHP中DataAccessObject::logStart方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataAccessObject::logStart方法的具體用法?PHP DataAccessObject::logStart怎麽用?PHP DataAccessObject::logStart使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataAccessObject的用法示例。


在下文中一共展示了DataAccessObject::logStart方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getMatchingIdsInDb

 protected function getMatchingIdsInDb(DataAccessObject $dao, PermissionsManager $permissionManager, Tracker $tracker, PFUser $user, array $criteria)
 {
     $dump_criteria = array();
     foreach ($criteria as $c) {
         $dump_criteria[$c->field->getName()] = $c->field->getCriteriaValue($c);
     }
     $dao->logStart(__METHOD__, json_encode(array('user' => $user->getUserName(), 'project' => $tracker->getGroupId(), 'query' => $dump_criteria, 'trackers' => array($tracker->getId()))));
     $matching_ids = array();
     $group_id = $tracker->getGroupId();
     $permissions = $permissionManager->getPermissionsAndUgroupsByObjectid($tracker->getId());
     $contributor_field = $tracker->getContributorField();
     $contributor_field_id = $contributor_field ? $contributor_field->getId() : null;
     $additional_from = array();
     $additional_where = array();
     foreach ($criteria as $c) {
         if ($f = $c->getFrom()) {
             $additional_from[] = $f;
         }
         if ($w = $c->getWhere()) {
             $additional_where[] = $w;
         }
     }
     $matching_ids['id'] = '';
     $matching_ids['last_changeset_id'] = '';
     $matching_ids_result = $dao->searchMatchingIds($group_id, $tracker->getId(), $additional_from, $additional_where, $user, $permissions, $contributor_field_id);
     if ($matching_ids_result) {
         $matching_ids = $matching_ids_result->getRow();
         if ($matching_ids) {
             if (substr($matching_ids['id'], -1) === ',') {
                 $matching_ids['id'] = substr($matching_ids['id'], 0, -1);
             }
             if (substr($matching_ids['last_changeset_id'], -1) === ',') {
                 $matching_ids['last_changeset_id'] = substr($matching_ids['last_changeset_id'], 0, -1);
             }
         }
     }
     $nb_matching = $matching_ids['id'] ? substr_count($matching_ids['id'], ',') + 1 : 0;
     $dao->logEnd(__METHOD__, $nb_matching);
     return $matching_ids;
 }
開發者ID:pombredanne,項目名稱:tuleap,代碼行數:40,代碼來源:Tracker_Report.class.php


注:本文中的DataAccessObject::logStart方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。