选择语言 :

 Core_Pagination::render

返回分页HTML

string Core_Pagination::render( [ $view $view = null ] )

参数列表

参数 类型 描述 默认值
$view $view 视图对象或视图文件名 null
返回值
  • string 分页HTML
File: ./core/classes/pagination.class.php
public function render($view = null)
{
    if (!$this->_is_renew)
    {
        $this->renew();
    }

    # 是否自动隐藏只有1个分页或0个分页的HTML
    if (true===$this->config['auto_hide'] && $this->total_pages <= 1) return '';


    if (null===$view)
    {
        $view = $this->config['view'];
    }

    if (!$view instanceof View)
    {
        $view = View::factory($view);
    }

    return $view->set(get_object_vars($this))->set('page', $this)->render(false);
}