分页数字列表
@return string
182106
protected function getPageList() {
		$linkPage = '';
		$linkPage .= $this->replaceLine(1);
		$lastList = floor($this->get('length') / 2);
		$i = 0;
		$length = 0;
		if ($this->pageTotal < $this->get('length') || $this->get('page') - $lastList < 2 || $this->pageTotal - $this->get('length') < 2) {
			$i = 2;
			if ($this->pageTotal <= $this->get('length')) {
				$length = $this->pageTotal - 1;
			} else {
				$length = $this->get('length');
			}
		} elseif ($this->get('page') - $lastList>= 2 && $this->get('page') + $lastList <= $this->pageTotal) {
			$i = $this->get('page')- $lastList;
			$length = $this->get('page') + $lastList- 1;
		} elseif ($this->get('page') + $lastList > $this->pageTotal) {
			$i = $this->pageTotal - $this->get('length') + 1;
			$length = $this->pageTotal - 1;
		}
		if ($this->get('page') > $lastList + 1 && $i > 2) {
			$linkPage .= $this->getOmit();
		}
		for (; $i <= $length; $i ++) {
			$linkPage .= $this->replaceLine($i);
		}
		if ($this->get('page') < $this->pageTotal - $lastList && $length < $this->pageTotal - 1) {
			$linkPage .= $this->getOmit();
		}
		$linkPage .= $this->replaceLine($this->pageTotal);
		return $linkPage;
	}
527763
public function getName()
    {
        if (!array_key_exists(self::NAME, $this->group)) {
            throw new \Exception('Could not get group name from group id.');
        }
        return $this->group[self::NAME];
    }
868410
public function getGroups()
    {
        if (!is_array($this->fields['groups'])) {
            $this->fields['groups'] = [GROUP_ALL];
            if ($this->id == ADMIN_ID) $this->fields['groups'][] = GROUP_ADMIN;
            $r = self::getDbConnection()->fetchAll('SELECT group_id FROM users_groups_membership WHERE user_id='.$this->id);
            foreach ($r as $f) $this->fields['groups'][] = $f['group_id'];
        }
        return $this->fields['groups'];
    }
546221
public function getNext()
    {
        reset($this->groups);
        while ($key = key($this->groups)) {
            $nextGroup = next($this->groups);

            if ($this->groups[$key] === $this->group && $nextGroup) {
                return $nextGroup;
            }
        }

        return $this->group;
    }
609639
public function getGroup(){
        if (!$this->access_token && !$this->checkAuth()) return false;
        $result = $this->http_get(self::API_URL_PREFIX.self::GROUP_GET_URL.'access_token='.$this->access_token);
        if ($result)
        {
            $json = json_decode($result,true);
            if (isset($json['errcode'])) {
                $this->errCode = $json['errcode'];
                $this->errMsg = $json['errmsg'];
                return false;
            }
            return $json;
        }
        return false;
    }
703897
public function getPrev()
    {
        end($this->groups);
        while ($key = key($this->groups)) {
            $prevGroup = prev($this->groups);

            if ($this->groups[$key] === $this->group && $prevGroup) {
                return $prevGroup;
            }
        }

        return $this->group;
    }
900292
public function summary()
	{
		$summary = array(
			'start'  => $this->started(),
			'end'    => $this->ended(),
			'total'  => $this->duration(),
			'memory' => $this->memory()
		);

		return $summary;
	}
247930
public function getGroups()
    {
        $groups = [];

        foreach ($this->rootlineElements as $rootlineElement) {
            $rootlineElementGroups = $rootlineElement->getGroups();
            $groups = array_merge($groups, $rootlineElementGroups);
        }

        $groups = $this->cleanGroupArray($groups);

        return $groups;
    }
326346
private function getGroupByField(): string
    {
        if ('' === $this->groupByField) {
            $this->groupByField = ! empty($this->searchData['group_by']) ? $this->searchData['group_by'] : '';
        }

        return $this->groupByField;
    }
809055
public function buildGroup(): string
    {
        if (empty($this->sqlParts['groupBy'])) {
            return '';
        }

        $group = [];
        foreach ($this->sqlParts['groupBy'] as $column) {
            $group[] = $this->getQuotedName(trim($column));
        }

        return ' GROUP BY '.implode(', ', $group);
    }
9565
public function getHighestGroupPage()
    {
        $max = 1;
        $path = $this->prefixWithNamespace('groupPage');
        $groupPages = $this->argumentsAccessor->get($path, []);
        foreach ($groupPages as $groups) {
            if (!is_array($groups)) continue;
            foreach ($groups as $groupItemPage) {
                if ($groupItemPage > $max) {
                    $max = $groupItemPage;
                }
            }
        }

        return $max;
    }
1122878
public function get_value() {
		if ( $this->group && null === $this->value ) {
			return $this->value = $this->get_value_in_group();
		}

		return $this->value;
	}
262104
public function show() {
        if(0 == $this->totalRows) return '';

        /* 生成URL */
        $this->parameter[$this->p] = '[PAGE]';
        $this->url = U(ACTION_NAME, $this->parameter);
        /* 计算分页信息 */
        $this->totalPages = ceil($this->totalRows / $this->listRows); //总页数
        if(!empty($this->totalPages) && $this->nowPage > $this->totalPages) {
            $this->nowPage = $this->totalPages;
        }

        /* 计算分页临时变量 */
        $now_cool_page      = $this->rollPage/2;
		$now_cool_page_ceil = ceil($now_cool_page);
		$this->lastSuffix && $this->config['last'] = $this->totalPages;

        //上一页
        $up_row  = $this->nowPage - 1;
        $up_page = $up_row > 0 ? '<a class="prev" href="' . $this->url($up_row) . '">' . $this->config['prev'] . '</a>' : '';

        //下一页
        $down_row  = $this->nowPage + 1;
        $down_page = ($down_row <= $this->totalPages) ? '<a class="next" href="' . $this->url($down_row) . '">' . $this->config['next'] . '</a>' : '';

        //第一页
        $the_first = '';
        if($this->totalPages > $this->rollPage && ($this->nowPage - $now_cool_page) >= 1){
            $the_first = '<a class="first" href="' . $this->url(1) . '">' . $this->config['first'] . '</a>';
        }

        //最后一页
        $the_end = '';
        if($this->totalPages > $this->rollPage && ($this->nowPage + $now_cool_page) < $this->totalPages){
            $the_end = '<a class="end" href="' . $this->url($this->totalPages) . '">' . $this->config['last'] . '</a>';
        }

        //数字连接
        $link_page = "";
        for($i = 1; $i <= $this->rollPage; $i++){
			if(($this->nowPage - $now_cool_page) <= 0 ){
				$page = $i;
			}elseif(($this->nowPage + $now_cool_page - 1) >= $this->totalPages){
				$page = $this->totalPages - $this->rollPage + $i;
			}else{
				$page = $this->nowPage - $now_cool_page_ceil + $i;
			}
            if($page > 0 && $page != $this->nowPage){

                if($page <= $this->totalPages){
                    $link_page .= '<a class="num" href="' . $this->url($page) . '">' . $page . '</a>';
                }else{
                    break;
                }
            }else{
                if($page > 0 && $this->totalPages != 1){
                    $link_page .= '<span class="current">' . $page . '</span>';
                }
            }
        }

        //替换分页内容
        $page_str = str_replace(
            array('%HEADER%', '%NOW_PAGE%', '%UP_PAGE%', '%DOWN_PAGE%', '%FIRST%', '%LINK_PAGE%', '%END%', '%TOTAL_ROW%', '%TOTAL_PAGE%'),
            array($this->config['header'], $this->nowPage, $up_page, $down_page, $the_first, $link_page, $the_end, $this->totalRows, $this->totalPages),
            $this->config['theme']);
        return "<div>{$page_str}</div>";
    }
106949
public function parse()
    {
        if (!$this->checkToken()) {
            return $this->parseRet = array('code' => -1, 'message' => 'Token不正确');
        }

        $attrs = $this->xmlToArray($this->postData);
        if ($this->isEncrypted()) {
            $ret = $this->decryptMsg($attrs['Encrypt']);
            if ($ret['code'] !== 1) {
                return $this->parseRet = $ret;
            }
            $attrs = $this->xmlToArray($ret['xml']);
        }

        $this->attrs = $attrs;
        return $this->parseRet = array('code' => 1, 'message' => '解析成功');
    }
256932
public static function getGroup() {
		
		$attr = [];

		foreach(static :: $group as $group) {
			$attr = static :: arrayRecursiveMerge($attr, $group);
		}

		return $attr;
	}
80919
private function getGroupPath() : string
    {
        $path = '';

        foreach ($this->groupOptionsStack as $groupOptions) {
            if (isset($groupOptions['path'])) {
                $path .= $groupOptions['path'];
            }
        }

        return $path;
    }
572415
public function getGroups()
    {
        return $this->apiCall('groups.list')->then(function ($response) {
            $groups = [];
            foreach ($response['groups'] as $group) {
                $groups[] = new Group($this, $group);
            }
            return $groups;
        });
    }