i have a "conceptual" question about Front controller implementation in php.
Most of the Front Controllers i have seen around are implemented with Singleton, i am not a big fan of singleton pattern and i created a Container which has a static property that will store a unic instance of Front Controller.
With singleton, i had to put initialization code inside the constructor (or a method called by the constructor):
$fc = FrontController::getInstance();
With the container i could put configuration outside the FrontController, that was my goal and i still have a simple way to retrieve the FrontController.
$fc = Container->getFrontController();
This code looks much cleaner to me and i can get clean subclassing without caring about parent constructors.
That's quite the same thing at 'bootstrap' time, but in practice the difference from my previous implementation is that now i can create FrontControllers anywhere in the application (inside a DAO or inside a Action), because the constructor is no longer private/protected.
My question is: Is it a 'bad practice' to give to the user of my classes the possibility to create FrontController instances anywhere in the app? I would write documentation and deliver the container with other classes, but i still wonder if i should prevent strange uses.