Bruce eventually works out that the entire world is a fantasy, and frees himself from the dream after a battle with an imposter Batman.
The whole encounter turns out to be a scheme of the Mad Hatter, who blames Batman for ruining his life.
“Perchance To Dream,” which is a phrase taken from the famous soliloquy of Hamlet, follows Batman after he is knocked unconscious after pursuing a group of criminals.
He awakens as Bruce Wayne and finds himself in a world where his parents have never died, he’s engaged to Selina Kyle (Catwoman), and he is not Batman.