1. Go to this page and download the library: Download zf3belcebur/mvc-basic-tools library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/** @var int defined from PHP CONSTANT "DEFAULT_LIMIT_ITEMS_PER_PAGE", if constant is not defined the value is 50 */
protected $limitItemsPerPage;
/** @var int defined from query param "page", by default 1*/
protected $currentPageNumber;
/** @var int defined from query param "limit", by default $this->limitItemsPerPage*/
protected $itemCountPerPage;
/**
* @param QueryBuilder $qb
* @param bool $fetchJoinCollection
* @param string|null $prefix
* @param int $queryHydrationMode
* @return Paginator
*/
public function createPaginator(QueryBuilder $qb, bool $fetchJoinCollection = false, string $prefix = null, int $queryHydrationMode = Query::HYDRATE_OBJECT): Paginator;