borisguery/bgylibrary — pull request #3 by wildlyinaccurate (2012-06-16 20:23:31+00:00)
Title: Add recursion to EntitySerializer

I needed the ability to serialize related entities, so I came up with this.

Max recursion depth is (optionally) specified in the constructor. i.e.

$serializer = new EntitySerializer($em, 2);
$serializer->toArray($entity);