Function

callback
Function

the callback to invoke

binding
Any

the value to which the callback's this should be bound

Given a callback, iterates over each of the types related to a model, invoking the callback with the related type's class. Each type will be returned just once, regardless of how many different relationships it has with a model.