PHP Class PDO4You\Pagination

Since: 2010-09-07
Author: Giovanni Ramos ([email protected])
Afficher le fichier Open project: giovanniramos/pdo4you Class Usage Examples

Méthodes publiques

Свойство Type Description
$buttons

Méthodes publiques

Méthode Description
buildQuery ( string $query, array $records ) : string Builds a query and sets the number of records per page
getPagination ( ) : null | string Displays the pagination
getPaging ( ) : boolean Gets the activation of pagination
getTotalOfRecords ( ) : integer Gets the total number of records
setFriendlyUrl ( boolean $friendly_url ) Enables navigation by URLs friendlies
setLimitPerPage ( integer $limit ) Sets the number of records per page
setPagination ( boolean $friendly_url = false ) Sets the activation of paging
setPaginator ( string $paginator ) Sets the paginator

Private Methods

Méthode Description
buildPaginator ( integer $page ) : string Builds the paginator
getCurrentPage ( ) : integer Get the number of the current page
getLimitPerPage ( ) : integer Gets the number of records per page
getTotalOfPages ( ) Gets the total number of pages
setPaging ( boolean $paging ) Enables paging of records
setTotalOfPages ( integer $limit ) Sets the total number of pages
setTotalOfRecords ( array $records ) Sets the total number of records

Method Details

buildQuery() public static méthode

Builds a query and sets the number of records per page
See also: PDO4You::selectRecords()
public static buildQuery ( string $query, array $records ) : string
$query string SQL query
$records array Records of the query
Résultat string

getPagination() public static méthode

Displays the pagination
public static getPagination ( ) : null | string
Résultat null | string

getPaging() public static méthode

Gets the activation of pagination
See also: PDO4You::selectRecords()
public static getPaging ( ) : boolean
Résultat boolean

getTotalOfRecords() public static méthode

Gets the total number of records
public static getTotalOfRecords ( ) : integer
Résultat integer

setFriendlyUrl() public static méthode

Enables navigation by URLs friendlies
public static setFriendlyUrl ( boolean $friendly_url )
$friendly_url boolean Enables URLs friendlies

setLimitPerPage() public static méthode

Sets the number of records per page
public static setLimitPerPage ( integer $limit )
$limit integer Maximum of records per page

setPagination() public static méthode

Sets the activation of paging
public static setPagination ( boolean $friendly_url = false )
$friendly_url boolean OPTIONAL Enables URLs friendlies

setPaginator() public static méthode

Sets the paginator
public static setPaginator ( string $paginator )
$paginator string Parameter used as paginator

Property Details

$buttons public_oe static_oe property

public static $buttons