add hooks for when something is required through container
Add onRequired callback. Thanks jergason.