Implement magic findBy*() and findOneBy*() methods in the base repository
The base Repository should provide some magic __call() method taking care of findBy*() and findOneBy*() method calls, returning the results of searches for a property called after the method:
$result1 = $repository->findByFoo('bar'); $result2 = $repository->findOneByFoo('bar');
$result1 will contain an array of all objects whose property 'foo' is 'bar'.
$result2 will contain the first object which matches a search for 'foo' == 'bar'.