koen Posted November 17, 2007 Share Posted November 17, 2007 Since PHP is stateless it seems like a lot of classes can/should be made a singleton if you don't want to use globals. eg classes user, acl, database, pluginhandler, security, settings, ... Every of these seem to be in need of access anywhere in the script. That means passing instances everywhere or using some form of singleton. Or maybe there's more than I currently know. What are best practices in such cases? Link to comment https://forums.phpfreaks.com/topic/77722-ways-to-prevent-singletonitis/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.