File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change 55install :
66 - composer install
77script :
8- - ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/*
8+ - ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/*
Original file line number Diff line number Diff line change 11# JSON PDO
22
3- [ ![ Scrutinizer Code Quality] ( https://scrutinizer-ci.com/g/alesanchezr/json-orm/badges/quality-score.png?b=master )] ( https://scrutinizer-ci.com/g/emmanuelroecker/php-linkchecker/?branch=master )
4- [ ![ Build Status] ( https://travis-ci.org/alesanchezr/json-orm.svg?branch=master )] ( https://travis-ci.org/emmanuelroecker/php-linkchecker )
5- [ ![ Coverage Status] ( https://coveralls.io/repos/github/alesanchezr/json-orm/badge.svg?branch=master )] ( https://coveralls.io/github/emmanuelroecker/php-linkchecker?branch=master )
3+ [ ![ Build Status] ( https://travis-ci.org/alesanchezr/json-orm.svg?branch=master )] ( https://travis-ci.org/alesanchezr/json-orm )
4+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/alesanchezr/json-orm/badge.svg?branch=master )] ( https://coveralls.io/github/alesanchezr/json-orm?branch=master )
65
76Very simple JSON file based database manager.
87
@@ -28,13 +27,27 @@ Install dependencies :
2827php composer.phar install
2928```
3029
31- ## How to check links in html / json files ?
30+ ## How use it ?
3231
3332``` php
3433require 'vendor/autoload.php';
3534
3635use JsonPDO\JsonPDO;
3736
37+ //create a database pointing to a file or folder
38+ $orm = new JsonPDO('./tests/data/');
39+
40+ //get any file from the data folder
41+ $content = $orm->getJsonByName('countries');
42+
43+ //save some data into a json file
44+ $someData = [ "ve" => "venezuela" ];
45+ $file = $orm->toNewFile('countries');
46+ $file->save($content);
47+
48+ //delete a json file
49+ $orm->deleteFile('countries');
50+
3851```
3952
4053## Running Tests
@@ -49,4 +62,4 @@ Launch from command line :
4962
5063## Contact
5164
52- Authors : Alejandro Sanchez
65+ Authors : Alejandro Sanchez
You can’t perform that action at this time.
0 commit comments