PHP Classes

PHP Split CSV: Split CSV files input multiple parts set by rules

Recommend this page to a friend!
  Info   View files View files (21)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 72%Total: 501 All time: 5,803 This week: 107Up
Version License PHP version Categories
split-csv 1.0.0BSD License5.3.0PHP 5, Files and Folders
Description 

Author

This package can split CSV files input multiple parts set by rules.

It can read CSV files by row and write their contents to new multiple CSV files.

The package provides classes that implement different rules for defining where to split the original CSV file.

Currently it provides a rule class that splits the file by size and other to split the file by number of record rows.

Picture of Sergii Pryz
  Performance   Level  
Name: Sergii Pryz <contact>
Classes: 10 packages by
Country: Ukraine Ukraine
Age: 39
All time rank: 134121 in Ukraine Ukraine
Week rank: 312 Up4 in Ukraine Ukraine Up
Innovation award
Innovation award
Nominee: 4x

Details

SplitCSV ======== Objective --------- SplitCSV helps to split comma separated value file (CSV) into chunks by configurable options: * Each file's part contains first row from original file (or several one) * Every file's part has name as original but with a prefix Of course it is not possible to implement all varies of algorithms of splitting. Therefore SplitCSV presents AbstractRule and RuleInterface to add user rules. Split Rules ----------- There are two split rules that is available from box: * Split by number of rows * Split by file size Area of usage ------------- There are several fields where better have several files instead of one: * Project log files to prevent them growing to gigantic size * Reports before sending them off by email * Price list from different stores before import them to someone * Prepare data for parallel calculation to make possible spread data between servers or processes ### Example The example file can be found here: `/Example.php`

  Files folder image Files  
File Role Description
Files folder imagedocs (1 directory)
Files folder imagesrc (1 file, 1 directory)
Files folder imagetests (2 files, 2 directories)
Accessible without login Plain text file CHANGELOG.md Data Documentation
Accessible without login Plain text file Example.php Example Example script
Accessible without login Plain text file LICENSE.txt Lic. Documentation
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  docs  
File Role Description
Files folder imageuml (1 file)

  Files folder image Files  /  docs  /  uml  
File Role Description
  Accessible without login Image file class.diagram.png Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageSplitCSV (4 files, 1 directory)
  Accessible without login Plain text file Autoload.php Aux. Class source

  Files folder image Files  /  src  /  SplitCSV  
File Role Description
Files folder imageRule (5 files)
  Plain text file AbstractFile.php Class Class source
  Plain text file Exception.php Class Class source
  Plain text file File.php Class Class source
  Plain text file FileInterface.php Class Class source

  Files folder image Files  /  src  /  SplitCSV  /  Rule  
File Role Description
  Plain text file AbstractRule.php Class Class source
  Plain text file Exception.php Class Class source
  Plain text file FileSize.php Class Class source
  Plain text file NumberRow.php Class Class source
  Plain text file RuleInterface.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imagedata (1 file)
Files folder imagesrc (1 directory)
  Accessible without login Plain text file bootstrap.php Aux. Class source
  Accessible without login Plain text file phpunit.xml Data Auxiliary data

  Files folder image Files  /  tests  /  data  
File Role Description
  Accessible without login Plain text file test-10000-rows-357kb.csv Data Auxiliary data

  Files folder image Files  /  tests  /  src  
File Role Description
Files folder imageSplitCSV (2 files, 1 directory)

  Files folder image Files  /  tests  /  src  /  SplitCSV  
File Role Description
Files folder imageRule (1 file)
  Accessible without login Plain text file BaseTest.php Test Unit test script
  Accessible without login Plain text file FileTest.php Test Unit test script

  Files folder image Files  /  tests  /  src  /  SplitCSV  /  Rule  
File Role Description
  Accessible without login Plain text file RuleTest.php Test Unit test script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:501
This week:0
All time:5,803
This week:107Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:58%StarStarStar
Videos:-
Overall:72%StarStarStarStar
Rank:174