@param        $counter
@param        $pageNumber
@param string $content

@return string
488822
public function renderNextLink($counter, $pageNumber, $content = '')
    {
        //create next link
        if ($pageNumber < $counter - 1) {
            $content .= "<a href='".$this->currentPageUrl.'/'.$this->next."'>next </a>";
        } else {
            $content .= '<span class="disabled">next </span>';
        }
        $content .= "</div>\n";

        return $content;
    }
513243
public function listByPageId(int $pageId, int $begin, int $count)
    {
        $params = [
            'type' => 2,
            'page_id' => $pageId,
            'begin' => $begin,
            'count' => $count,
        ];

        return $this->httpPostJson('shakearound/relation/search', $params);
    }
325984
function paging(&$content, $spsize, $sptag)
	{
		if(strlen($content)<$spsize) return false;
		$bds = explode('<',$content);
		$npageBody = "";
		$istable = 0;
		$content = "";
		foreach($bds as $i=>$k)
		{
			if($i==0){$npageBody .= $bds[$i]; continue;}
			$bds[$i] = "<".$bds[$i];
			if(strlen($bds[$i])>6)
			{
				$tname = substr($bds[$i],1,5);
				if(strtolower($tname)=='table') $istable++;
				else if(strtolower($tname)=='/tabl') $istable--;
				if($istable>0){$npageBody .= $bds[$i]; continue;}
				else $npageBody .= $bds[$i];
			}
			else
			{
				$npageBody .= $bds[$i];
			}
			if(strlen($npageBody)>$spsize)
			{
				$content .= $npageBody.$sptag;
				$npageBody = "";
			}
		}
		if($npageBody!="") $content .= $npageBody;
		return true;
	}
149233
function ezWhatPageNumber( $pageNum, $identifier = false )
    {
        if ( $identifier === false )
        {
            foreach ( array_keys( $this->PageCounter ) as $identifier )
            {
                if ( isset( $this->PageCounter[$identifier]['start'] ) &&
                     $this->PageCounter[$identifier]['start'] <= $pageNum &&
                     ( !isset( $this->PageCounter[$identifier]['stop'] ) || $this->PageCounter[$identifier]['stop'] >= $pageNum ) )
                    return $pageNum - $this->PageCounter[$identifier]['start'] + 1;
            }
        }
        else
            return $pageNum - $this->PageCounter[$identifier]['start'] + 1;
    }
401693
private static function getPageCount($totalCount, $pageSize)
    {
        $totalCount = $totalCount < 0 ? 0 : (int)$totalCount;
        return ceil($totalCount / $pageSize);
    }
542073
public function getCurrentPageNumber()
    {
        $optionsRenderer = $this->getOptionsRenderer();
        $parameterNames = $optionsRenderer['parameterNames'];

        $request = $this->getRequest();
        if ($request instanceof HttpRequest) {
            $this->currentPageNumber = (int) $request->getPost(
                $parameterNames['currentPage'],
                $request->getQuery($parameterNames['currentPage'], 1)
            );
        }

        return (int) $this->currentPageNumber;
    }
676678
public static int countPaged(String keyspace,
                                 String columnFamily,
                                 ByteBuffer key,
                                 SliceQueryFilter filter,
                                 ConsistencyLevel consistencyLevel,
                                 ClientState cState,
                                 final int pageSize,
                                 long now) throws RequestValidationException, RequestExecutionException
    {
        SliceFromReadCommand command = new SliceFromReadCommand(keyspace, key, columnFamily, now, filter);
        final SliceQueryPager pager = new SliceQueryPager(command, consistencyLevel, cState, false);

        ColumnCounter counter = filter.columnCounter(Schema.instance.getCFMetaData(keyspace, columnFamily).comparator, now);
        while (!pager.isExhausted())
        {
            List<Row> next = pager.fetchPage(pageSize);
            if (!next.isEmpty())
                counter.countAll(next.get(0).cf);
        }
        return counter.live();
    }
846665
public function getPageCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Pages')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Pages');
        }

        return 0;
    }
495667
public function input($filename, $content)
    {
        $this->_filename = $filename;
        $content = preg_replace_callback($this->_backgroundPattern, array($this, '_replace'), $content);
        $content = preg_replace_callback($this->_backgroundImagePattern, array($this, '_replace'), $content);
        return $content;
    }
858094
public void setPageCount(int pageN) {
        this.pageN = pageN;
        DocListener listener;
		for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
            listener = (DocListener) iterator.next();
            listener.setPageCount(pageN);
        }
    }
826357
protected function getPaginator4QueryBuilder(QueryBuilder $queryBuilder, int $count, int $page = 1): ?Paginator
    {
        if (!$queryBuilder) {
            return null;
        }

        $paginator = new Paginator(
            new DoctrineAdapter\SimpleQueryDoctrine($count, $queryBuilder->getQuery())
        );
        $paginator->setDefaultItemCountPerPage(25);
        $paginator->setCurrentPageNumber($page);

        return $paginator;
    }
774781
public function counterCommand(): int
    {
        $total = 120;
        $ctt   = Show::counterTxt('handling ...', 'handled.');
        $this->write('Counter:');

        while ($total - 1) {
            $ctt->send(1);
            usleep(30000);
            $total--;
        }

        // end of the counter.
        $ctt->send(-1);

        // $this->output->aList($data, 'runtime profile');

        return 0;
    }
1022873
private CounterColumn populateCounterFkey(String rlName, Object rlValue) {
        CounterColumn counterCol = new CounterColumn();
        counterCol.setName(PropertyAccessorFactory.STRING.toBytes(rlName));
        counterCol.setValue((Long) rlValue);
        return counterCol;
    }
263264
public function getCountForNextPage($iPage, $iCount)
    {
        if ($iCount < 1) {
            return 0;
        }

        $iPage = (int) trim($iPage);

        //Check page value
        if ($iPage < 1) {
            $iPage = 1;
        }

        //Get max page value
        $iMaxPage = $this->getMaxPage($iCount);
        if ($iMaxPage <= $iPage) {
            return 0;
        }

        $iNextCount = $iCount - $this->iElementOnPage * $iPage;
        if ($iNextCount > $this->iElementOnPage) {
            $iNextCount = $this->iElementOnPage;
        }

        return $iNextCount;
    }
125693
public function tagEmpty($tag, $content)
    {
        $name     = $tag['name'];
        $name     = $this->autoBuildVar($name);
        $parseStr = '<?php if(empty(' . $name . ') || ((' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator ) && ' . $name . '->isEmpty())): ?>' . $content . '<?php endif; ?>';

        return $parseStr;
    }
234598
private function storePageHandler($content)
    {
        try {
            return $this->storePageContent($content);
        } catch (\Throwable $t) {
            $this->log('', $t);
        } catch (\Exception $e) {
            $this->log('', $e);
        }

        return $content;
    }
704811
public function tagNotempty($tag, $content)
    {
        $name     = $tag['name'];
        $name     = $this->autoBuildVar($name);
        $parseStr = '<?php if(!(empty(' . $name . ') || ((' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator ) && ' . $name . '->isEmpty()))): ?>' . $content . '<?php endif; ?>';

        return $parseStr;
    }