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


PHP Zend_Log::NOTICE方法代碼示例

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


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

示例1: getTag

 /**
  * converts category to tag
  * 
  * @param int $catId
  * @return string tagid
  */
 public function getTag($catId)
 {
     if (!(isset($this->_tagMapCache[$catId]) || array_key_exists($catId, $this->_tagMapCache))) {
         $select = $this->_egwDb->select()->from(array('cats' => 'egw_categories'))->where($this->_egwDb->quoteInto($this->_egwDb->quoteIdentifier('cat_id') . ' = ?', $catId));
         $cat = $this->_egwDb->fetchAll($select, NULL, Zend_Db::FETCH_ASSOC);
         $cat = count($cat) === 1 ? $cat[0] : NULL;
         if (!$cat) {
             $this->_log->DEBUG(__METHOD__ . '::' . __LINE__ . " category {$catId} not found in egw, skipping tag");
             return $this->_tagMapCache[$catId] = NULL;
         }
         $tineDb = Tinebase_Core::getDb();
         $select = $tineDb->select()->from(array('tags' => $tineDb->table_prefix . 'tags'))->where($tineDb->quoteInto($tineDb->quoteIdentifier('name') . ' LIKE ?', $cat['cat_name']));
         $tag = $tineDb->fetchAll($select, NULL, Zend_Db::FETCH_ASSOC);
         $tag = count($tag) > 0 ? $tag[0] : NULL;
         if ($tag) {
             return $this->_tagMapCache[$catId] = $tag['id'];
         }
         // create tag
         $catData = unserialize($cat['cat_data']);
         $tagId = Tinebase_Record_Abstract::generateUID();
         $tagType = $cat['cat_access'] == 'public' ? Tinebase_Model_Tag::TYPE_SHARED : Tinebase_Model_Tag::TYPE_PERSONAL;
         $tagOwner = $tagType == Tinebase_Model_Tag::TYPE_SHARED ? 0 : $this->mapAccountIdEgw2Tine($cat['cat_owner']);
         $this->_log->NOTICE(__METHOD__ . '::' . __LINE__ . " creating new {$tagType} tag '{$cat['cat_name']}'");
         $tineDb->insert($tineDb->table_prefix . 'tags', array('id' => $tagId, 'type' => $tagType, 'owner' => $tagOwner, 'name' => $cat['cat_name'], 'description' => $cat['cat_description'], 'color' => $catData['color'], 'created_by' => $tagOwner ? $tagOwner : Tinebase_Core::getUser()->getId(), 'creation_time' => $cat['last_mod'] ? $this->convertDate($cat['last_mod']) : Tinebase_DateTime::now()));
         $right = new Tinebase_Model_TagRight(array('tag_id' => $tagId, 'account_type' => $tagType == Tinebase_Model_Tag::TYPE_SHARED ? Tinebase_Acl_Rights::ACCOUNT_TYPE_ANYONE : Tinebase_Acl_Rights::ACCOUNT_TYPE_USER, 'account_id' => $tagOwner, 'view_right' => true, 'use_right' => true));
         Tinebase_Tags::getInstance()->setRights($right);
         Tinebase_Tags::getInstance()->setContexts(array(0), $tagId);
         $this->_tagMapCache[$catId] = $tagId;
     }
     return $this->_tagMapCache[$catId];
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:37,代碼來源:Abstract.php


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