PHP 클래스 VersionPress\Git\GitLogPaginator

파일 보기 프로젝트 열기: versionpress/versionpress 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( GitRepository $repository )
getPage ( $pageNumber ) : Commit[] Returns a subset of commits ordered from newest to oldest.
getPrettySteps ( $currentPage ) : array Returns a subset of pages useful for pagination.
isLastPage ( ) : boolean Returns true if the last loaded page was the last one.
setCommitsPerPage ( integer $commitsPerPage )
setQuery ( string $query )

메소드 상세

__construct() 공개 메소드

public __construct ( GitRepository $repository )
$repository GitRepository

getPage() 공개 메소드

Returns a subset of commits ordered from newest to oldest.
public getPage ( $pageNumber ) : Commit[]
$pageNumber
리턴 Commit[]

getPrettySteps() 공개 메소드

For example if there are 1000 commits, 25 per page and you are on page 10, it returns 0,7,8,9,10,11,12,13,20,29,39. The algorithm is from VisualPaginator component for Nette Framework.
public getPrettySteps ( $currentPage ) : array
$currentPage
리턴 array

isLastPage() 공개 메소드

Returns true if the last loaded page was the last one.
public isLastPage ( ) : boolean
리턴 boolean

setCommitsPerPage() 공개 메소드

public setCommitsPerPage ( integer $commitsPerPage )
$commitsPerPage integer

setQuery() 공개 메소드

public setQuery ( string $query )
$query string