承接 stopsopa/paginator-test 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

stopsopa/paginator-test

Composer 安装命令:

composer require stopsopa/paginator-test

包简介

README 文档

README

Build Status Coverage Status Latest Stable Version License

DEPRECATED ???

Created in 2022 - quite old now and not maintained. Butt.... Due to it's simplicity I believe it could be still used 🤷

Nothing to be ashamed here:

I used best tools available at a time and delivered what's needed quickly.

Table of Contents

(TOC generated using markdown-toc)

Installation

composer require stopsopa/paginator-test

Usage

<?php

use Stopsopa\PaginatorTest\Paginator;

require_once dirname(__FILE__).'/vendor/autoload.php';

$list = str_split('abcdefghijklmnopqrstuwxyz', 1);

$paginator = new Paginator(
    3, // per page
    // function to return length of the set
    function () use ($list) {
        return count($list);
    },
    // function to provide one page of elements from set
    function ($offset, $limit) use ($list) {
        return array_slice($list, $offset, $limit);
    },
    3 // how many buttons around current
);

$page = $paginator->getPage(3);

var_dump($page->elements());
//array(3) {
//      [0] => string(1) "g"
//      [1] => string(1) "h"
//      [2] => string(1) "i"
//}

var_dump($page->pages());
//array(3) {
//    [0] => array(2) {
//        'page' => int(2)
//        'current' => bool(false)
//    }
//    [1] => array(2) {
//        'page' => int(3)
//        'current' => bool(true)
//    }
//    [2] => array(2) {
//        'page' => int(4)
//        'current' => bool(false)
//    }
//}

see more: test

Dev notes

Just follow Makefile... it should be quite self explanatory

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固