"most modern scholars hold that [the book of Matthew] was written in the last quarter of the first century by a male Jew who stood on the margin between traditional and nontraditional Jewish values and who was familiar with technical legal aspects of scripture being debated in his time." (Wikipedia)
So, written 75 to 100 CE.
Both things could technically be true: dogs and swine as regular literary metaphor; it's use as a stand in for Cynics and Epicureans depending on the demographics where the writer was living. I'm skeptical that Jesus would have used it to refer to the philosophical schools since I'm not sure there would be many from those two schools in Galilee and Jerusalem at his time. But I'm still intrigued by this line of inquiry.