Download the PHP package iesde/pagerfanta without Composer

On this page you can find all versions of the php package iesde/pagerfanta. 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 pagerfanta

This project is looking for maintainers - details here.

Pagerfanta

Build Status Scrutinizer Quality Score Code Coverage SensioLabsInsight Latest Stable Version Total Downloads

This project is for PHP 7. If you need support for PHP < 7, use Release v1.1.0.

Usage

Some of the other methods available:

Changing the page based on user selection

If you're using the example route-generator function shown below, the page selected by the user will be available in the page GET (querystring) parameter.

You would then need to call setCurrentPage with the value of that parameter:

setMaxPerPage and setCurrentPage

The ->setMaxPerPage() and ->setCurrentPage() methods implement a fluent interface:

The ->setMaxPerPage() method throws an exception if the max per page is not valid:

Both extend from Pagerfanta\Exception\NotValidMaxPerPageException.

The ->setCurrentPage() method throws an exception if the page is not valid:

All of them extend from Pagerfanta\Exception\NotValidCurrentPageException.

->setCurrentPage() throws an out ot range exception depending on the max per page, so if you are going to modify the max per page, you should do it before setting the current page.

(If you want to use Pagerfanta in a Symfony project, see https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.)

Adapters

The adapter's concept is very simple. An adapter just returns the number of results and an slice for a offset and length. This way you can adapt a pagerfanta to paginate any kind results simply by creating an adapter.

An adapter must implement the Pagerfanta\Adapter\AdapterInterface interface, which has these two methods:

Pagerfanta comes with these adapters:

ArrayAdapter

To paginate an array.

MongoAdapter

To paginate Mongo Cursors.

MandangoAdapter

To paginate Mandango Queries.

DoctrineDbalAdapter

To paginate DoctrineDbal query builders.

DoctrineDbalSingleTableAdapter

To simplify the pagination of single table DoctrineDbal query builders.

This adapter only paginates single table query builders, without joins.

DoctrineORMAdapter

To paginate DoctrineORM query objects.

DoctrineODMMongoDBAdapter

To paginate DoctrineODMMongoDB query builders.

DoctrineODMPhpcrAdapter

To paginate Doctrine PHPCR-ODM query builders.

DoctrineCollectionAdapter

To paginate a Doctrine\Common\Collection\Collections interface you can use the DoctrineCollectionAdapter. It proxies to the count() and slice() methods on the Collections interface for pagination. This makes sense if you are using Doctrine ORMs Extra Lazy association features:

DoctrineSelectableAdapter

To paginate a Doctrine\Common\Collection\Selectable interface you can use the DoctrineSelectableAdapter. It uses the matching() method on the Selectable interface for pagination. This is especially usefull when using the Doctrine Criteria object to filter a PersistentCollection:

Note that you should never use this adapter with a PersistentCollection which is not set to use the EXTRA_LAZY fetch mode.

Be careful when using the count() method, currently Doctrine2 needs to fetch all the records to count the number of elements.

ElasticaAdapter

To paginate an Elastica Query query:

Be careful when paginating a huge set of documents. By default, offset + limit can't exceed 10000. You can mitigate this by setting the $maxResults parameter when constructing the ElasticaAdapter. For more information, see: #213.

PropelAdapter

To paginate a propel 1 query:

Propel2Adapter

To paginate a propel 2 query:

SolariumAdapter

To paginate a solarium query:

FixedAdapter

Best used when you need to do a custom paging solution and don't want to implement a full adapter for a one-off use case.

It returns always the same data no matter what page you query:

ConcatenationAdapter

Concatenates the results of other adapter instances into a single adapter. It keeps the order of sub adapters and the order of their results.

Views

Views are to render pagerfantas, this way you can reuse your pagerfantas' HTML in several projects, share them and use another ones from another developer's.

The views implement the Pagerfanta\View\ViewInterface interface, which has two methods:

RouteGenerator example:

Pagerfanta comes with five views: The default one, three for Twitter Bootstrap, one for Semantic UI and a special optionable view.

DefaultView

This is the default view.

Options (default):

CSS:

TwitterBootstrapView, TwitterBootstrap3View and TwitterBootstrap4View

These views generate paginators designed for use with Twitter Bootstrap.

TwitterBootstrapView is for Bootstrap 2; TwitterBootstrap3View is for Bootstrap 3; TwitterBootstrap4View is for Bootstrap 4 (alpha).

Options (default):

SemanticUiView

This view generates a pagination for Semantic UI.

Options (default):

OptionableView

This view is to reuse options in different views.

Contributing

We welcome contributions to this project, including pull requests and issues (and discussions on existing issues).

If you'd like to contribute code but aren't sure what, the issues list is a good place to start. If you're a first-time code contributor, you may find Github's guide to forking projects helpful.

All contributors (whether contributing code, involved in issue discussions, or involved in any other way) must abide by our code of conduct.

Acknowledgements

Pagerfanta is inspired by Zend Paginator.

Thanks also to Pablo Díez ([email protected]) for most of the work on the first versions of Pagerfanta.

Licence

Pagerfanta is licensed under the MIT License.


All versions of pagerfanta with dependencies

PHP Build Version
Package Version
Requires php Version ^7.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 iesde/pagerfanta contains the following files

Loading the files please wait ....