vendor/alipay/lotusphp_runtime/Pagination/Pagination.php

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
class LtPagination
{
	public $configHandle;
	public $conf;

	public function __construct()
	{
		if (! $this->configHandle instanceof LtConfig)
		{
			if (class_exists("LtObjectUtil", false))
			{
				$this->configHandle = LtObjectUtil::singleton("LtConfig");
			}
			else
			{
				$this->configHandle = new LtConfig;
			}
		}
	}

	public function init()
	{
		$this->conf = $this->configHandle->get("pagination.pager");
		if (empty($this->conf))
		{
			$this->conf['per_page'] = 25; //每个页面中希望展示的项目数量 
			$this->conf['num_links_show'] = 9; //数字链接显示数量 
			$this->conf['num_point_start_end'] = 2; //“点”前边和后边的链接数量
			$this->conf['show_first'] = true;
			$this->conf['show_prev'] = true;
			$this->conf['show_next'] = true;
			$this->conf['show_last'] = true;
			$this->conf['show_goto'] = false;
			$this->conf['show_info'] = false;
			$this->conf['show_point'] = true;
			$this->conf['show_empty_button'] = false;

			$this->conf['first_text'] = 'First';
			$this->conf['prev_text'] = 'Prev';
			$this->conf['next_text'] = 'Next';
			$this->conf['last_text'] = 'Last';
			$this->conf['point_text'] = '...';

			$this->conf['full_tag_open'] = '<div class="pages">';
			$this->conf['full_tag_close'] = '</div>';
			$this->conf['num_tag_open'] = '';
			$this->conf['num_tag_close'] = '';
			$this->conf['link_tag_open'] = '<a href=":url">';
			$this->conf['link_tag_close'] = '</a>';
			$this->conf['link_tag_cur_open'] = '<strong>';
			$this->conf['link_tag_cur_close'] = '</strong>';
			$this->conf['button_tag_open'] = '<a href=":url" style="font-weight:bold">';
			$this->conf['button_tag_close'] = '</a>';
			$this->conf['button_tag_empty_open'] = '<span>';
			$this->conf['button_tag_empty_close'] = '</span>';
			$this->conf['point_tag_open'] = '<span>';
			$this->conf['point_tag_close'] = '</span>';
		}
	}
后面还有 166 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。