The main (mono) repository for PhataPak
-
The main goal of this project is to provide reusable data for usage in and the development of PHP software.
-
Data in this project is not limited to data about PHP (development) itself but can contain information about other languages, infrastructure and IT ecosystems.
-
The data in this project is made available in the Data Package format and under the PDDL license.
-
The data packages in this project are not meant to be comprehensive, complete or 'correct'. They are meant to be reference points to apply DRY principle on a data level and to support data driven development approaches.
-
Data packages will be able to be obtained as single composer packages or as or as composer packages containing all data packages of a specific (sub-)category (e.g: vcs).
-
A datapackage in the packages root directory contains information about individual datapackages in the project and acts as a registry for them.
-
To work with the datapackages in your PHP project you can use the Data Package or Table Schema libraries provided by Frictionless Data
-
To import datapackages into your project or into any other format we recommend the PortPHP library in conjunction with above packages.
A quick example on how to import a Data Package into your Database via Doctrine ORM using Table Schema and PortPHP Doctrine:
use Port\Doctrine\DoctrineWriter;
use Port\Reader\IteratorReader;
use Port\Steps\StepAggregator as Workflow;
use frictionlessdata\tableschema\Table;
// create a table object from the source files
$table = new Table("data.csv", "datapackage.json");
// since the Table class implements (SPL) Iterator, we can use a IteratorReader
$reader = new IteratorReader($table);
// create the Doctrine ObjectManager (please, see Doctrine's documentation)
[...]
// create a Doctrine Writer
/** @var \Doctrine\Common\Persistence\ObjectManager $objectManager */
$writer = new DoctrineWriter($objectManager, 'YourNamespace:EntityName');
$writer->prepare();
// create a workflow object to wire up the reader and writer
$workflow = (new Workflow($reader))->addWriter($writer);
// import the data
$result = $workflow->process()
-
This project is made under a Code of Conduct.
-
The software in these project should follow this checklist, the SOLID principles and the guidelines found in the CONTRIBUTING file.
-
Software: The software source code in this project is made available under the 'MIT License' which can be found in the project's LICENSE file or at: https://opensource.org/licenses/MIT
-
Data: The data in this project is made available under the 'Public Domain Dedication and License v1.0' (PDDL) which can be found in the project's DATA_LICENSE file or at: http://www.opendatacommons.org/licenses/pddl/1.0/ . A human-readable summary of the PDDL can be found at: https://opendatacommons.org/licenses/pddl/summary/
- The Icon used as a Logo for PhetaPak is copyright Icons8 and licensed under CC BY-ND 3.0