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


PHP error::createGroupNotFoundError方法代码示例

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


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

示例1: getConversationSetData

 if ($len == 2) {
     $groupset = getConversationSetData($parts);
     $groupset->cipher = $cipher;
     if (isset($unobfuscationid) && $unobfuscationid != "") {
         $groupset->unobfuscationid = $unobfuscationid;
     }
     $response = $groupset;
 } else {
     if ($len > 2) {
         $id = check_param($parts[2], PARAM_TEXT);
         global $HUB_SQL, $DB;
         $group = getGroup($id);
         if ($group instanceof Error) {
             global $ERROR;
             $ERROR = new error();
             $ERROR->createGroupNotFoundError($id);
             include $HUB_FLM->getCodeDirPath("core/formaterror.php");
             die;
         }
         $group = getConversationData($id);
         $group->cipher = $cipher;
         if (isset($unobfuscationid) && $unobfuscationid != "") {
             $group->unobfuscationid = $unobfuscationid;
         }
         if ($len == 4) {
             $subtype = check_param($parts[3], PARAM_ALPHA);
             $group->filter = $subtype;
         }
         $response = $group;
     } else {
         global $ERROR;
开发者ID:uniteddiversity,项目名称:LiteMap,代码行数:31,代码来源:restapi.php

示例2: load

 /**
  * Loads the data for the group from the database
  *
  * @return Group object (this)
  */
 function load()
 {
     global $DB, $CFG, $HUB_FLM, $HUB_SQL, $LNG;
     $params = array();
     $params[0] = $this->groupid;
     $resArray = $DB->select($HUB_SQL->DATAMODEL_GROUP_SELECT, $params);
     if ($resArray !== false) {
         $count = count($resArray);
         if ($count == 0) {
             global $ERROR;
             $ERROR = new error();
             return $ERROR->createGroupNotFoundError($this->groupid);
         }
         for ($i = 0; $i < $count; $i++) {
             $array = $resArray[$i];
             $this->name = stripslashes($array['Name']);
             $this->description = stripslashes($array['Description']);
             $this->website = stripslashes($array['Website']);
             $this->isopenjoining = $array['IsOpenJoining'];
             if ($array['Photo']) {
                 //set user photo and thumb the thumb creation is done during registration
                 $originalphotopath = $HUB_FLM->createUploadsDirPath($this->groupid . "/" . stripslashes($array['Photo']));
                 if (file_exists($originalphotopath)) {
                     $this->photo = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . stripslashes($array['Photo']));
                     $this->thumb = $HUB_FLM->getUploadsWebPath($this->groupid . "/" . str_replace('.', '_thumb.', stripslashes($array['Photo'])));
                     if (!file_exists($this->thumb)) {
                         create_image_thumb($array['Photo'], $CFG->IMAGE_THUMB_WIDTH, $this->groupid);
                     }
                 } else {
                     //if the file does not exists how to get it from a upper level? change it to
                     //if file doesnot exists directly using default photo
                     $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
                     $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
                 }
             } else {
                 $this->photo = $HUB_FLM->getUploadsWebPath($CFG->DEFAULT_GROUP_PHOTO);
                 $this->thumb = $HUB_FLM->getUploadsWebPath(str_replace('.', '_thumb.', stripslashes($CFG->DEFAULT_GROUP_PHOTO)));
             }
             if (isset($array['LocationText'])) {
                 $this->location = $array['LocationText'];
             } else {
                 $this->location = "";
             }
             if (isset($array['LocationCountry'])) {
                 $cs = getCountryList();
                 $this->countrycode = $array['LocationCountry'];
                 if (isset($cs[$array['LocationCountry']])) {
                     $this->country = $cs[$array['LocationCountry']];
                 }
             } else {
                 $this->countrycode = "";
                 $this->country = "";
             }
             if (isset($array['LocationLat'])) {
                 $this->locationlat = $array['LocationLat'];
             }
             if (isset($array['LocationLng'])) {
                 $this->locationlng = $array['LocationLng'];
             }
         }
     } else {
         return database_error();
     }
     $this->loadmembers();
     $this->loadpendingmembers();
     $this->getDebateCount();
     $this->getVoteCount();
     return $this;
 }
开发者ID:uniteddiversity,项目名称:LiteMap,代码行数:74,代码来源:group.class.php


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