It's interesting, how much this question is controversial. I also have had similar problem. It was a bit different, but similar. Much time passed, but I still can't understand who was right. But I also can't understand, why I was fired, and the manager stayed. Was it me who is wrong, or the manager?
I think it would be good to reach some kind of consensus. Is it okay for the manager to be rude and not listening to needs of developer?