Multi instance pattern means that there are multiple instances of the same class, and the instances are the class itself. This class is called a multi instance class. The characteristics of the multiple cases model are as follows
A multi instance class can have multiple instances.
Multi instance classes must create and manage their own instances, and provide their own instances to the outside world.
Multi instance pattern is actually a generalization of single instance pattern.
give an example
Two database connectors, such as MySQL and SQLite
Multiple recorders (one for debugging messages and one for errors)
★Official PHP advanced learning exchange community “click”The management has sorted out some materials, bat and other advanced knowledge systems are ready (relevant learning materials and written questions), and not limited to: distributed architecture, high scalability, high performance, high concurrency, server performance tuning, tp6, laravel, yii2, redis, spool, swoft, Kafka, MySQL optimization, shell script, docker, microservice, nginx and other advanced knowledge points Advanced dry goods
If you like my article and want to exchange and study with more senior developers, you can get more technical consultation and guidance related to the interview of large factories. Welcome to join usOur group – click here(group number 856460874).
If the content is good, I hope you can support and encourage me to like it, and welcome to communicate with me. In addition, if you have any questions, please put forward the content you want to see in the comments