DRYing up a Symfony2 entity repository function that's shared across bundles
===

I have a certain function that I use in two different entity repositories. It's the exact same in both repositories, which is of course not very DRY.

I don't really know where the appropriate place would be to put this function so it could be used by both repositories. The fact that the two repositories are in different bundles doesn't make things any easier for me to figure out.

It's not a template helper, by the way. It's a function that the repositories need to use.

Where should I put this function so I'm only defining it once?