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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.