14.2. UML

This Unified Modified Language (UML) diagram details a class design using the Prototype Design Pattern (see Figure 14-1). Refer to the following list:

  • The MyObject class has been assembled using the Prototype Design Pattern. It has one public method called requestClone(). This method is used to generate a copy of the MyObject instance.

  • The ClonedObject object represents a copied instance of the MyObject class. Note that, since it is an exact duplicate, it also has the requestClone() public method.

  • Many instances of ClonedObject can be created by calling the requestClone() method of MyObject.

Figure 14-1. Figure 14-1

Get Professional PHP Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.