boyfriend dumped me

So my boyfriend and I are on and off   . He gets mad at me for no reason and won't talk to me for a day then he's fine the next day. He's been mad recently and I don't understand why, I try to talk to him but he just says "I don't know", how do you not fucking know?! So I get a surprise message from one of his friends saying he's breaking up with me? Is he really that big of a pussy to not tell me to my face? I just need some support right now from the community.. I called him out later at lunch and he just looked at me—meanwhile he talks about me. I'm just so glad there's 4 more days left of school..