当前位置: 首页>>代码示例>>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;未经允许,请勿转载。