mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-10 09:56:24 +02:00
Added Composite UML
This commit is contained in:
@ -11,4 +11,4 @@ To translate one interface for a class into a compatible interface. An adapter a
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
||||

|
Before ![]() (image error) Size: 20 KiB After ![]() (image error) Size: 20 KiB ![]() ![]() |
Before (image error) Size: 9.8 KiB After (image error) Size: 9.8 KiB |
@ -9,4 +9,4 @@ independently. (http://en.wikipedia.org/wiki/Bridge_pattern)
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
||||

|
Before ![]() (image error) Size: 16 KiB After ![]() (image error) Size: 16 KiB ![]() ![]() |
Before (image error) Size: 10 KiB After (image error) Size: 10 KiB |
@ -10,3 +10,6 @@ To treat a group of objects the same way as a single instance of the object.
|
||||
subsequently runs through all its child elements and calls `render()` on them
|
||||
* `Zend_Config`: a tree of configuration options, each one is a `Zend_Config` object itself
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
BIN
Structural/Composite/uml/uml.png
Normal file
BIN
Structural/Composite/uml/uml.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 12 KiB |
1
Structural/Composite/uml/uml.svg
Normal file
1
Structural/Composite/uml/uml.svg
Normal file
File diff suppressed because one or more lines are too long
After (image error) Size: 7.2 KiB |
23
Structural/Composite/uml/uml.txt
Normal file
23
Structural/Composite/uml/uml.txt
Normal file
@ -0,0 +1,23 @@
|
||||
@startuml
|
||||
class Form {
|
||||
protected elements
|
||||
+render($indent = 0)
|
||||
+addElement(FormElement $element)
|
||||
}
|
||||
|
||||
abstract class FormElement {
|
||||
+render($indent = 0)
|
||||
}
|
||||
|
||||
class InputElement {
|
||||
+render($indent = 0)
|
||||
}
|
||||
|
||||
class TextElement {
|
||||
+render($indent = 0)
|
||||
}
|
||||
|
||||
FormElement <|.. TextElement
|
||||
FormElement <|.. InputElement
|
||||
FormElement <|.. Form
|
||||
@enduml
|
Reference in New Issue
Block a user