nathggns/Scaffold — pull request #9 by nathggns (2012-08-25 23:41:57+00:00)
Title: Add data and file models.

The basic usage is something like this:

$config = new ModelFile(ROOT . 'config.json');
$config->read('database');
var_dump($config->row());
// array('database' => array('host' => 'localhost', ...))

$user = new ModelFile(ROOT . 'users.json');
$user->set('username', 'bob');
$user->save();

Issues:

- File models cache their data from instantiation. This isn't likely to be an issue, though it is something to note. There are reasons for this.
- File models have a `save` method, but data models do that. This is to avoid data duplication in data models.
- File models load all their data straight away. Probably a wontfix.
- No `find`, `order`, `limit` methods / options.
- Only a VERY basic `read` method.