定制 survos/grid-group-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

survos/grid-group-bundle

最新稳定版本:1.6.44

Composer 安装命令:

composer require survos/grid-group-bundle

包简介

Handle groups of CSV as a spreadsheet

README 文档

README

Under development! And will probably be replaced by Pixy/Pixie/KeyValue bundle, which uses Sqlite instead of csv. But some tools here could be helpful.

A bundle to manipulate a set of CSV files as a database. The idea is to avoid having to create temporary entities or models during the data import.

CsvParser

The CSV Reader class is an excellent way to read records from csv.

$csv = Reader::createFromPath('/path/to/file.csv', 'r');
$csv->setHeaderOffset(0);
$header_offset = $csv->getHeaderOffset(); //returns 0
$header = $csv->getHeader(); //returns ['First Name', 'Last Name', 'E-mail']

Example: create a simple related table.

Given a movie CSV table, create a CsvDatabase (GridGroup?)

id,title,poster,overview,release_date,genres
287947,Shazam!,https://image.tmdb.org/t/p/w500/xnopI5Xtky18MPhK40cZAGAOVeV.jpg,"A boy is given the ability to become an adult superhero in times of need with a single magic word.",1553299200,"Action, Comedy, Fantasy"
299537,"Captain Marvel",https://image.tmdb.org/t/p/w500/AtsgWhDnHTq68L0lLsUrCnM7TjG.jpg,"The story follows Carol Danvers as she becomes one of the universe’s most powerful heroes when Earth is caught in the middle of a galactic war between two alien races. Set in the 1990s, Captain Marvel is an all-new adventure from a previously unseen period in the history of the Marvel Cinematic Universe.",1551830400,"Action, Adventure, Science Fiction"

Create a movie.csv and genre.csv, with genre counts as an extra field

We need a schema to define the output csv database, which we can create by naming the fields.

$gridGroup = new GridGroup('movie_and_genre');
$grid = (new \Survos\GridGroupBundle\Model\Grid('movie'));
$grid->addRow()

Defining the schema

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固