It should be both, well that's what I've made from it.
Though I have a friend and I was setting up his iMessage and it only works if i have his email in my contact books along with the phone number. In the iMessage settings theres a receive as option, for me it just shows my Apple ID (email), no phone number. Not sure if it's meant to.
But I've text people with iPhones, they have replied (without knowing email) and it goes through as an iMessagw