Doctrine resource events

This PR fixes issue #77
Documentation about the events are added to the documentation / comments.