am working on a web app in PHP that requires users to register and login with their credentials. However, i am using the singleton pattern in all my PHP class files.
I have something bothering my mind that i would like to clarify. For instance, When the application goes live and we have several users on the site at the same time, doing similar things hereby calling the same php classes (behind the scene). Now, since singleton prevents multiple instance of a class and returns just a single instance. Would it by any chance cause a user's action on the site to conflict with other user's action.
e.g I have a class called Search.php and it is a singleton class. This class handles all search queries from the website. If several users are performing a search on the site at the same time, will their actions conflict with each other since its just a single instance of the Search class that can be created.
Thanks very much for your time.