Skip to content

Commit 7f72443

Browse files
committed
updated docs
1 parent d8f65f4 commit 7f72443

File tree

3 files changed

+11
-20
lines changed

3 files changed

+11
-20
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,21 @@ JSONDb is a PHP database abstraction library for MySQL which allows you to easil
1010

1111
## Quick Start
1212

13-
* Update configuration data in `vendor/johnwilson/jsondb/config/config.php`.
14-
* Write your code:
15-
1613
```PHP
1714

1815
// Autoload
1916
require_once __DIR__ . '/vendor/autoload.php';
2017

21-
// bootstrap
22-
require_once __DIR__ . '/vendor/johnwilson/jsondb/jsondb.php';
23-
2418
// import namespace
2519
use IBT\JsonDB\Client;
2620
use IBT\JsonDB\Collection;
2721

2822
// create client and initialize database
29-
$c = new Client();
23+
$c = new Client([
24+
'database' => 'database',
25+
'username' => 'username',
26+
'password' => 'password'
27+
]);
3028
$c->setup();
3129

3230
// create collection

docs/getting_started.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,12 @@
66
composer init --require="johnwilson/jsondb"
77
```
88

9-
**Don't forget to update configuration file to suit your environment** `vendor/johnwilson/jsondb/config/config.php`
10-
119
## Call autoloader
1210

1311
```PHP
1412
require_once __DIR__ . '/vendor/autoload.php';
1513
```
1614

17-
## Require the bootstrap file
18-
19-
```PHP
20-
require_once __DIR__ . '/vendor/johnwilson/jsondb/jsondb.php';
21-
```
22-
2315
## Import the relevant namespaces as required:
2416

2517
```PHP

docs/tutorial.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This tutorial will get you up and running with JsonDB by performing basic CRUD (
44

55
## Preparation
66

7-
If you've setup your project according to the guidelines in the [getting started](https://github.com/johnwilson/jsondb/blob/master/docs/getting_started.md) section, you should be ready to follow this tutorial. Make sure you've edited the configuration file `vendor/johnwilson/jsondb/config/config.php` to suit your environment.
7+
If you've setup your project according to the guidelines in the [getting started](https://github.com/johnwilson/jsondb/blob/master/docs/getting_started.md) section, you should be ready to follow this tutorial.
88

99
The following code will get you ready to run your CRUD operations
1010

@@ -14,15 +14,16 @@ The following code will get you ready to run your CRUD operations
1414
// Autoload
1515
require_once __DIR__ . '/vendor/autoload.php';
1616

17-
// bootstrap
18-
require_once __DIR__ . '/vendor/johnwilson/jsondb/jsondb.php';
19-
2017
// import namespace
2118
use IBT\JsonDB\Client;
2219
use IBT\JsonDB\Collection;
2320

2421
// create a new db client
25-
$c = new Client();
22+
$c = new Client([
23+
'database' => 'database',
24+
'username' => 'username',
25+
'password' => 'password'
26+
]);
2627

2728
// setup
2829
$c->setup();

0 commit comments

Comments
 (0)