Download the PHP package voodoophp/paginator without Composer

On this page you can find all versions of the php package voodoophp/paginator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package paginator

Paginator 2.x.x

A paginator that makes it easy and simple


Name: Paginator

License: MIT

Author: Mardix

Version : 2.x.x

Requirements: PHP >= 5.4


About Paginator

Paginator is a simple class that allows you to create pagination for your application. It doesn't require any database connection. It only requires the total of items found and from there it will create a pagination that can be export to HTML or Array. It is also compatible with Twitter's Bootstrap Framework.


Install Paginator

You can just download Paginator as is, or with Composer.

To install with composer, add the following in the require key in your composer.json file

"voodoophp/paginator": "2.*"

composer.json

{
    "name": "voodoophp/myapp",
    "description": "My awesome Voodoo App",
    "require": {
        "voodoophp/paginator": "2.*"
    }
}

Create a Pagination

Paginator makes it easy to create pagination. It only requires the URL that contains the page number pattern, the total items, and the total of items per page.

http://site.com/search?q=flower&page=15

or

http://site.com/genres/pop/page/15

Paginator will automatically match the page number with the url above, and create pagination for the rest of the pages based on the total items and items per page provided.

Catching the page number

Paginator requires the keyword (:num) in the page number pattern to match the page number in the URL.

Page number pattern are set in the following format

For friendly URL, it will capture http://site.com/page/25

/page/(:num)

For normal URL, it will capture http://site.com/?page=25

page=(:num)

Page number pattern is set in

Voodoo\Paginator::setUrl($url, $pagePattern);

On both examples it will catch the page number [25] and create from there the start and the end of the pagination.

Any variation of the page number pattern is OK, as long as it includes (:num)

A Simple Example

<html>
    <head>
        <link rel="stylesheet" href="./assets/paginator.css">
        <title>Paginator Example</title>
    </head>

    <body>
        <?= $paginator; ?>
    </body>
</html>

Will render something like this:

[First] [<< Prev] [1] [2] [3] [4] [5] [6] [Next >>] [Last]

With links that look like:

<a href='http://mysite.com/hip-hop/page/6'>6</a>

Methods


Voodoo\Paginator::__construct()

        <li class='<?= ($page["is_current"]) ? "active" : ""; ?>'>
            <a href='<?= $page["url"]; ?>'><?= $page["label"]; ?></a>
        </li>

</ul>

String Voodoo\Paginator::toHtml()

Will return a formatted HTML, compatible with Bootstrap framework

<html>
    <head>
        <link rel="stylesheet" href="./assets/paginator.css">
        <title>Paginator SQL Example</title>
    </head>

    <body>
        <?= $paginator; ?>
    </body>
</html>

Please refer to the example directory for examples


(c) This Year Mardix :)


All versions of paginator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package voodoophp/paginator contains the following files

Loading the files please wait ....