承接 barnabynorman/result-set 相关项目开发

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

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

barnabynorman/result-set

Composer 安装命令:

composer require barnabynorman/result-set

包简介

Manage collections of items with filters and utilities

README 文档

README

ResultSet is a project based around array type data sets. I wrote the majority of the library as an Eloquent like class to query data held in JSON files. Later I used it with the output from SQL queries, creating object instances for each database row and storing them in the ResultSet held in memory, giving me an abstraction between data and logic and a fast way to get to the data without having to write queries every time. Because I held my instances of ResultSet in memory I would read from the database once and query the ResultSet multiple times, which made it fast! An older project that I had written that had multiple database queries, (and admittedly poor structure), when rewired using ResultSet went from seconds down to milliseconds - and that was on every page load!

Obviously a ResultSet is not for everybody - there are probably much better ways of working like structuring data better to start with, so that queries are required less, caching and I have not tested it with large datasets so it could run like a dog! But I like that I can take a set of data, create a ResultSet with it and have quite a powerful toolset to get at the data at my fingertips.

The ResultSet is a php ArrayObject at heart, with a bunch of methods to filter / query and manipulate the data held inside, either as objects or arrays (or both). There are no rockets involved, just plain old simple php that anyone could write, (mainly foreach loops), take a look. Its very simple to use, just create a new object or get an instance using a static method and pass in your data and start using.

Getting started

With Composer

$ composer require barnabynorman/result-set
{
    "require": {
        "barnabynorman/result-set": "^1.00"
    }
}
<?php
require 'vendor/autoload.php';

use ResultSet\ResultSet;

$rs = new ResultSet(['one', 'two', 'three']);
print_r($rs->first());

Without Composer

But it's so simple with composer! Download the ResultSet latest release and put the contents of the ZIP archive into a directory in your project. Then require the file ResultSet.php.

<?php
require 'path/to/ResultSet.php';

use ResultSet\ResultSet;

$rs = new ResultSet(['one', 'two', 'three']);
print_r($rs->first());

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固