: This article mainly describes how to use UML diagrams. For more information about PHP tutorials, see. The class name is usually in italics. When an abstract class is used, the class name is marked with {abstract} in the next line. When an interface is used, the class name is used above the interface name. < >.
Use attribute: visibility symbol property name: Type = property value
Visibility tag:
+ |
Public |
All code visible |
- |
Private |
Only the current class can access |
# |
Protected |
Only the current class and its subclass can access |
Use case:
Class method:
Accessible method name (parameter 1, parameter 2 ......) : Returned data type
Use case:
Inheritance and implementation
Description of the inheritance relationship
Description interface implementation
Association
When a class property stores an instance of another class, we call it Association.
A straight line is used when the correlation is uncertain.
Only when TECHER contains PUPLL instances
Association between TECHER and PUPLL
Indicates the number of associated times.
Aggregation and combination
Aggregation and combination are both referenced object instances and become part of the referenced object.
Aggregation: the contained objects are the core part of the container, but they can also be included by other objects at the same time, using a hollow diamond. The container may not be deleted.
Combination: the contained object can only be referenced by its container, using a solid diamond. The container must be deleted.
Description
The used class is passed as a parameter of another class method, and the arrow points to the used
Annotations
Easy to understand and use the Product class to output data
The above section describes the use of UML diagrams, including the content, and hope to help those who are interested in PHP tutorials.