Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 287e242

Browse files
committed
Added Composite UML
1 parent 9780f47 commit 287e242

File tree

12 files changed

+30
-3
lines changed

12 files changed

+30
-3
lines changed

Structural/Adapter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ To translate one interface for a class into a compatible interface. An adapter a
1111

1212
## UML Diagram
1313

14-
![Alt Adapter UML Diagram](uml.png)
14+
![Alt Adapter UML Diagram](uml/uml.png)
File renamed without changes.
File renamed without changes.
File renamed without changes.

Structural/Bridge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ independently. (http://en.wikipedia.org/wiki/Bridge_pattern)
99

1010
## UML Diagram
1111

12-
![Alt Bridge UML Diagram](uml.png)
12+
![Alt Bridge UML Diagram](uml/uml.png)
File renamed without changes.
File renamed without changes.
File renamed without changes.

Structural/Composite/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
# Purpose
44

5-
To treat a group of objects the same way as a single instance of the object.
5+
To treat a group of objects the same way as a single instance of the object.
66

77
# Examples
88

99
* a form class instance handles all its form elements like a single instance of the form, when `render()` is called, it
1010
subsequently runs through all its child elements and calls `render()` on them
1111
* `Zend_Config`: a tree of configuration options, each one is a `Zend_Config` object itself
1212

13+
## UML Diagram
14+
15+
![Alt Composite UML Diagram](uml/uml.png)

Structural/Composite/uml/uml.png

12 KB
Loading

Structural/Composite/uml/uml.svg

Lines changed: 1 addition & 0 deletions
Loading

Structural/Composite/uml/uml.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@startuml
2+
class Form {
3+
protected elements
4+
+render($indent = 0)
5+
+addElement(FormElement $element)
6+
}
7+
8+
abstract class FormElement {
9+
+render($indent = 0)
10+
}
11+
12+
class InputElement {
13+
+render($indent = 0)
14+
}
15+
16+
class TextElement {
17+
+render($indent = 0)
18+
}
19+
20+
FormElement <|.. TextElement
21+
FormElement <|.. InputElement
22+
FormElement <|.. Form
23+
@enduml

0 commit comments

Comments
 (0)