PHP design mode initial solution record

Source: Internet
Author: User
PHP design mode

  1. Factory mode: The change of things to wrap up, there are changes only need to modify a place;

  2. Singleton mode: A function that does not need to be extended into an instance, to avoid new waste of memory;

  3. Viewer mode: Log;

  4. Prototype mode: Create an object that requires more overhead by using clone;

  5. Decorative mode: chain-add function;

  6. Policy mode: Implements the horizontal scaling of the policy by means of the method that is defined in the class (policy);

  7. Adapter mode: The collation of the same function;

  8. Registration mode: Global object.

PHP design mode initial solution record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.