CSVelte: A slender, elegant CSV library for PHP¶
CSVelte is a simple yet flexible CSV and tabular data library for PHP5.6+. It was originally written as a pseudo-port of Python’s CSV module in early 2008 and was called PCU. Unfortunately my time was very limited and after only version 0.3, PCU went dormant. Fast forward to eight years later and I come across my own library in an unrelated Google search. Surprisingly, PCU had gained and then lost, a somewhat respectable user base. So I revived the project, rewrote it from the ground up using solid object-oriented design principles, keeping only the most basic concepts, and renamed it CSVelte (pronounced just like the word svelte).
Why the name CSVelte?
The library was originally called PHP CSV Utilities, which I never particularly liked. So when I revived the project, I decided that if I was going to release a new version, I wanted a new name. I wanted the name to reflect the library’s goal of being simple and elegant and still have CSV in the name. The word “svelte” means “slender and elegant”. So I just added a “C” to the beginning of it and a slender and elegant CSV library was born!
CSVelte’s user documentation is organized into three main sections, as outlined below. If you’re new to CSVelte, I recommend that you begin here: Getting Started.
The user’s guide is broken down into a series of chapters that walk you through CSVelte’s features and concepts. Think of it like an instruction manual. It should be read more or less sequentially, as each chapter tends to build on knowledge from previous chapters. Throughout the user’s guide you wlll find references and links to the API Documentation, which we’ll get to next.
The API documentation is an exhaustive listing of every class, method, property, exception, and function defined by CSVelte as well as definitions for each of them. This portion of the documentation is generated automatically by a piece of software called ApiGen. It’s definitely the most comprehensive of the three documentation sections, but not the easiest to read. It is recommended that you read the User’s Guide to learn and the API Documentation as a reference.
While the user’s guide and API docs focus on explaining and defining CSVelte’s features and classes (respectively), the tutorials focus on its actual use. Each tutorial addresses a specific use case, providing a somewhat opinionated solution and walking you through it step by step. Each tutorial can be downloaded in its entirety, including working source code and instructions.