Following code will store 'options' variable as a json string in the database and will return back an array on load.
Same with 'sections' variable except that it will be stored in pipe delimetered format.
###Validation and Error checking
Before saving and updating the row dbObject do input validation. In case validation rules are set but their criteria is not met
then save() will return an error with its description. For example:
...
...
@@ -212,6 +237,8 @@ Validation rules must be defined in $dbFields array.
First parameter is a field type. Types could be the one of following: text, bool, int, datetime or a custom regexp.
Second parameter is 'required' and its defines that following entry field be always defined.
NOTE: All variables which are not defined in the $dbFields array will be ignored from insert/update statement.
###Array as return values
dbObject can return its data as array instead of object. To do that ArrayBuilder() function should be used in the beginning of the call.
```php
...
...
@@ -245,4 +272,4 @@ Object could be easily converted to a json string or an array.
###Examples
Please look for a use examples in tests/dbObjectTests.php file and test models inside the tests/models/ directory
Please look for a use examples in <ahref='tests/dbObjectTests.php'>tests file</a> and test models inside the <ahref='tests/models/'>test models</a> directory