Skip to content

Commit

Permalink
Added JSON dump example
Browse files Browse the repository at this point in the history
  • Loading branch information
ilijastuden committed Oct 15, 2015
1 parent af32f1e commit 23e8ceb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,17 @@ All instances that implement `ActiveCollab\User\UserInterface` can be serialized
```php
$user = new ActiveCollab\User\AnonymousUser('Ilija Studen', '[email protected]');
print_r(json_decode(json_encode($user), true));
```

will output:

```
(
[id] => 0
[class] => ActiveCollab\User\AnonymousUser
[first_name] => Ilija
[last_name] => Studen
[full_name] => Ilija Studen
[email] => [email protected]
)
```

0 comments on commit 23e8ceb

Please sign in to comment.