PHP code example of devzer0x00 / data-provider
1. Go to this page and download the library: Download devzer0x00/data-provider 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/ */
devzer0x00 / data-provider example snippets
use DevZer0x00\DataProvider\ArrayDataProvider;
use DevZer0x00\DataProvider\Paginator;
$originalData = ...;
$provider = new ArrayDataProvider();
$provider->setOriginalData($originalData);
$provider->setPaginator(
new Paginator([
'pageSize' => 10,
'currentPage' => $currentPage
])
);
$data = $provider->getData();
use DevZer0x00\DataProvider\Paginator;
$paginator = new Paginator([
'pageSize' => 10,
'currentPage' => 2,
'totalCount' => 1825
]);
$paginator->setPageSize(25)
->setCurrentPage(1)
->setTotalCount(4500);