\CodeLapsePager

ページネーションクラス

Summary

Methods
Properties
Constants
instance()
init()
hasPrev()
hasNext()
pages()
relateRange()
__construct()
_hasPrev()
_hasNext()
_pages()
_relateRange()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
render()
$instances
$perPage
$allCount
$currentPage
N/A

Properties

$instances

$instances : 

Type

$perPage

$perPage : 

Type

$allCount

$allCount : 

Type

$currentPage

$currentPage : integer

Type

integer — 1から始まる現在のページ番号

Methods

instance()

instance( $name)

Parameters

$name

init()

init(integer $currentPage, integer $allCount, integer $perPage,  $instance)

ページャーを初期化します。

Parameters

integer $currentPage

現在のページ番号(1〜)。

 0が渡された時、強制的に1に変更されます。
integer $allCount

表示できるアイテム全体の件数

integer $perPage

1ページに表示する件数

$instance

hasPrev()

hasPrev(string $content,  $instance) : boolean

前のページがあるか調べます。

Parameters

string $content

前のページがあるときに表示するコンテンツ

$instance

Returns

boolean

hasNext()

hasNext(string $content,  $instance) : boolean

次のページがあるか調べます。

Parameters

string $content

次のページがあるときに表示するコンテンツ

$instance

Returns

boolean

pages()

pages( $instance) : integer

全ページ数を取得します。

Parameters

$instance

Returns

integer —

全ページ数

relateRange()

relateRange(integer $beforeAfter, string $content,  $instance) : boolean

現在のページ番号を中心に、$beforeAfterに指定されたぜんご

Parameters

integer $beforeAfter

表示するページ数

string $content

次のページがあるときに表示するコンテンツ

$instance

Returns

boolean

__construct()

__construct( $currentPage,  $allCount,  $perPage)

Parameters

$currentPage
$allCount
$perPage

_hasPrev()

_hasPrev( $content)

Parameters

$content

_hasNext()

_hasNext( $content)

Parameters

$content

_pages()

_pages()

_relateRange()

_relateRange( $beforeAfter,  $content)

Parameters

$beforeAfter
$content

render()

render( $page,  $content)

Parameters

$page
$content