mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-04 14:07:25 +02:00
Added Composite UML
This commit is contained in:
BIN
Structural/Adapter/uml/uml.png
Normal file
BIN
Structural/Adapter/uml/uml.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
1
Structural/Adapter/uml/uml.svg
Normal file
1
Structural/Adapter/uml/uml.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9.8 KiB |
33
Structural/Adapter/uml/uml.txt
Normal file
33
Structural/Adapter/uml/uml.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
@startuml
|
||||
interface PaperBookInterface {
|
||||
+turnPage()
|
||||
+open()
|
||||
}
|
||||
|
||||
interface EBookInterface {
|
||||
+pressNext()
|
||||
+pressStart()
|
||||
}
|
||||
|
||||
class Book {
|
||||
+open()
|
||||
+turnPage()
|
||||
}
|
||||
|
||||
class Kindle {
|
||||
+pressNext()
|
||||
+pressStart()
|
||||
}
|
||||
|
||||
class EBookAdapter {
|
||||
#eBook : EBookInterface
|
||||
+__construct(ebook : EBookInterface)
|
||||
+open()
|
||||
+turnPage()
|
||||
}
|
||||
|
||||
PaperBookInterface <|.. Book
|
||||
PaperBookInterface <|.. EBookAdapter
|
||||
EBookInterface <|.. Kindle
|
||||
EBookAdapter o-- EBookInterface
|
||||
@enduml
|
Reference in New Issue
Block a user