Skip to content

Commit 2e6ea96

Browse files
Improved the documentation
1 parent 386276f commit 2e6ea96

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

dbObject.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
dbObject - model implementation on top of the MysqliDb
2-
Please note, that this library is not pretending to be a full stack ORM but a simple OOP wrapper for mysqlidb
1+
dbObject - model implementation on top of the MysqliDb.
2+
3+
Please note that this library is not pretending to be a full stack ORM, but simply an OOP wrapper for `mysqlidb`.
34

45
<hr>
56
###Initialization
@@ -26,7 +27,7 @@ class user extends dbObject {}
2627
```
2728
In case autoload is set to 'models' directory, the filename should be models/user.php
2829

29-
Class will be related to 'user' table. To change table name define correct name in the $dbTable variable:
30+
Class will be related to 'user' table. To change the table name, define correct name in the `$dbTable` variable:
3031

3132
```php
3233
protected $dbTable = "users";
@@ -110,11 +111,11 @@ $p->seller = $user;
110111
$p->save();
111112
```
112113

113-
After `save()` is called both new objects (user and product) will be saved.
114+
After `save()` is called, both new objects (user and product) will be saved.
114115

115116

116117
###Update
117-
To update model properties just set them and call `save()` method. As well values that needed to by changed could be passed as an array to the `save()` method.
118+
To update model properties just set them and call `save()` method. Values that need to be changed could be passed as an array to the `save()` method as well.
118119

119120
```php
120121
$user = user::byId(1);

0 commit comments

Comments
 (0)