PHP 클래스 SimplePager

Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com OrangeHRM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
상속: extends sfPager, implements Serializable
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$m_numPages
$m_offset
$m_offsets
$m_renderedStr
$m_selectedPageNumber
$m_urls

공개 메소드들

메소드 설명
SimplePager ( integer $p_totalItems, integer $p_itemsPerPage, string $p_offsetVarName, string $p_baseUrl, boolean $p_useSessions = true, $p_width = 10 ) SimplePager, unlike the PEAR Pager class, is a pager made to work with template-like layouts. The constructor sets up the variables you need to render the links, and you can render them however you like. There is a default render function for reference.
_range ( integer $p_num1, integer $p_num2, integer $p_step = 1 ) : array Create an array of integers starting at $p_num1 and ending at $p_num2 (inclusive), going up by a value of $p_step each time.
render ( ) : string Default way to render the links. Feel free to come up with your own way.

메소드 상세

SimplePager() 공개 메소드

SimplePager, unlike the PEAR Pager class, is a pager made to work with template-like layouts. The constructor sets up the variables you need to render the links, and you can render them however you like. There is a default render function for reference.
public SimplePager ( integer $p_totalItems, integer $p_itemsPerPage, string $p_offsetVarName, string $p_baseUrl, boolean $p_useSessions = true, $p_width = 10 )
$p_totalItems integer Total number of items.
$p_itemsPerPage integer Number of items to display per page.
$p_offsetVarName string The name of the REQUEST variable which holds the order number of the first item on the selected page.
$p_baseUrl string The url to which we attach the offset variable name.
$p_useSessions boolean Set to TRUE if you want the offset item number to be stored in the session so that the user will return to their previous position in the pager when they leave the screen and come back to it.

_range() 공개 메소드

Create an array of integers starting at $p_num1 and ending at $p_num2 (inclusive), going up by a value of $p_step each time.
public _range ( integer $p_num1, integer $p_num2, integer $p_step = 1 ) : array
$p_num1 integer
$p_num2 integer
$p_step integer
리턴 array

render() 공개 메소드

Default way to render the links. Feel free to come up with your own way.
public render ( ) : string
리턴 string

프로퍼티 상세

$m_numPages 공개적으로 프로퍼티

public $m_numPages

$m_offset 공개적으로 프로퍼티

public $m_offset

$m_offsets 공개적으로 프로퍼티

public $m_offsets

$m_renderedStr 공개적으로 프로퍼티

public $m_renderedStr

$m_selectedPageNumber 공개적으로 프로퍼티

public $m_selectedPageNumber

$m_urls 공개적으로 프로퍼티

public $m_urls