PDO4You\Pagination::setPaginator PHP Method

setPaginator() public static method

Sets the paginator
public static setPaginator ( string $paginator )
$paginator string Parameter used as paginator
    public static function setPaginator($paginator)
    {
        self::$paginator = (string) $paginator;
    }

Usage Example

示例#1
0
<?php

// Loading demo class
require 'DemoRegister.php';
// Example with Pagination
echo '<h2><a href=".">DEMOS</a> &rsaquo; READING WITH PAGING</h2>';
// Importing classes
use PDO4You\Pagination as pager;
// Enable pagination: If the passed value is TRUE enables paging for friendly URLs
pager::setPagination(false);
// Sets the number of records per page
//pager::setLimitPerPage(2);
// Sets the page navigation
pager::setPaginator('n');
// Creating an instance
$demo = new DemoRegister();
?>

<div class="pdo4you">
    <form method="post">
        <h3><?php 
echo $demo::ADD_NEW_USER;
?>
</h3>

        <div><?php 
echo $demo::FIRST_NAME;
?>
: <input type="text" name="firstname" /></div>
        <div><?php 
echo $demo::LAST_NAME;