sumocoders/Simple-Application-Framework — pull request #53 by jonasdekeukelaere (2014-06-05 08:36:48+00:00)
Title: Proposal: ArrayAccess for DefaultEntity

This is a proposal, with just a quick implementation.

Instead of using a toArray() function for an entity, why not implement the ArrayAccess interface?

Still todo:
- use array access where toArray is now used
- remove toArray()

Usage:
```php
$this->item = User::get($id);

Spoon::dump(isset($this->item['id'])); // exists
Spoon::dump($this->item['id']); // get
$this->item['id'] = 1; // set
unset($this->item['id']); // unset
```