sounds like the toe was caught in the door hinge? Act now and take or send pics to a vet for meds to prevent major systemic infection.
Good luck.