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


PHP ConvertUtil::getSubByKey方法代码示例

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


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

示例1: actionIndex

 public function actionIndex()
 {
     $op = EnvUtil::getRequest("op");
     $op = in_array($op, array("dept", "letter")) ? $op : "dept";
     $params = array();
     if ($op == "letter") {
         $params["datas"] = $this->getDataByLetter();
     } else {
         $params["datas"] = $this->getDataByDept();
     }
     $userDatas = array();
     if (!empty($params["datas"])) {
         foreach ($params["datas"] as $datas) {
             $userDatas = $op == "dept" ? array_merge($userDatas, $datas["users"]) : array_merge($userDatas, $datas);
         }
     }
     $params["uids"] = implode(",", ConvertUtil::getSubByKey($userDatas, "uid"));
     $uid = Ibos::app()->user->uid;
     $params["cuids"] = Contact::model()->fetchAllConstantByUid($uid);
     $this->setPageTitle(Ibos::lang("Contact"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Contact"), "url" => $this->createUrl("defalut/index")), array("name" => Ibos::lang("Company contact"))));
     $view = $op == "letter" ? "letter" : "dept";
     $params["allLetters"] = $this->allLetters;
     $this->render($view, $params);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:25,代码来源:DefaultController.php

示例2: getUids

 public function getUids($content, $extraUids = null, $lessUids = null)
 {
     preg_match_all($this->_atRegex, $content, $matches);
     $unames = $matches[1];
     $map = "realname in ('" . implode("','", $unames) . "')";
     $ulist = User::model()->fetchAll($map);
     $matchUids = ConvertUtil::getSubByKey($ulist, "uid");
     if (empty($matchUids) && !empty($extraUids)) {
         if (!empty($lessUids)) {
             foreach ($lessUids as $k => $v) {
                 if (in_array($v, $extraUids)) {
                     unset($extraUids[$k]);
                 }
             }
         }
         return is_array($extraUids) ? $extraUids : array($extraUids);
     }
     $suid = array();
     foreach ($matchUids as $v) {
         !in_array($v, $suid) && ($suid[] = (int) $v);
     }
     if (!empty($lessUids)) {
         foreach ($suid as $k => $v) {
             if (in_array($v, $lessUids)) {
                 unset($suid[$k]);
             }
         }
     }
     return array_unique(array_filter(array_merge($suid, (array) $extraUids)));
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:30,代码来源:Atme.php

示例3: updateTable

 public static function updateTable($flowId, $structure = array())
 {
     $tableName = sprintf("{{flow_data_%d}}", intval($flowId));
     if (!self::tableExists($tableName)) {
         if (!self::createTable($tableName, $structure)) {
             return false;
         }
         return true;
     }
     if ($structure) {
         $rows = Ibos::app()->db->createCommand()->setText("SHOW FIELDS FROM " . $tableName)->queryAll();
         $fields = ConvertUtil::getSubByKey($rows, "Field");
         $items = array();
         foreach ($structure as $eName => $config) {
             $field = strtolower(trim($eName));
             if (!in_array($field, $fields)) {
                 if (substr($field, 0, 5) == "data_") {
                     $items[] = "ALTER TABLE " . $tableName . " ADD `{$field}` text NOT NULL;";
                 }
             }
         }
         if (!empty($items)) {
             Ibos::app()->db->createCommand()->setText(implode("\n", $items))->execute();
         }
     }
     return true;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:27,代码来源:WfCommonUtil.php

示例4: actionAllDiggList

 public function actionAllDiggList()
 {
     $feedId = intval(EnvUtil::getRequest("feedid"));
     $result = FeedDigg::model()->fetchUserList($feedId, 5);
     $uids = ConvertUtil::getSubByKey($result, "uid");
     $followStates = Follow::model()->getFollowStateByFids(Ibos::app()->user->uid, $uids);
     $this->renderPartial("alldigglist", array("list" => $result, "followstates" => $followStates, "feedid" => $feedId));
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:8,代码来源:FeedController.php

示例5: delClear

 public function delClear($id, $uid)
 {
     $fidArr = Yii::app()->db->createCommand()->select("fid")->from($this->tableName())->where("FIND_IN_SET(webid,'{$id}') AND uid = {$uid}")->queryAll();
     $fids = ConvertUtil::getSubByKey($fidArr, "fid");
     $fid = implode(",", $fids);
     Yii::app()->db->createCommand()->delete("{{email_folder}}", "FIND_IN_SET(fid,'{$fid}') AND uid = {$uid}");
     Yii::app()->db->createCommand()->update("{{email}}", array("fid" => 1), "FIND_IN_SET(fid,'{$fid}') AND toid = {$uid}");
     return $this->deleteAll("FIND_IN_SET(webid,'{$id}')");
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:9,代码来源:EmailWeb.php

示例6: fetchAllPositionIdByUid

 public function fetchAllPositionIdByUid($uid)
 {
     static $uids = array();
     if (!isset($uids[$uid])) {
         $posids = $this->fetchAll(array("select" => "positionid", "condition" => "`uid` = :uid", "params" => array(":uid" => $uid)));
         $uids[$uid] = ConvertUtil::getSubByKey($posids, "positionid");
     }
     return $uids[$uid];
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:9,代码来源:PositionRelated.php

示例7: fetchAuidByUid

 public function fetchAuidByUid($uid)
 {
     $attentions = $this->fetchAll("uid = :uid", array(":uid" => $uid));
     $aUids = array();
     if (!empty($attentions)) {
         $aUids = ConvertUtil::getSubByKey($attentions, "auid");
     }
     return $aUids;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:9,代码来源:DiaryAttention.php

示例8: actionLoadMoreDiggUser

 public function actionLoadMoreDiggUser()
 {
     $feedId = intval(EnvUtil::getRequest("feedid"));
     $offset = intval(EnvUtil::getRequest("offset"));
     $result = FeedDigg::model()->fetchUserList($feedId, 5, $offset);
     $uids = ConvertUtil::getSubByKey($result, "uid");
     $followStates = Follow::model()->getFollowStateByFids(Ibos::app()->user->uid, $uids);
     $data["data"] = $this->renderPartial("application.modules.message.views.feed.digglistmore", array("list" => $result, "followstates" => $followStates), true);
     $data["isSuccess"] = true;
     $this->ajaxReturn($data);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:11,代码来源:ApiController.php

示例9: delBody

 public function delBody($bodyIds, $archiveId = 0)
 {
     $table = sprintf("{{%s}}", $this->getTableName($archiveId));
     $bodys = Yii::app()->db->createCommand()->select("attachmentid")->from($table)->where("FIND_IN_SET(bodyid,'{$bodyIds}')")->queryAll();
     $attachIds = ConvertUtil::getSubByKey($bodys, "attachmentid");
     $attachId = StringUtil::filterStr(implode(",", $attachIds));
     if (!empty($attachId)) {
         AttachUtil::delAttach($attachId);
     }
     return Yii::app()->db->createCommand()->delete($table, "FIND_IN_SET(bodyid,'{$bodyIds}')");
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:11,代码来源:EmailBody.php

示例10: fetchRepidAndAidByTypeids

 public function fetchRepidAndAidByTypeids($typeids)
 {
     $typeids = is_array($typeids) ? implode(",", $typeids) : trim($typeids, ",");
     $reports = $this->fetchAll(array("select" => "repid, attachmentid", "condition" => "typeid IN({$typeids})"));
     $return = array();
     if (!empty($reports)) {
         $return["repids"] = implode(",", ConvertUtil::getSubByKey($reports, "repid"));
         $attachmentidArr = ConvertUtil::getSubByKey($reports, "attachmentid");
         $return["aids"] = implode(",", array_filter($attachmentidArr));
     }
     return $return;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:12,代码来源:Report.php

示例11: getDataByLetter

 protected function getDataByLetter()
 {
     $deptid = intval(EnvUtil::getRequest("deptid"));
     if (!empty($deptid)) {
         $deptids = Department::model()->fetchChildIdByDeptids($deptid, true);
         $uids = User::model()->fetchAllUidByDeptids($deptids, false);
     } else {
         $users = UserUtil::loadUser();
         $uids = ConvertUtil::getSubByKey($users, "uid");
     }
     $uids = $this->removeDisabledUid($uids);
     $res = UserUtil::getUserByPy($uids);
     return ContactUtil::handleLetterGroup($res);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:14,代码来源:ContactBaseController.php

示例12: getAllArchiveTableId

 public static function getAllArchiveTableId()
 {
     $return = array();
     $db = Yii::app()->db->createCommand();
     $prefix = $db->getConnection()->tablePrefix;
     $tables = $db->setText("SHOW TABLES LIKE '" . str_replace("_", "\\_", $prefix . "log_%") . "'")->queryAll(false);
     if (!empty($tables)) {
         $tableArr = ConvertUtil::getSubByKey($tables, 0);
         $return = array_map(function ($archiveTable) {
             return substr($archiveTable, -4);
         }, $tableArr);
     }
     return $return;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:14,代码来源:Log.php

示例13: actionIndex

 public function actionIndex()
 {
     $uid = Ibos::app()->user->uid;
     $unreadAtMe = UserData::model()->countUnreadAtMeByUid($uid);
     $pageCount = Atme::model()->countByAttributes(array("uid" => $uid));
     $pages = PageUtil::create($pageCount);
     $atList = Atme::model()->fetchAllAtmeListByUid($uid, $pages->getLimit(), $pages->getOffset());
     $feedIds = ConvertUtil::getSubByKey($atList, "feedid");
     $diggArr = FeedDigg::model()->checkIsDigg($feedIds, $uid);
     $data = array("unreadAtmeCount" => $unreadAtMe, "list" => $atList, "pages" => $pages, "digg" => $diggArr);
     $this->setPageTitle(Ibos::lang("Mention me"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Message center"), "url" => $this->createUrl("mention/index")), array("name" => Ibos::lang("Mention me"))));
     $this->render("index", $data);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:14,代码来源:MentionController.php

示例14: actionIndex

 public function actionIndex()
 {
     $uid = Ibos::app()->user->uid;
     $cuids = Contact::model()->fetchAllConstantByUid($uid);
     $res = UserUtil::getUserByPy($cuids);
     $group = ContactUtil::handleLetterGroup($res);
     $userDatas = array();
     foreach ($group as $users) {
         $userDatas = array_merge($userDatas, $users);
     }
     $params = array("datas" => $group, "letters" => array_keys($group), "allLetters" => $this->allLetters, "uids" => implode(",", ConvertUtil::getSubByKey($userDatas, "uid")));
     $this->setPageTitle(Ibos::lang("Regular contact"));
     $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Contact"), "url" => $this->createUrl("default/index")), array("name" => Ibos::lang("Regular contact"))));
     $this->render("index", $params);
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:15,代码来源:ConstantController.php

示例15: getSidebar

 public function getSidebar($getUid, $getUser)
 {
     $uid = Ibos::app()->user->uid;
     if (!empty($getUid)) {
         $subUids = $getUid;
     } elseif (!empty($getUser)) {
         $subUids = ConvertUtil::getSubByKey($getUser, "uid");
     } else {
         $subUids = UserUtil::getAllSubs($uid, "", true);
     }
     $deptArr = UserUtil::getManagerDeptSubUserByUid($uid);
     $sidebarAlias = "application.modules.report.views.review.sidebar";
     $params = array("statModule" => Ibos::app()->setting->get("setting/statmodules"), "lang" => Ibos::getLangSource("report.default"), "deptArr" => $deptArr, "dashboardConfig" => $this->getReportConfig(), "reportTypes" => ReportType::model()->fetchAllTypeByUid($subUids));
     $sidebarView = $this->renderPartial($sidebarAlias, $params, false);
     return $sidebarView;
 }
开发者ID:AxelPanda,项目名称:ibos,代码行数:16,代码来源:ReviewController.php


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