@eko, I think this code should be move to the CoreBundle ;)